pike.git/
src/
interpret_functions.h
Branch:
Tag:
Non-build tags
All tags
No tags
2017-11-18
2017-11-18 10:13:13 by Arne Goedeke <el@laramies.com>
ed7cdbf4c72739bda841e6e79073a65ce29d3854 (
24
lines) (+
3
/-
21
)
[
Show
|
Annotate
]
Branch:
arne/faster_calls_again
Interpreter: add tracing back into the new API
2603:
struct svalue *expected_stack=Pike_sp-args_; \ struct svalue *s; \ s = &Pike_fp->context->prog->constants[arg1].sval; \
-
if(
Pike
_
interpreter.trace
_
level
)
\
-
{
\
+
if(
PIKE
_
NEEDS
_
TRACE(
)
)
\
do_trace_efun_call(s, args_); \
-
} \
-
if (PIKE_FN_START_ENABLED()) { \
-
/* DTrace enter probe \
-
arg0: function name \
-
arg1: object \
-
*/ \
-
PIKE_FN_START(s->u.efun->name->size_shift == 0 ? \
-
s->u.efun->name->str : "[widestring fn name]", \
-
""); \
-
} \
+
(*(s->u.efun->function))(args_); \ DO_IF_PROFILING (s->u.efun->runs++); \ if(Pike_sp != expected_stack + !s->u.efun->may_return_void) \
2635:
Pike_fatal("Void function returned with a value on the stack: %s %d\n", \ s->u.efun->name->str, s->u.efun->may_return_void); \ } \
-
if(
Pike
_
interpreter.trace
_
level>1
)
{
\
+
if
(
PIKE
_
NEEDS
_
TRACE(
)
)
\
do_trace_efun_return(s, Pike_sp>expected_stack); \
-
} \
-
if (PIKE_FN_DONE_ENABLED()) { \
-
/* DTrace leave probe \
-
arg0: function name \
-
*/ \
-
PIKE_FN_DONE(s->u.efun->name->size_shift == 0 ? \
-
s->u.efun->name->str : "[widestring fn name]"); \
-
} \
+
}while(0) #else #define DO_CALL_BUILTIN(ARGS) do { \