Bug 122757 - Transition *switch* and *scope* JITStubs to JIT operations
Summary: Transition *switch* and *scope* JITStubs to JIT operations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 122287
  Show dependency treegraph
 
Reported: 2013-10-14 09:53 PDT by Mark Lam
Modified: 2013-10-14 20:03 PDT (History)
5 users (show)

See Also:


Attachments
the patch. (30.44 KB, patch)
2013-10-14 16:02 PDT, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2013-10-14 09:53:13 PDT
Transitioning:
    cti_op_switch_char
    cti_op_switch_imm
    cti_op_switch_string
    cti_op_resolve_scope
    cti_op_get_from_scope
    cti_op_put_to_scope
Comment 1 Mark Lam 2013-10-14 16:02:46 PDT
Created attachment 214202 [details]
the patch.
Comment 2 Geoffrey Garen 2013-10-14 19:35:14 PDT
Comment on attachment 214202 [details]
the patch.

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

Needs some fixes before landing.

> Source/JavaScriptCore/jit/JITOpcodes32_64.cpp:1009
> +    ASSERT(returnValueRegister == regT0);
>      jump(regT0);

Please use returnValueRegister in the jump, and remove the ASSERT.

> Source/JavaScriptCore/jit/JITOpcodes32_64.cpp:1026
> +    ASSERT(returnValueRegister == regT0);
>      jump(regT0);

Ditto.

> Source/JavaScriptCore/jit/JITOpcodes32_64.cpp:1042
> +    ASSERT(returnValueRegister == regT0);
>      jump(regT0);

Ditto.

> Source/JavaScriptCore/jit/JITOpcodes.cpp:695
> +    emitGetVirtualRegister(scrutinee, regT1);
> +    callOperation(operationSwitchImmWithUnknownKeyType, regT1, tableIndex);

This should be regT0.

> Source/JavaScriptCore/jit/JITOpcodes.cpp:697
> +    ASSERT(returnValueRegister == regT0);
>      jump(regT0);

This should be returnValueRegister.

> Source/JavaScriptCore/jit/JITOpcodes.cpp:712
> +    emitGetVirtualRegister(scrutinee, regT1);
> +    callOperation(operationSwitchCharWithUnknownKeyType, regT1, tableIndex);

regT0.

> Source/JavaScriptCore/jit/JITOpcodes.cpp:714
> +    ASSERT(returnValueRegister == regT0);
>      jump(regT0);

returnValueRegister.

> Source/JavaScriptCore/jit/JITOpcodes.cpp:730
> +    emitGetVirtualRegister(scrutinee, regT1);
> +    callOperation(operationSwitchStringWithUnknownKeyType, regT1, tableIndex);
> +    ASSERT(returnValueRegister == regT0);
>      jump(regT0);

Ditto.
Comment 3 Mark Lam 2013-10-14 20:03:35 PDT
Thanks for the review.  Remaining issues have been fixed.  Landed in r157439: <http://trac.webkit.org/r157439>.