From ddf089d7dfa4c743e02f8342d85e0d8dd36cdb6d Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Wed, 4 Nov 1992 00:02:24 +0000 Subject: [PATCH] Fix back-out problem in compiled APPLY. --- v7/src/microcode/cmpint.c | 9 +++++---- v8/src/microcode/cmpint.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/v7/src/microcode/cmpint.c b/v7/src/microcode/cmpint.c index 783e07b69..cdafb7cd1 100644 --- a/v7/src/microcode/cmpint.c +++ b/v7/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.53 1992/10/27 22:00:04 jinx Exp $ +$Id: cmpint.c,v 1.54 1992/11/04 00:02:24 jinx Exp $ Copyright (c) 1989-1992 Massachusetts Institute of Technology @@ -613,7 +613,7 @@ DEFUN (apply_compiled_from_primitive, (arity), int arity) { operator = (MEMORY_REF (procedure, ENTITY_OPERATOR)); if (!COMPILED_CODE_ADDRESS_P (operator)) - break; + goto defer_application; STACK_PUSH (procedure); frame_size += 1; procedure = operator; @@ -640,11 +640,12 @@ DEFUN (apply_compiled_from_primitive, (arity), int arity) /* For now, fall through */ default: +defer_application: + STACK_PUSH (procedure); + STACK_PUSH (frame_size); break; } - STACK_PUSH (procedure); - STACK_PUSH (frame_size); STACK_PUSH (apply_in_interpreter); Stack_Pointer = (STACK_LOC (- arity)); return (SHARP_F); diff --git a/v8/src/microcode/cmpint.c b/v8/src/microcode/cmpint.c index 783e07b69..cdafb7cd1 100644 --- a/v8/src/microcode/cmpint.c +++ b/v8/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.53 1992/10/27 22:00:04 jinx Exp $ +$Id: cmpint.c,v 1.54 1992/11/04 00:02:24 jinx Exp $ Copyright (c) 1989-1992 Massachusetts Institute of Technology @@ -613,7 +613,7 @@ DEFUN (apply_compiled_from_primitive, (arity), int arity) { operator = (MEMORY_REF (procedure, ENTITY_OPERATOR)); if (!COMPILED_CODE_ADDRESS_P (operator)) - break; + goto defer_application; STACK_PUSH (procedure); frame_size += 1; procedure = operator; @@ -640,11 +640,12 @@ DEFUN (apply_compiled_from_primitive, (arity), int arity) /* For now, fall through */ default: +defer_application: + STACK_PUSH (procedure); + STACK_PUSH (frame_size); break; } - STACK_PUSH (procedure); - STACK_PUSH (frame_size); STACK_PUSH (apply_in_interpreter); Stack_Pointer = (STACK_LOC (- arity)); return (SHARP_F); -- 2.25.1