From 7608b2685b39fcbdf6fb1b9afad65ce41001ce12 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 9 Aug 2010 17:38:57 +0000 Subject: [PATCH] Eliminate some unused return codes. --- src/microcode/interp.c | 9 --------- src/microcode/returns.h | 32 ++++++++++++-------------------- src/runtime/conpar.scm | 2 -- src/runtime/framex.scm | 2 -- 4 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/microcode/interp.c b/src/microcode/interp.c index 9cffb914f..8d3d7bda9 100644 --- a/src/microcode/interp.c +++ b/src/microcode/interp.c @@ -1141,15 +1141,6 @@ Interpret (int pop_return_p) } } - case RC_INVOKE_STACK_THREAD: - /* Used for WITH_THREADED_STACK primitive. */ - Will_Push (3); - PUSH_VAL (); /* Value calculated by thunk. */ - PUSH_EXP (); - PUSH_APPLY_FRAME_HEADER (1); - Pushed (); - goto internal_apply; - case RC_JOIN_STACKLETS: unpack_control_point (GET_EXP); break; diff --git a/src/microcode/returns.h b/src/microcode/returns.h index e1641133f..e71d57c4a 100644 --- a/src/microcode/returns.h +++ b/src/microcode/returns.h @@ -32,7 +32,7 @@ USA. #define RC_INTERNAL_APPLY 0x03 /* unused 0x04 */ #define RC_RESTORE_HISTORY 0x05 -#define RC_INVOKE_STACK_THREAD 0x06 +/* unused 0x06 */ /* unused 0x07 */ #define RC_EXECUTE_ASSIGNMENT_FINISH 0x08 #define RC_EXECUTE_DEFINITION_FINISH 0x09 @@ -59,12 +59,9 @@ USA. /* unused 0x1E */ /* unused 0x1F */ #define RC_NORMAL_GC_DONE 0x20 -/* unused 0x21 */ -#define RC_PURIFY_GC_1 0x22 -#define RC_PURIFY_GC_2 0x23 -/* unused 0x24 through 0x28 */ +/* unused 0x21 through 0x28 */ #define RC_POP_FROM_COMPILED_CODE 0x29 -#define RC_RETURN_TRAP_POINT 0x2A +/* unused 0x2A */ /* unused 0x2B */ /* unused 0x2C */ /* unused 0x2D */ @@ -78,10 +75,7 @@ USA. /* unused 0x44 */ #define RC_RESTORE_INT_MASK 0x45 #define RC_HALT 0x46 -/* unused 0x47 */ -#define RC_REPEAT_DISPATCH 0x48 -#define RC_GC_CHECK 0x49 -/* unused 0x4A through 0x52 */ +/* unused 0x47 through 0x52 */ #define RC_COMP_LOOKUP_TRAP_RESTART 0x53 #define RC_COMP_ASSIGNMENT_TRAP_RESTART 0x54 /* unused 0x55 */ @@ -94,11 +88,10 @@ USA. #define RC_HARDWARE_TRAP 0x5C #define RC_INTERNAL_APPLY_VAL 0x5D #define RC_COMP_ERROR_RESTART 0x5E -#define RC_PRIMITIVE_CONTINUE 0x5F /* When adding return codes, add them to the table below as well! */ -#define MAX_RETURN_CODE 0x5F +#define MAX_RETURN_CODE 0x5E #define RETURN_NAME_TABLE \ { \ @@ -108,7 +101,7 @@ USA. /* 0x03 */ "internal-apply", \ /* 0x04 */ 0, \ /* 0x05 */ "restore-history", \ -/* 0x06 */ "invoke-stack-thread", \ +/* 0x06 */ 0, \ /* 0x07 */ 0, \ /* 0x08 */ "assignment-continue", \ /* 0x09 */ "definition-continue", \ @@ -136,15 +129,15 @@ USA. /* 0x1f */ 0, \ /* 0x20 */ "normal-garbage-collect-done", \ /* 0x21 */ 0, \ -/* 0x22 */ "purify-after-first-gc", \ -/* 0x23 */ "purify-after-second-gc", \ +/* 0x22 */ 0, \ +/* 0x23 */ 0, \ /* 0x24 */ 0, \ /* 0x25 */ 0, \ /* 0x26 */ 0, \ /* 0x27 */ 0, \ /* 0x28 */ 0, \ /* 0x29 */ "pop-from-compiled-code", \ -/* 0x2a */ "return-trap-point", \ +/* 0x2a */ 0, \ /* 0x2b */ 0, \ /* 0x2c */ 0, \ /* 0x2d */ 0, \ @@ -174,8 +167,8 @@ USA. /* 0x45 */ "restore-interrupt-mask", \ /* 0x46 */ "halt", \ /* 0x47 */ 0, \ -/* 0x48 */ "repeat-dispatch", \ -/* 0x49 */ "gc-check", \ +/* 0x48 */ 0, \ +/* 0x49 */ 0, \ /* 0x4a */ 0, \ /* 0x4b */ 0, \ /* 0x4c */ 0, \ @@ -196,6 +189,5 @@ USA. /* 0x5b */ "compiler-link-caches-restart", \ /* 0x5c */ "hardware-trap", \ /* 0x5d */ "internal-apply-val", \ -/* 0x5e */ "compiler-error-restart", \ -/* 0x5f */ "primitive-continue" \ +/* 0x5e */ "compiler-error-restart" \ } diff --git a/src/runtime/conpar.scm b/src/runtime/conpar.scm index 6a9844d4a..012116881 100644 --- a/src/runtime/conpar.scm +++ b/src/runtime/conpar.scm @@ -807,7 +807,6 @@ USA. (standard-subproblem 'ACCESS-CONTINUE 2) (standard-subproblem 'PRIMITIVE-COMBINATION-1-APPLY 2) (standard-subproblem 'FORCE-SNAP-THUNK 2) - (standard-subproblem 'GC-CHECK 2) (standard-subproblem 'ASSIGNMENT-CONTINUE 3) (standard-subproblem 'DEFINITION-CONTINUE 3) (standard-subproblem 'SEQUENCE-2-SECOND 3) @@ -822,7 +821,6 @@ USA. (standard-subproblem 'PRIMITIVE-COMBINATION-2-APPLY 3) (standard-subproblem 'PRIMITIVE-COMBINATION-3-SECOND-OPERAND 3) (standard-subproblem 'COMBINATION-2-PROCEDURE 4) - (standard-subproblem 'REPEAT-DISPATCH 4) (standard-subproblem 'PRIMITIVE-COMBINATION-3-FIRST-OPERAND 4) (standard-subproblem 'PRIMITIVE-COMBINATION-3-APPLY 4) (standard-subproblem 'COMBINATION-SAVE-VALUE length/combination-save-value) diff --git a/src/runtime/framex.scm b/src/runtime/framex.scm index fc58b50e4..f3c13d9fa 100644 --- a/src/runtime/framex.scm +++ b/src/runtime/framex.scm @@ -273,9 +273,7 @@ USA. (set! stack-frame-type/pop-return-error (microcode-return/name->type 'POP-RETURN-ERROR)) (record-method 'COMBINATION-APPLY method/null) - (record-method 'GC-CHECK method/null) (record-method 'REENTER-COMPILED-CODE method/null) - (record-method 'REPEAT-DISPATCH method/environment-only) (let ((method (method/standard &pair-car))) (record-method 'DISJUNCTION-DECIDE method) (record-method 'SEQUENCE-2-SECOND method)) -- 2.25.1