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


Ignore:
Timestamp:
Oct 31, 2014, 2:27:10 PM (11 years ago)
Author:
[email protected]
Message:

Add scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope
https://bugs.webkit.org/show_bug.cgi?id=138252

Reviewed by Geoffrey Garen.

Added scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope.
Although the scope register is filled in with the ScopeChain register for all
three bytecodes, this operand is not used in the processing of the bytecodes.
That will be addressed in a future patch.

  • bytecode/BytecodeList.json: Lengthened the three bytecodes.
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode): Added code to dump the scope operand.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPopScope):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::emitPopScopes):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::scopeRegister):
Added scope register to these emit functions and the bytecodes they emit.
New m_scopeRegister and accessor.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::TryNode::emitBytecode):
Created a RegisterID for the ScopeChain register and used it to emit the updated
bytecodes.

  • jit/JITOpcodes.cpp:

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

  • jit/JITOpcodes32_64.cpp:

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

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:

Updated the operand indecies for the processing of the updated bytecodes.

Location:
trunk/Source/JavaScriptCore/llint
Files:
2 edited

Legend:

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

    r174359 r175426  
    12701270{
    12711271    LLINT_BEGIN();
    1272     JSValue v = LLINT_OP_C(1).jsValue();
     1272    JSValue v = LLINT_OP_C(2).jsValue();
    12731273    JSObject* o = v.toObject(exec);
    12741274    LLINT_CHECK_EXCEPTION();
    1275    
     1275
    12761276    exec->setScope(JSWithScope::create(exec, o));
    12771277   
     
    12901290    LLINT_BEGIN();
    12911291    CodeBlock* codeBlock = exec->codeBlock();
    1292     JSNameScope::Type type = static_cast<JSNameScope::Type>(pc[4].u.operand);
    1293     JSNameScope* scope = JSNameScope::create(exec, codeBlock->identifier(pc[1].u.operand), LLINT_OP(2).jsValue(), pc[3].u.operand, type);
     1292    JSNameScope::Type type = static_cast<JSNameScope::Type>(pc[5].u.operand);
     1293    JSNameScope* scope = JSNameScope::create(exec, codeBlock->identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type);
    12941294    exec->setScope(scope);
    12951295    LLINT_END();
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r174226 r175426  
    12361236    traceExecution()
    12371237    callSlowPath(_llint_slow_path_push_with_scope)
     1238    dispatch(3)
     1239
     1240
     1241_llint_op_pop_scope:
     1242    traceExecution()
     1243    callSlowPath(_llint_slow_path_pop_scope)
    12381244    dispatch(2)
    12391245
    12401246
    1241 _llint_op_pop_scope:
    1242     traceExecution()
    1243     callSlowPath(_llint_slow_path_pop_scope)
    1244     dispatch(1)
    1245 
    1246 
    12471247_llint_op_push_name_scope:
    12481248    traceExecution()
    12491249    callSlowPath(_llint_slow_path_push_name_scope)
    1250     dispatch(5)
     1250    dispatch(6)
    12511251
    12521252
Note: See TracChangeset for help on using the changeset viewer.