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

2010-05-25 Thread Nyx

How would I go about building jsc in debug mode? Is it possible to build a
standalone jsc shell?

I'm using Qt Webkit, with the bulld-webkit and run-webkit scripts.

Thank you for your help,

- Maxime


Oliver Hunt-2 wrote:
 
 If you have a debug build of jsc, you can run 'jsc -d' and that will dump
 the generated bytecode
 
 --Oliver
 
 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@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 

-- 
View this message in context: 
http://old.nabble.com/Bytecode-Sequence-for-function.apply%28%29-tp28623075p28673826.html
Sent from the Webkit mailing list archive at Nabble.com.

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


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

2010-05-25 Thread Ariya Hidayat
 How would I go about building jsc in debug mode? Is it possible to build a
 standalone jsc shell?

See https://lists.webkit.org/pipermail/webkit-qt/2010-January/89.html
for details.




-- 
Ariya Hidayat
http://www.linkedin.com/in/ariyahidayat
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


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

2010-05-25 Thread Nyx

Well, I ran build-webkit with the --debug option, and when I try to run
WebKit/WebKitBuild/Debug/JavaScriptCore/jsc , I get a failed assertion:

ASSERTION FAILED: !isHostFunctionNonInline()
(../../../JavaScriptCore/runtime/Executable.h:349 JSC::FunctionExecutable*
JSC::JSFunction::jsExecutable() const)

Is there a C++ I can call directly to get a bytecode dump of a JS function?

- Maxime


Ariya Hidayat wrote:
 
 How would I go about building jsc in debug mode? Is it possible to build
 a
 standalone jsc shell?
 
 See https://lists.webkit.org/pipermail/webkit-qt/2010-January/89.html
 for details.
 
 

-- 
View this message in context: 
http://old.nabble.com/Bytecode-Sequence-for-function.apply%28%29-tp28623075p28675341.html
Sent from the Webkit mailing list archive at Nabble.com.

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


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

2010-05-20 Thread Nyx

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@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


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

2010-05-20 Thread Oliver Hunt
If you have a debug build of jsc, you can run 'jsc -d' and that will dump the 
generated bytecode

--Oliver

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@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev