Merge in C back end changes.
authorJason Wilson <edu/mit/csail/zurich/jawilson>
Wed, 9 Jun 1993 20:36:38 +0000 (20:36 +0000)
committerJason Wilson <edu/mit/csail/zurich/jawilson>
Wed, 9 Jun 1993 20:36:38 +0000 (20:36 +0000)
v7/src/microcode/compinit.c
v7/src/microcode/comutl.c
v7/src/microcode/unxutl/ymkfile

index b1935a5c3707a760a2461986275ac8b404d2b601..491c9bb5c0e31e9d8d88bb03f13b0ae7c3142b69 100644 (file)
@@ -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"
 
index e372241bed8113a1ce828346ec213b983dbc9443..b1f5aaec07330f188c3fecdfd2a7b42a03aeb22f 100644 (file)
@@ -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));
 }
+\f
+/* 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
+}
index 756ffc6314b075914bbb7fbe3c89414c3a5be782..c82662739820a02054d3a1364a8a91a0180de9b6 100644 (file)
@@ -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