From 1829462aba5c770843ce92e7de608c617b21c7ed Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 10 Aug 2001 04:37:13 +0000 Subject: [PATCH] Make sure that value of evaluating definition is the name being defined. --- v7/src/microcode/interp.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/v7/src/microcode/interp.c b/v7/src/microcode/interp.c index 2a2edfddd..9a196bf87 100644 --- a/v7/src/microcode/interp.c +++ b/v7/src/microcode/interp.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: interp.c,v 9.91 2001/07/31 03:11:39 cph Exp $ +$Id: interp.c,v 9.92 2001/08/10 04:37:13 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -1136,21 +1136,19 @@ Pop_Return_Non_Trapping: case RC_EXECUTE_DEFINITION_FINISH: { - SCHEME_OBJECT value; + SCHEME_OBJECT name + = (FAST_MEMORY_REF ((Fetch_Expression ()), DEFINE_NAME)); + SCHEME_OBJECT value = Val; long result; - value = Val; Restore_Env(); Export_Registers(); - result - = (define_variable - ((Fetch_Env ()), - (FAST_MEMORY_REF ((Fetch_Expression ()), DEFINE_NAME)), - Val)); + result = (define_variable ((Fetch_Env ()), name, value)); Import_Registers(); if (result == PRIM_DONE) { End_Subproblem(); + Val = name; break; } Save_Env(); -- 2.25.1