unsigned long n_linked_entries;
} link_cc_state_t;
-/* Ways to bypass the interpreter */
+/* Ways to bypass the interpreter. Matches
+ code/special-compiled/... in runtime/conpar.scm. */
typedef enum
{
REFLECT_CODE_INTERNAL_APPLY,
REFLECT_CODE_RESTORE_INTERRUPT_MASK,
REFLECT_CODE_STACK_MARKER,
- REFLECT_CODE_CC_BKPT
+ REFLECT_CODE_CC_BKPT,
+ REFLECT_CODE_UNUSED_4, /* Formerly used for v8 microcode. */
+ REFLECT_CODE_UNUSED_5,
+ REFLECT_CODE_APPLY_COMPILED,
+ REFLECT_CODE_UNUSED_7,
} reflect_code_t;
#define PUSH_REFLECTION(code) do \
}
PRIMITIVE_ABORT (code);
}
- /* Pun: procedure is being invoked as a return address. Assumes
- that the primitive is being called from compiled code. */
STACK_PUSH (procedure);
+ PUSH_REFLECTION (REFLECT_CODE_APPLY_COMPILED);
}
\f
/* Adjust the stack frame for applying a compiled procedure. Returns
switch (OBJECT_DATUM (code))
{
+ case REFLECT_CODE_APPLY_COMPILED:
+ {
+ SCHEME_OBJECT procedure = (STACK_POP ());
+ RETURN_TO_SCHEME (CC_ENTRY_ADDRESS (procedure));
+ }
+
case REFLECT_CODE_INTERNAL_APPLY:
{
unsigned long frame_size = (OBJECT_DATUM (STACK_POP ()));
(parser-state/next-control-point state)
(parser-state/previous-type state))))
+;; reflect_to_interface codes. Matches enum reflect_code_t in
+;; microcode/cmpint.c.
(define-integrable code/special-compiled/internal-apply 0)
(define-integrable code/special-compiled/restore-interrupt-mask 1)
(define-integrable code/special-compiled/stack-marker 2)