[webkit-dev] Name of a JS function

Oliver Hunt oliver at apple.com
Tue Jun 16 11:01:13 PDT 2009


You can't really do it from within compilation, as the function name  
is part of the JS function object not the code, so none of the code  
representations actually have this information.  Your best bet would  
probably be to to do a printf in cti_op_call_JSFunction and have it  
print the name at that point (assuming you're trying to debug  
something).

--Oliver

On Jun 16, 2009, at 10:13 AM, Zoltan Herczeg wrote:

> Thank you. And how can I access it in JIT::privateCompileMainPass()? I
> could only find m_codeBlock->source()->url() and
> m_codeBlock->sourceOffset() methods, but I would prefer a readable
> identifier.
>
> Zoltan
>
>> Function objects have a property named "name", and also a property
>> named "displayName".
>>
>> Geoff
>>
>> On Jun 16, 2009, at 3:55 AM, Zoltan Herczeg wrote:
>>
>>> Hi,
>>>
>>> how can I extract the name of a JS function in JIT.cpp?
>>>
>>> Zoltan
>
>
> _______________________________________________
> 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