compiled frames or vice-versa, the history subproblem must be stepped.
The reasons for this are that:
1. When interpreted code is called from compiled code, a new history
subproblem is pushed. This subproblem must be discarded when making
the transition back to the compiled code stack frame.
2. When compiled code is called from interpreted code, the existing
history subproblem is preserved for use if the compiled code
tail-recurses back into interpreted code. This subproblem must be
discarded when making the transition back to the interpreted code
stack frame.
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.15 1990/06/28 18:09:25 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.16 1990/08/08 00:57:07 cph Exp $
Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
(parser-state/dynamic-state state)
(parser-state/fluid-bindings state)
(parser-state/interrupt-mask state)
- (if history-subproblem? history undefined-history)
+ (if (and history-subproblem?
+ (stack-frame-type/subproblem? type))
+ history
+ undefined-history)
previous-history-offset
previous-history-control-point
(+ (vector-length elements) n-elements)
(set! stack-frame-type/return-to-interpreter
(make-stack-frame-type false
false
- false
+ true
1
parser/standard-next))
(set! word-size
(standard-frame 'HALT 2)
(standard-frame 'JOIN-STACKLETS 2)
(standard-frame 'POP-RETURN-ERROR 2)
- (standard-frame 'REENTER-COMPILED-CODE 2)
(standard-frame 'RESTORE-VALUE 2)
- (standard-frame 'COMPILER-INTERRUPT-RESTART 3)
- (standard-frame 'COMPILER-LINK-CACHES-RESTART 8)
-\f
+
(standard-subproblem 'IN-PACKAGE-CONTINUE 2)
(standard-subproblem 'ACCESS-CONTINUE 2)
(standard-subproblem 'PRIMITIVE-COMBINATION-1-APPLY 2)
(standard-subproblem 'REPEAT-DISPATCH 4)
(standard-subproblem 'PRIMITIVE-COMBINATION-3-FIRST-OPERAND 4)
(standard-subproblem 'PRIMITIVE-COMBINATION-3-APPLY 4)
- (standard-subproblem 'COMPILER-REFERENCE-RESTART 4)
- (standard-subproblem 'COMPILER-SAFE-REFERENCE-RESTART 4)
- (standard-subproblem 'COMPILER-ACCESS-RESTART 4)
- (standard-subproblem 'COMPILER-UNASSIGNED?-RESTART 4)
- (standard-subproblem 'COMPILER-UNBOUND?-RESTART 4)
- (standard-subproblem 'COMPILER-REFERENCE-TRAP-RESTART 4)
- (standard-subproblem 'COMPILER-SAFE-REFERENCE-TRAP-RESTART 4)
- (standard-subproblem 'COMPILER-UNASSIGNED?-TRAP-RESTART 4)
- (standard-subproblem 'COMPILER-ASSIGNMENT-RESTART 5)
- (standard-subproblem 'COMPILER-DEFINITION-RESTART 5)
- (standard-subproblem 'COMPILER-ASSIGNMENT-TRAP-RESTART 5)
(standard-subproblem 'MOVE-TO-ADJACENT-POINT 6)
(standard-subproblem 'COMBINATION-SAVE-VALUE length/combination-save-value)
(standard-subproblem 'REPEAT-PRIMITIVE length/repeat-primitive)
(standard-subproblem 'COMBINATION-APPLY length)
(standard-subproblem 'INTERNAL-APPLY length)
(standard-subproblem 'INTERNAL-APPLY-VAL length))
+\f
+ (let ((compiler-frame
+ (lambda (name length)
+ (stack-frame-type name false true length parser/standard-next)))
+ (compiler-subproblem
+ (lambda (name length)
+ (stack-frame-type name true true length parser/standard-next))))
+
+ (let ((length (length/application-frame 4 0)))
+ (compiler-subproblem 'COMPILER-LOOKUP-APPLY-TRAP-RESTART length)
+ (compiler-subproblem 'COMPILER-OPERATOR-LOOKUP-TRAP-RESTART length))
+
+ (compiler-frame 'COMPILER-INTERRUPT-RESTART 3) (compiler-frame 'COMPILER-LINK-CACHES-RESTART 8)
+ (compiler-frame 'REENTER-COMPILED-CODE 2)
+
+ (compiler-subproblem 'COMPILER-ACCESS-RESTART 4)
+ (compiler-subproblem 'COMPILER-ASSIGNMENT-RESTART 5)
+ (compiler-subproblem 'COMPILER-ASSIGNMENT-TRAP-RESTART 5)
+ (compiler-subproblem 'COMPILER-DEFINITION-RESTART 5)
+ (compiler-subproblem 'COMPILER-LOOKUP-APPLY-RESTART
+ (length/application-frame 4 1))
+ (compiler-subproblem 'COMPILER-REFERENCE-RESTART 4)
+ (compiler-subproblem 'COMPILER-REFERENCE-TRAP-RESTART 4)
+ (compiler-subproblem 'COMPILER-SAFE-REFERENCE-RESTART 4)
+ (compiler-subproblem 'COMPILER-SAFE-REFERENCE-TRAP-RESTART 4)
+ (compiler-subproblem 'COMPILER-UNASSIGNED?-RESTART 4)
+ (compiler-subproblem 'COMPILER-UNASSIGNED?-TRAP-RESTART 4)
+ (compiler-subproblem 'COMPILER-UNBOUND?-RESTART 4))
- (standard-subproblem 'COMPILER-LOOKUP-APPLY-RESTART
- (length/application-frame 4 1))
-
- (let ((length (length/application-frame 4 0)))
- (standard-subproblem 'COMPILER-LOOKUP-APPLY-TRAP-RESTART length)
- (standard-subproblem 'COMPILER-OPERATOR-LOOKUP-TRAP-RESTART length))
(stack-frame-type 'HARDWARE-TRAP
true
false
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/histry.scm,v 14.2 1989/10/26 06:46:19 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/histry.scm,v 14.3 1990/08/08 00:58:12 cph Rel $
-Copyright (c) 1988, 1989 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(loop (next-reduction current) step)))))
(define (dummy-compiler-reduction? reduction)
- (and (null? (reduction-expression reduction))
+ (and (false? (reduction-expression reduction))
(eq? (ucode-return-address pop-from-compiled-code)
(reduction-environment reduction))))
(set! the-empty-history
(cons (vector-ref (get-fixed-objects-vector)
(fixed-objects-vector-slot 'DUMMY-HISTORY))
- '())))
\ No newline at end of file
+ '()))
+ unspecific)
\ No newline at end of file
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.90 1990/07/20 01:24:13 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.91 1990/08/08 00:58:42 cph Exp $
Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
'()))
(add-system! microcode-system)
(add-event-receiver! event:after-restore snarf-microcode-version!)
- (add-identification! "Runtime" 14 90))
+ (add-identification! "Runtime" 14 91))
(define microcode-system)
(define (snarf-microcode-version!)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.15 1990/06/28 18:09:25 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.16 1990/08/08 00:57:07 cph Exp $
Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
(parser-state/dynamic-state state)
(parser-state/fluid-bindings state)
(parser-state/interrupt-mask state)
- (if history-subproblem? history undefined-history)
+ (if (and history-subproblem?
+ (stack-frame-type/subproblem? type))
+ history
+ undefined-history)
previous-history-offset
previous-history-control-point
(+ (vector-length elements) n-elements)
(set! stack-frame-type/return-to-interpreter
(make-stack-frame-type false
false
- false
+ true
1
parser/standard-next))
(set! word-size
(standard-frame 'HALT 2)
(standard-frame 'JOIN-STACKLETS 2)
(standard-frame 'POP-RETURN-ERROR 2)
- (standard-frame 'REENTER-COMPILED-CODE 2)
(standard-frame 'RESTORE-VALUE 2)
- (standard-frame 'COMPILER-INTERRUPT-RESTART 3)
- (standard-frame 'COMPILER-LINK-CACHES-RESTART 8)
-\f
+
(standard-subproblem 'IN-PACKAGE-CONTINUE 2)
(standard-subproblem 'ACCESS-CONTINUE 2)
(standard-subproblem 'PRIMITIVE-COMBINATION-1-APPLY 2)
(standard-subproblem 'REPEAT-DISPATCH 4)
(standard-subproblem 'PRIMITIVE-COMBINATION-3-FIRST-OPERAND 4)
(standard-subproblem 'PRIMITIVE-COMBINATION-3-APPLY 4)
- (standard-subproblem 'COMPILER-REFERENCE-RESTART 4)
- (standard-subproblem 'COMPILER-SAFE-REFERENCE-RESTART 4)
- (standard-subproblem 'COMPILER-ACCESS-RESTART 4)
- (standard-subproblem 'COMPILER-UNASSIGNED?-RESTART 4)
- (standard-subproblem 'COMPILER-UNBOUND?-RESTART 4)
- (standard-subproblem 'COMPILER-REFERENCE-TRAP-RESTART 4)
- (standard-subproblem 'COMPILER-SAFE-REFERENCE-TRAP-RESTART 4)
- (standard-subproblem 'COMPILER-UNASSIGNED?-TRAP-RESTART 4)
- (standard-subproblem 'COMPILER-ASSIGNMENT-RESTART 5)
- (standard-subproblem 'COMPILER-DEFINITION-RESTART 5)
- (standard-subproblem 'COMPILER-ASSIGNMENT-TRAP-RESTART 5)
(standard-subproblem 'MOVE-TO-ADJACENT-POINT 6)
(standard-subproblem 'COMBINATION-SAVE-VALUE length/combination-save-value)
(standard-subproblem 'REPEAT-PRIMITIVE length/repeat-primitive)
(standard-subproblem 'COMBINATION-APPLY length)
(standard-subproblem 'INTERNAL-APPLY length)
(standard-subproblem 'INTERNAL-APPLY-VAL length))
+\f
+ (let ((compiler-frame
+ (lambda (name length)
+ (stack-frame-type name false true length parser/standard-next)))
+ (compiler-subproblem
+ (lambda (name length)
+ (stack-frame-type name true true length parser/standard-next))))
+
+ (let ((length (length/application-frame 4 0)))
+ (compiler-subproblem 'COMPILER-LOOKUP-APPLY-TRAP-RESTART length)
+ (compiler-subproblem 'COMPILER-OPERATOR-LOOKUP-TRAP-RESTART length))
+
+ (compiler-frame 'COMPILER-INTERRUPT-RESTART 3) (compiler-frame 'COMPILER-LINK-CACHES-RESTART 8)
+ (compiler-frame 'REENTER-COMPILED-CODE 2)
+
+ (compiler-subproblem 'COMPILER-ACCESS-RESTART 4)
+ (compiler-subproblem 'COMPILER-ASSIGNMENT-RESTART 5)
+ (compiler-subproblem 'COMPILER-ASSIGNMENT-TRAP-RESTART 5)
+ (compiler-subproblem 'COMPILER-DEFINITION-RESTART 5)
+ (compiler-subproblem 'COMPILER-LOOKUP-APPLY-RESTART
+ (length/application-frame 4 1))
+ (compiler-subproblem 'COMPILER-REFERENCE-RESTART 4)
+ (compiler-subproblem 'COMPILER-REFERENCE-TRAP-RESTART 4)
+ (compiler-subproblem 'COMPILER-SAFE-REFERENCE-RESTART 4)
+ (compiler-subproblem 'COMPILER-SAFE-REFERENCE-TRAP-RESTART 4)
+ (compiler-subproblem 'COMPILER-UNASSIGNED?-RESTART 4)
+ (compiler-subproblem 'COMPILER-UNASSIGNED?-TRAP-RESTART 4)
+ (compiler-subproblem 'COMPILER-UNBOUND?-RESTART 4))
- (standard-subproblem 'COMPILER-LOOKUP-APPLY-RESTART
- (length/application-frame 4 1))
-
- (let ((length (length/application-frame 4 0)))
- (standard-subproblem 'COMPILER-LOOKUP-APPLY-TRAP-RESTART length)
- (standard-subproblem 'COMPILER-OPERATOR-LOOKUP-TRAP-RESTART length))
(stack-frame-type 'HARDWARE-TRAP
true
false