2011-02-28 Oliver Hunt <oliver@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2011 21:05:22 +0000 (21:05 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2011 21:05:22 +0000 (21:05 +0000)
commitb85feccdc769290e2e166291d191d1e7602410a6
treebaddd8f5e9ea58baac2a7c63bcafe17f4b53b5d1
parent3e8894dff1b77296fc082abfd7fea098cca63fdc
2011-02-28  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Make ScopeChainNode GC allocated
        https://bugs.webkit.org/show_bug.cgi?id=55283

        Simplify lifetime and other issues with the scopechain
        by making it gc allocated.  This allows us to simplify
        function exit and unwinding, as well as making the
        current iterative refcounting go away.

        * JavaScriptCore.exp:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::createActivation):
        * bytecode/StructureStubInfo.cpp:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::generate):
        (JSC::BytecodeGenerator::BytecodeGenerator):
        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
        * bytecompiler/BytecodeGenerator.h:
        * debugger/Debugger.cpp:
        (JSC::Recompiler::operator()):
        * debugger/DebuggerCallFrame.h:
        (JSC::DebuggerCallFrame::scopeChain):
        * interpreter/CachedCall.h:
        (JSC::CachedCall::CachedCall):
        * interpreter/CallFrame.h:
        * interpreter/Interpreter.cpp:
        (JSC::depth):
        (JSC::Interpreter::unwindCallFrame):
        (JSC::Interpreter::throwException):
        (JSC::Interpreter::execute):
        (JSC::Interpreter::executeCall):
        (JSC::Interpreter::executeConstruct):
        (JSC::Interpreter::privateExecute):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCall):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::emit_op_ret):
        (JSC::JIT::emit_op_ret_object_or_this):
        (JSC::JIT::compileOpCall):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_end):
        (JSC::JIT::emit_op_ret):
        (JSC::JIT::emit_op_ret_object_or_this):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_end):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/JITStubs.h:
        * runtime/ArgList.cpp:
        * runtime/Completion.cpp:
        (JSC::evaluate):
        * runtime/Completion.h:
        * runtime/DateConversion.cpp:
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileInternal):
        (JSC::ProgramExecutable::compileInternal):
        (JSC::FunctionExecutable::compileForCallInternal):
        (JSC::FunctionExecutable::compileForConstructInternal):
        * runtime/FunctionConstructor.cpp:
        (JSC::constructFunction):
        * runtime/GCActivityCallbackCF.cpp:
        * runtime/Identifier.cpp:
        * runtime/JSCell.h:
        * runtime/JSChunk.cpp: Added.
        * runtime/JSChunk.h: Added.
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):
        (JSC::JSFunction::markChildren):
        (JSC::JSFunction::getCallData):
        (JSC::JSFunction::getOwnPropertySlot):
        (JSC::JSFunction::getConstructData):
        * runtime/JSFunction.h:
        (JSC::JSFunction::scope):
        (JSC::JSFunction::setScope):
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::init):
        (JSC::JSGlobalObject::markChildren):
        * runtime/JSGlobalObject.h:
        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
        (JSC::JSGlobalObject::globalScopeChain):
        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::globalFuncEval):
        * runtime/JSLock.cpp:
        * runtime/JSNumberCell.cpp:
        * runtime/JSZombie.cpp:
        * runtime/MarkedBlock.cpp:
        * runtime/MarkedSpace.cpp:
        * runtime/PropertyNameArray.cpp:
        * runtime/ScopeChain.cpp:
        (JSC::ScopeChainNode::print):
        (JSC::ScopeChainNode::localDepth):
        (JSC::ScopeChainNode::markChildren):
        * runtime/ScopeChain.h:
        (JSC::ScopeChainNode::ScopeChainNode):
        (JSC::ScopeChainNode::createStructure):
        (JSC::ScopeChainNode::push):
        (JSC::ScopeChainNode::pop):
        (JSC::ScopeChainIterator::ScopeChainIterator):
        (JSC::ScopeChainIterator::operator*):
        (JSC::ScopeChainIterator::operator->):
        (JSC::ScopeChainIterator::operator++):
        (JSC::ScopeChainNode::begin):
        (JSC::ScopeChainNode::end):
        (JSC::ExecState::globalData):
        (JSC::ExecState::lexicalGlobalObject):
        (JSC::ExecState::globalThisValue):
        * runtime/ScopeChainMark.h:
        * wtf/DateMath.cpp:
2011-02-28  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Make ScopeChainNode GC allocated
        https://bugs.webkit.org/show_bug.cgi?id=55283

        Update WebCore to deal with the absence of the ScopeChain
        class.

        * ForwardingHeaders/runtime/ScopeChain.h: Added.
        * bindings/js/JSHTMLElementCustom.cpp:
        (WebCore::JSHTMLElement::pushEventHandlerScope):
        * bindings/js/JSJavaScriptCallFrameCustom.cpp:
        (WebCore::JSJavaScriptCallFrame::scopeChain):
        (WebCore::JSJavaScriptCallFrame::scopeType):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::initializeJSFunction):
        * bindings/js/JSMainThreadExecState.h:
        (WebCore::JSMainThreadExecState::evaluate):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::pushEventHandlerScope):
        * bindings/js/JavaScriptCallFrame.cpp:
        (WebCore::JavaScriptCallFrame::scopeChain):
        * bindings/js/JavaScriptCallFrame.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        * bridge/c/c_class.cpp:
        * bridge/c/c_runtime.cpp:
        * bridge/jni/JNIBridge.cpp:
        * bridge/qt/qt_runtime.cpp:
        (JSC::Bindings::QtConnectionObject::execute):
        * plugins/PluginViewNone.cpp:
2011-02-28  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Make ScopeChainNode GC allocated
        https://bugs.webkit.org/show_bug.cgi?id=55283

        More updates for the absence of the ScopeChain class

        * WebView/WebScriptDebugDelegate.mm:
        (-[WebScriptCallFrame scopeChain]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
63 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/StructureStubInfo.cpp
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
Source/JavaScriptCore/debugger/Debugger.cpp
Source/JavaScriptCore/debugger/DebuggerCallFrame.h
Source/JavaScriptCore/interpreter/CachedCall.h
Source/JavaScriptCore/interpreter/CallFrame.h
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/jit/JITCall.cpp
Source/JavaScriptCore/jit/JITCall32_64.cpp
Source/JavaScriptCore/jit/JITOpcodes.cpp
Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/jit/JITStubs.h
Source/JavaScriptCore/runtime/ArgList.cpp
Source/JavaScriptCore/runtime/Completion.cpp
Source/JavaScriptCore/runtime/Completion.h
Source/JavaScriptCore/runtime/DateConversion.cpp
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/FunctionConstructor.cpp
Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp
Source/JavaScriptCore/runtime/Identifier.cpp
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSChunk.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSChunk.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.h
Source/JavaScriptCore/runtime/JSGlobalData.cpp
Source/JavaScriptCore/runtime/JSGlobalData.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
Source/JavaScriptCore/runtime/JSLock.cpp
Source/JavaScriptCore/runtime/JSNumberCell.cpp
Source/JavaScriptCore/runtime/JSZombie.cpp
Source/JavaScriptCore/runtime/MarkedBlock.cpp
Source/JavaScriptCore/runtime/MarkedSpace.cpp
Source/JavaScriptCore/runtime/PropertyNameArray.cpp
Source/JavaScriptCore/runtime/ScopeChain.cpp
Source/JavaScriptCore/runtime/ScopeChain.h
Source/JavaScriptCore/runtime/ScopeChainMark.h
Source/JavaScriptCore/wtf/DateMath.cpp
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/runtime/ScopeChain.h [new file with mode: 0644]
Source/WebCore/bindings/js/JSHTMLElementCustom.cpp
Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
Source/WebCore/bindings/js/JSLazyEventListener.cpp
Source/WebCore/bindings/js/JSMainThreadExecState.h
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/js/JavaScriptCallFrame.cpp
Source/WebCore/bindings/js/JavaScriptCallFrame.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bridge/c/c_class.cpp
Source/WebCore/bridge/c/c_runtime.cpp
Source/WebCore/bridge/jni/JNIBridge.cpp
Source/WebCore/bridge/qt/qt_runtime.cpp
Source/WebCore/plugins/PluginViewNone.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebScriptDebugDelegate.mm