Ignore:
Timestamp:
Feb 23, 2015, 1:54:15 PM (11 years ago)
Author:
[email protected]
Message:

Scopes should always be created with a previously-created symbol table rather than creating one on the fly
https://bugs.webkit.org/show_bug.cgi?id=141915

Reviewed by Mark Lam.

The main effect of this change is that pushing name scopes no longer requires creating symbol
tables on the fly.

This also makes it so that JSEnvironmentRecords must always have an a priori symbol table.

JSSegmentedVariableObject still does a hack where it creates a blank symbol table on-demand.
This is needed because that's what JSGlobalObject and all of its many subclasses want. That's
harmless; I mainly needed a prior symbol tables for JSEnvironmentRecords anyway.

  • bytecode/BytecodeList.json:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

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

(JSC::JIT::callOperation):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_push_name_scope):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_push_name_scope):

  • jit/JITOperations.cpp:

(JSC::pushNameScope):

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

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • runtime/Executable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

  • runtime/JSCatchScope.h:

(JSC::JSCatchScope::JSCatchScope):
(JSC::JSCatchScope::create):

  • runtime/JSEnvironmentRecord.h:

(JSC::JSEnvironmentRecord::JSEnvironmentRecord):

  • runtime/JSFunctionNameScope.h:

(JSC::JSFunctionNameScope::JSFunctionNameScope):
(JSC::JSFunctionNameScope::create):

  • runtime/JSNameScope.cpp:

(JSC::JSNameScope::create):

  • runtime/JSNameScope.h:

(JSC::JSNameScope::create):
(JSC::JSNameScope::finishCreation):
(JSC::JSNameScope::JSNameScope):

  • runtime/JSSegmentedVariableObject.h:

(JSC::JSSegmentedVariableObject::finishCreation):

  • runtime/JSSymbolTableObject.h:

(JSC::JSSymbolTableObject::JSSymbolTableObject):
(JSC::JSSymbolTableObject::finishCreation): Deleted.

  • runtime/SymbolTable.h:

(JSC::SymbolTable::createNameScopeTable):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.h

    r180460 r180514  
    3838    friend class JSNameScope;
    3939   
    40     JSFunctionNameScope(VM& vm, JSGlobalObject* globalObject, JSScope* next)
    41         : Base(vm, globalObject->catchScopeStructure(), next)
     40    JSFunctionNameScope(VM& vm, JSGlobalObject* globalObject, JSScope* next, SymbolTable* symbolTable)
     41        : Base(vm, globalObject->catchScopeStructure(), next, symbolTable)
    4242    {
    4343    }
    4444   
    4545public:
    46     static JSFunctionNameScope* create(VM& vm, JSGlobalObject* globalObject, JSScope* currentScope, const Identifier& identifier, JSValue value, unsigned attributes)
     46    static JSFunctionNameScope* create(VM& vm, JSGlobalObject* globalObject, JSScope* currentScope, SymbolTable* symbolTable, JSValue value)
    4747    {
    48         return Base::create<JSFunctionNameScope>(vm, globalObject, currentScope, identifier, value, attributes);
     48        return Base::create<JSFunctionNameScope>(vm, globalObject, currentScope, symbolTable, value);
    4949    }
    5050   
Note: See TracChangeset for help on using the changeset viewer.