(define-integrable reflect-code:restore-interrupt-mask 1)
(define-integrable reflect-code:stack-marker 2)
(define-integrable reflect-code:compiled-code-bkpt 3)
-(define-integrable reflect-code:apply-compiled 6)
+(define-integrable reflect-code:compiled-invocation 8)
(define-rule statement
(INVOCATION:PRIMITIVE (? frame-size) (? continuation) (? primitive))
REFLECT_CODE_CC_BKPT,
REFLECT_CODE_UNUSED_4, /* Formerly used for v8 microcode. */
REFLECT_CODE_UNUSED_5,
- REFLECT_CODE_APPLY_COMPILED,
+ REFLECT_CODE_UNUSED_6,
REFLECT_CODE_UNUSED_7,
+ REFLECT_CODE_COMPILED_INVOCATION,
} reflect_code_t;
#define PUSH_REFLECTION(code) do \
PRIMITIVE_ABORT (code);
}
STACK_PUSH (procedure);
- PUSH_REFLECTION (REFLECT_CODE_APPLY_COMPILED);
+ PUSH_REFLECTION (REFLECT_CODE_COMPILED_INVOCATION);
}
\f
/* Adjust the stack frame for applying a compiled procedure. Returns
switch (OBJECT_DATUM (code))
{
- case REFLECT_CODE_APPLY_COMPILED:
+ case REFLECT_CODE_COMPILED_INVOCATION:
{
SCHEME_OBJECT procedure = (STACK_POP ());
RETURN_TO_SCHEME_ENTRY (CC_ENTRY_ADDRESS (procedure));
(define-integrable code/restore-regs 5)
(define-integrable code/apply-compiled 6)
(define-integrable code/continue-linking 7)
+(define-integrable code/special-compiled/compiled-invocation 8)
(define (parser/special-compiled type elements state)
(let ((code (vector-ref elements 1)))
(fix:= code code/interrupt-restart)
(fix:= code code/restore-regs)
(fix:= code code/apply-compiled)
- (fix:= code code/continue-linking))
+ (fix:= code code/continue-linking)
+ (fix:= code code/special-compiled/compiled-invocation))
(parse/standard-next type elements state #f #f))
(else
(error "Unknown special compiled frame code:" code)))))
;; block, environment, offset, last header offset,sections,
;; return address
(fix:- 10 1))
+ ((fix:= code code/special-compiled/compiled-invocation)
+ ;; Stream[2] is compiled entry, followed by arguments.
+ (let ((procedure (stream-ref stream 2)))
+ (cond ((compiled-code-address/frame-size procedure)
+ => (lambda (frame-size)
+ (+ 2 frame-size)))
+ (else (lose)))))
(else
(lose)))))
\f