Changeset 175509 in webkit for trunk/Source/JavaScriptCore/llint


Ignore:
Timestamp:
Nov 3, 2014, 7:53:18 PM (11 years ago)
Author:
[email protected]
Message:

Update scope related slow path code to use scope register added to opcodes
https://bugs.webkit.org/show_bug.cgi?id=138254

Reviewed by Mark Lam.

Updated slow paths for op_pop_scope, op_push_name_scope and op_push_with_scope.
Added scope register index parameter to the front of the relevant argument lists of the
slow functions. In the case of op_push_name_scope for x86 (32 bit), there aren't enough
registers to accomodate all the parameters. Therefore, added two new JSVALUE32_64 slow
paths called operationPushCatchScope() and operationPushFunctionNameScope() to eliminate
the last "type" argument.

  • assembler/MacroAssemblerCodeRef.h:

(JSC::FunctionPtr::FunctionPtr): Added a new template to take 6 arguments.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperation):
New variants of setupArgumentsWithExecState() and callOperation() to handle the new
combinations of argument types and counts.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
Use the new slow paths.

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

Updates to set the scope result using the scope register index. Added operationPushCatchScope()
and operationPushFunctionNameScope().

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Updated the scope slow paths to use the scope register index in the instruction to read and
write the register instead of using CallFrame::scope() and CallFrame::setScope().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r175471 r175509  
    12741274    LLINT_CHECK_EXCEPTION();
    12751275
    1276     exec->setScope(JSWithScope::create(exec, o));
     1276    exec->uncheckedR(pc[1].u.operand) = JSWithScope::create(exec, o);
    12771277   
    12781278    LLINT_END();
     
    12821282{
    12831283    LLINT_BEGIN();
    1284     exec->setScope(exec->scope()->next());
     1284    int scopeReg = pc[1].u.operand;
     1285    JSScope* scope = exec->uncheckedR(scopeReg).Register::scope();
     1286    exec->uncheckedR(scopeReg) = scope->next();
    12851287    LLINT_END();
    12861288}
     
    12921294    JSNameScope::Type type = static_cast<JSNameScope::Type>(pc[5].u.operand);
    12931295    JSNameScope* scope = JSNameScope::create(exec, codeBlock->identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type);
    1294     exec->setScope(scope);
     1296    exec->uncheckedR(pc[1].u.operand) = scope;
    12951297    LLINT_END();
    12961298}
Note: See TracChangeset for help on using the changeset viewer.