Ignore:
Timestamp:
Oct 7, 2014, 11:57:57 AM (11 years ago)
Author:
[email protected]
Message:

Remove op_new_captured_func
https://bugs.webkit.org/show_bug.cgi?id=137491

Reviewed by Mark Lam.

Removes the op_captured_new_func opcode as part of the work
towards having any magical opcodes that write directly to
named "registers" and then have a follow on op to ensure that
the environment record correctly represents the stack state.

For this we add a non-captured scratch register so we don't
have to have any kind of magic opcode, and instead simply
have sensible creation and move semantics for capturing new
functions.

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitLazyNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionInternal):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_new_captured_func): Deleted.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL): Deleted.

  • runtime/CommonSlowPaths.h:
Location:
trunk/Source/JavaScriptCore/bytecode
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/BytecodeList.json

    r174226 r174401  
    9494            { "name" : "op_switch_string", "length" : 4 },
    9595            { "name" : "op_new_func", "length" : 4 },
    96             { "name" : "op_new_captured_func", "length" : 4 },
    9796            { "name" : "op_new_func_exp", "length" : 3 },
    9897            { "name" : "op_call", "length" : 9 },
  • trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h

    r174226 r174401  
    5959        return;
    6060    case op_new_func:
    61     case op_new_captured_func:
    6261    case op_create_lexical_environment:
    6362    case op_create_arguments:
     
    312311    case op_new_regexp:
    313312    case op_new_func:
    314     case op_new_captured_func:
    315313    case op_new_func_exp:
    316314    case op_call_varargs:
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r174371 r174401  
    12711271            break;
    12721272        }
    1273         case op_new_captured_func: {
    1274             int r0 = (++it)->u.operand;
    1275             int f0 = (++it)->u.operand;
    1276             printLocationAndOp(out, exec, location, it, "new_captured_func");
    1277             out.printf("%s, f%d", registerName(r0).data(), f0);
    1278             ++it;
    1279             break;
    1280         }
    12811273        case op_new_func_exp: {
    12821274            int r0 = (++it)->u.operand;
     
    21032095
    21042096            instructions[i + 2].u.location = location;
    2105             break;
    2106         }
    2107 
    2108         case op_new_captured_func: {
    2109             if (pc[3].u.index == UINT_MAX) {
    2110                 instructions[i + 3].u.watchpointSet = 0;
    2111                 break;
    2112             }
    2113             StringImpl* uid = identifier(pc[3].u.index).impl();
    2114             RELEASE_ASSERT(didCloneSymbolTable);
    2115             ConcurrentJITLocker locker(m_symbolTable->m_lock);
    2116             SymbolTable::Map::iterator iter = m_symbolTable->find(locker, uid);
    2117             ASSERT(iter != m_symbolTable->end(locker));
    2118             iter->value.prepareToWatch(symbolTable());
    2119             instructions[i + 3].u.watchpointSet = iter->value.watchpointSet();
    21202097            break;
    21212098        }
     
    39003877        case op_init_lazy_reg:
    39013878        case op_create_arguments:
    3902         case op_new_captured_func:
    39033879            return;
    39043880        default:
Note: See TracChangeset for help on using the changeset viewer.