From 8eed78c3535c96707eacdb53d499bfdf8b076b5f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 10 May 1988 15:16:46 +0000 Subject: [PATCH] Move `get-fluid-bindings' and `set-fluid-bindings!' into the normal microcode. This allows the new runtime system to have the hooks for fluid-bindings even if they aren't in use. --- v7/src/microcode/fhooks.c | 32 ++------------------------------ v7/src/microcode/hooks.c | 36 ++++++++++++++++++++++++++++++++---- v7/src/microcode/version.h | 4 ++-- v8/src/microcode/version.h | 4 ++-- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/v7/src/microcode/fhooks.c b/v7/src/microcode/fhooks.c index c12efcba9..33b9b0fcf 100644 --- a/v7/src/microcode/fhooks.c +++ b/v7/src/microcode/fhooks.c @@ -1,6 +1,6 @@ /* -*-C-*- -Copyright (c) 1987 Massachusetts Institute of Technology +Copyright (c) 1988 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/fhooks.c,v 9.26 1988/04/27 04:12:44 jinx Exp $ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/fhooks.c,v 9.27 1988/05/10 15:15:43 cph Exp $ * * This file contains hooks and handles for the new fluid bindings * scheme for multiprocessors. @@ -42,34 +42,6 @@ MIT in each case. */ #include "lookup.h" #include "locks.h" -/* (SET-FLUID-BINDINGS! NEW-BINDINGS) - Sets the microcode fluid-bindings variable. Returns the previous value. -*/ - -Define_Primitive(Prim_Set_Fluid_Bindings, 1, "SET-FLUID-BINDINGS!") -{ - Pointer Result; - Primitive_1_Arg(); - - if (Arg1 != NIL) - Arg_1_Type(TC_LIST); - - Result = Fluid_Bindings; - Fluid_Bindings = Arg1; - PRIMITIVE_RETURN(Result); -} - -/* (GET-FLUID-BINDINGS NEW-BINDINGS) - Gets the microcode fluid-bindings variable. -*/ - -Define_Primitive(Prim_Get_Fluid_Bindings, 0, "GET-FLUID-BINDINGS") -{ - Primitive_0_Args(); - - PRIMITIVE_RETURN(Fluid_Bindings); -} - /* (WITH-SAVED-FLUID-BINDINGS THUNK) Executes THUNK, then restores the previous fluid bindings. */ diff --git a/v7/src/microcode/hooks.c b/v7/src/microcode/hooks.c index 4fa78b781..b20435d32 100644 --- a/v7/src/microcode/hooks.c +++ b/v7/src/microcode/hooks.c @@ -1,6 +1,6 @@ /* -*-C-*- -Copyright (c) 1987 Massachusetts Institute of Technology +Copyright (c) 1988 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/hooks.c,v 9.30 1988/03/24 07:12:24 cph Rel $ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/hooks.c,v 9.31 1988/05/10 15:15:10 cph Exp $ * * This file contains various hooks and handles which connect the * primitives with the main interpreter. @@ -560,6 +560,34 @@ DEFINE_PRIMITIVE ("SET-INTERRUPT-ENABLES!", Prim_set_interrupt_enables, 1) PRIMITIVE_RETURN (MAKE_UNSIGNED_FIXNUM (previous)); } +/* (GET-FLUID-BINDINGS) + Gets the microcode fluid-bindings variable. */ + +DEFINE_PRIMITIVE ("GET-FLUID-BINDINGS", Prim_get_fluid_bindings, 0) +{ + PRIMITIVE_HEADER (0); + + PRIMITIVE_RETURN (Fluid_Bindings); +} + +/* (SET-FLUID-BINDINGS! NEW-BINDINGS) + Sets the microcode fluid-bindings variable. + Returns the previous value. */ + +DEFINE_PRIMITIVE ("SET-FLUID-BINDINGS!", Prim_set_fluid_bindings, 1) +{ + Pointer new_bindings; + Pointer old_bindings; + PRIMITIVE_HEADER (1); + + new_bindings = (ARG_REF (1)); + if (! ((new_bindings == NIL) || (PAIR_P (new_bindings)))) + error_wrong_type_arg (1); + old_bindings = Fluid_Bindings; + Fluid_Bindings = new_bindings; + PRIMITIVE_RETURN (old_bindings); +} + /* (SET-CURRENT-HISTORY! TRIPLE) Begins recording history into TRIPLE. The history structure is somewhat complex and should be understood before trying to use @@ -570,8 +598,8 @@ DEFINE_PRIMITIVE ("SET-INTERRUPT-ENABLES!", Prim_set_interrupt_enables, 1) because it modifies one of the registers that the interpreter caches (History). - The longjmp forces the interpreter to recache. -*/ + The longjmp forces the interpreter to recache. */ + DEFINE_PRIMITIVE ("SET-CURRENT-HISTORY!", Prim_Set_Current_History, 1) { Primitive_1_Arg(); diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 627f30756..3ad85e686 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.36 1988/05/05 08:41:51 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.37 1988/05/10 15:16:46 cph Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 36 +#define SUBVERSION 37 #endif #ifndef UCODE_TABLES_FILENAME diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 0f83a29bf..ca2ee32e6 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.36 1988/05/05 08:41:51 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.37 1988/05/10 15:16:46 cph Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 36 +#define SUBVERSION 37 #endif #ifndef UCODE_TABLES_FILENAME -- 2.25.1