From: Jason Wilson Date: Wed, 9 Jun 1993 20:36:38 +0000 (+0000) Subject: Merge in C back end changes. X-Git-Tag: 20090517-FFI~8348 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6e32cb2cf78bf91369b06f7ab0856fd5019afd5f;p=mit-scheme.git Merge in C back end changes. --- diff --git a/v7/src/microcode/compinit.c b/v7/src/microcode/compinit.c index b1935a5c3..491c9bb5c 100644 --- a/v7/src/microcode/compinit.c +++ b/v7/src/microcode/compinit.c @@ -1,4 +1,36 @@ -/* -*- C -*- */ +/* -*-C-*- + +$Id: compinit.c,v 1.2 1993/06/09 20:36:38 jawilson Exp $ + +Copyright (c) 1992-1993 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. */ #include "liarc.h" diff --git a/v7/src/microcode/comutl.c b/v7/src/microcode/comutl.c index e372241be..b1f5aaec0 100644 --- a/v7/src/microcode/comutl.c +++ b/v7/src/microcode/comutl.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/comutl.c,v 1.21 1991/10/29 22:55:11 jinx Exp $ +$Id: comutl.c,v 1.22 1993/06/09 20:34:39 jawilson Exp $ -Copyright (c) 1987-91 Massachusetts Institute of Technology +Copyright (c) 1987-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -139,3 +139,22 @@ DEFINE_PRIMITIVE ("COMPILED-CLOSURE->ENTRY", Prim_compiled_closure_to_entry, 1, error_bad_range_arg (1); PRIMITIVE_RETURN (compiled_closure_to_entry (closure)); } + +/* This is only meaningful for the C back end. */ + +DEFINE_PRIMITIVE ("INITIALIZE-C-COMPILED-BLOCK", Prim_initialize_C_compiled_block, 1, 1, + "Given the tag of a compiled object, return the object.") +{ +#ifdef NATIVE_CODE_IS_C + extern SCHEME_OBJECT * EXFUN (initialize_C_compiled_block, (int, char *)); + SCHEME_OBJECT * block, val; + + block = (initialize_C_compiled_block (1, (STRING_ARG (1)))); + val = ((block == ((SCHEME_OBJECT *) NULL)) + ? SHARP_F + : (MAKE_POINTER_OBJECT (TC_COMPILED_ENTRY, block))); + PRIMITIVE_RETURN (val); +#else + PRIMITIVE_RETURN (SHARP_F); +#endif +} diff --git a/v7/src/microcode/unxutl/ymkfile b/v7/src/microcode/unxutl/ymkfile index 756ffc631..c82662739 100644 --- a/v7/src/microcode/unxutl/ymkfile +++ b/v7/src/microcode/unxutl/ymkfile @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ymkfile,v 1.65 1993/06/08 04:09:38 gjr Exp $ +$Id: ymkfile,v 1.66 1993/06/09 20:32:08 jawilson Exp $ Copyright (c) 1989-1993 Massachusetts Institute of Technology @@ -248,6 +248,44 @@ cmpaux-alpha.s : cmpaux-alpha.m4 xmakefile #endif /* PROC_TYPE_ALPHA */ +#if (PROC_TYPE == PROC_TYPE_LIARC) +#define PROC_TYPE_KNOWN + +#include "ymake.cclist" + +COMPILED_OBJECTS = $(COMPILED_SOURCES:.c=.o) + +MACHINE_SWITCHES = -DNATIVE_CODE_IS_C +MACHINE_SOURCES = cmpint.c cmpaux-C.c compinit.c $(COMPILED_SOURCES) +MACHINE_OBJECTS = cmpint.o cmpaux-C.o compinit.o $(COMPILED_OBJECTS) +GC_HEAD_FILES = gccode.h cmpgc.h cmpint-C.h +LIARC_HEAD_FILES = \ +ansidecl.h \ +config.h \ +default.h \ +object.h \ +sdata.h \ +types.h \ +errors.h \ +const.h \ +interp.h \ +prim.h \ +$(GC_HEAD_FILES) +cmpaux-C.o : cmpaux-C.c liarc.touch bignum.h +compinit.o : compinit.c liarc.touch compinit.h +compinit.h : $(COMPILED_SOURCES) xmakefile + @echo "#*** Generating" $@ "because of" $? + rm -f $@ + fgrep DECLARE_COMPILED_CODE $(COMPILED_SOURCES) | \ + sed -e 's/.*:/ /' -e 's/)/);' > $@ + +$(COMPILED_OBJECTS) : liarc.touch +liarc.touch: liarc.h $(LIARC_HEAD_FILES) + @echo "#** Generating" $@ because of $? + touch liarc.touch + +#endif /* PROC_TYPE_LIARC */ + #ifndef PROC_TYPE_KNOWN MACHINE_SWITCHES = MACHINE_SOURCES = cmpint.c