The required change to C_call_scheme is described but not implemented.
C_call_scheme has other problems(?). Preferring a rotated history to
a broken history (broken by a GC during a callback) for now.
#define CHECK_RETURN_CODE(code, offset) \
((CONT_RET (offset)) == (MAKE_RETURN_CODE (code)))
+#if 0
/* Saving history is required for C_call_scheme to work correctly
because the recursive call to Interpret() can rotate the history. */
PRIMITIVE_APPLY (primitive); \
history_register = APFI_saved_history; \
} while (0)
+
+#else
+/* C_call_scheme must save/restore history_register on/from the stack
+ so that it will be relocated if the call to Interpret() causes a
+ garbage collection. */
+
+#define APPLY_PRIMITIVE_FROM_INTERPRETER PRIMITIVE_APPLY
+
+#endif
\f
/* Stack manipulation */