Bug 125791

Summary: CStack Branch: Eliminate topOfStack parameter from callToJavaScript() and callToNativeFunction()
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch ggaren: review+

Description Michael Saboff 2013-12-16 11:19:21 PST
Since callToJavaScript() and callToNativeFunction() now use the C stack, the last Register* topOfStack parameter can be removed.
Comment 1 Michael Saboff 2013-12-16 11:23:20 PST
Created attachment 219335 [details]
Patch
Comment 2 Mark Lam 2013-12-16 12:54:22 PST
Comment on attachment 219335 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219335&action=review

> Source/JavaScriptCore/llint/LLIntThunks.h:44
> +    EncodedJSValue callToJavaScript(void*, ExecState**, ProtoCallFrame*);
> +    EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*);

The ExecState** argument doesn't agree with the VM* arg in LowLevelInterpreter.asm below.  Which is it supposed to be?
Comment 3 Geoffrey Garen 2013-12-16 13:07:05 PST
Comment on attachment 219335 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219335&action=review

r=me

> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:468
> +# EncodedJSValue callToJavaScript(void* code, VM* vm, ProtoCallFrame* protoFrame)
> +# EncodedJSValue callToNativeFunction(void* code, VM* vm, ProtoCallFrame* protoFrame)

Please change this from VM* to ExecState**. As Mark pointed out, this doesn't match our declaration. Callers pass &vm.topCallFrame, which is an ExecState**.
Comment 4 Michael Saboff 2013-12-16 13:28:33 PST
Committed r160660: <http://trac.webkit.org/changeset/160660>