[webkit-dev] Bytecode Sequence for function.apply()

Oliver Hunt oliver at apple.com
Thu May 20 09:37:05 PDT 2010

If you have a debug build of jsc, you can run 'jsc -d' and that will dump the generated bytecode


On May 20, 2010, at 8:42 AM, Nyx wrote:

> I've been working on a tool to generate a trace of JavaScript executions,
> built on JavaScriptCore. I'm trying to log calls to all functions and their
> arguments. To do this, I've instrumented the op_call and op_call_varargs
> bytecodes in Interpreter.cpp.
> The problem I'm having is that if someone calls a native/host function
> through apply, I don't see the call. For example, the call:
> string.fromCharCode.apply(null, [65, 66, 67]);
> Doesn't seem to correspond to an op_call or op_call_varargs, so I'm
> wondering how this is handled in JavaScriptCore, what kind of bytecodes
> generated, and if somebody has any idea what I could do to log the "unseen"
> calls to native functions, short of instrumenting every native function in
> WebKit.
> -- 
> View this message in context: http://old.nabble.com/Bytecode-Sequence-for-function.apply%28%29-tp28623075p28623075.html
> Sent from the Webkit mailing list archive at Nabble.com.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

More information about the webkit-dev mailing list