pike.git/
src/
interpret.c
Branch:
Tag:
Non-build tags
All tags
No tags
2017-11-18
2017-11-18 10:14:46 by Arne Goedeke <el@laramies.com>
50a2cbfed2f02c008e9ff140b3c88e36231f4185 (
11
lines) (+
7
/-
4
)
[
Show
|
Annotate
]
Branch:
arne/faster_calls_again
Interpreter: some refactoring and extra debug
2201:
/* We can reuse the current frame, so we set it into C here * to allow callsite_resolve_* to pick it up */
-
if (
!(
frame
->flags & PIKE
_
FRAME
_
NO_REUSE) &&
frame
->refs == 1
)
{
+
if (frame_
can
_
reuse(
frame)
)
C.frame = frame;
-
}
+
switch (type) { case APPLY_STACK:
2246:
callsite_init(&C, args);
-
if (
!(
frame
->flags & PIKE
_
FRAME
_
NO_REUSE) &&
frame
->refs == 1
)
{
+
if (frame_
can
_
reuse(
frame)
)
C.frame = frame;
-
}
+
callsite_resolve_identifier(&C, o, fun);
3403:
frame->current_object = o; frame->current_program = p; } else {
+
#ifdef PIKE_DEBUG
+
if (!frame_can_reuse(frame))
+
Pike_error("Invalid frame reused in tailcall.\n");
+
#endif
if (o != frame->current_object) { free_object(frame->current_object); add_ref(frame->current_object = o);