2011-03-15 Oliver Hunt <oliver@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2011 23:12:36 +0000 (23:12 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2011 23:12:36 +0000 (23:12 +0000)
commitf4ff7a26ee3162e04312e9aadcde2102ce718516
tree9418acd4cc65905bb4f7b9b63065e84735df14e3
parent11dd6d1d713cd4cf8453ff7a187ba0cf8b89d43b
2011-03-15  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Introduce Local<T> to allow us to start moving to precise marking of locals
        https://bugs.webkit.org/show_bug.cgi?id=56394

        Introduce a new handle type, Local<T> and a scoping mechanism
        LocalScope to allow us to start moving towards precise marking
        of temporaries and local variables.

        We also start to use the new Local<> type in the JSON stringifier
        so that we can have some coverage of their behaviour in the initial
        checkin.

        * GNUmakefile.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.pro:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * collector/handles/Handle.h:
        (JSC::::asObject):
        * collector/handles/HandleStack.cpp: Added.
        (JSC::HandleStack::HandleStack):
        (JSC::HandleStack::mark):
        (JSC::HandleStack::grow):
        * collector/handles/HandleStack.h: Added.
        (JSC::HandleStack::enterScope):
        (JSC::HandleStack::zapTo):
        (JSC::HandleStack::leaveScope):
        (JSC::HandleStack::push):
        * collector/handles/Local.h: Added.
        (JSC::Local::internalSet):
        (JSC::::Local):
        (JSC::::operator):
        (JSC::LocalStack::LocalStack):
        (JSC::LocalStack::peek):
        (JSC::LocalStack::pop):
        (JSC::LocalStack::push):
        (JSC::LocalStack::isEmpty):
        (JSC::LocalStack::size):
        * collector/handles/LocalScope.h: Added.
        (JSC::LocalScope::LocalScope):
        (JSC::LocalScope::~LocalScope):
        (JSC::LocalScope::release):
        * runtime/Heap.cpp:
        (JSC::Heap::markRoots):
        * runtime/Heap.h:
        (JSC::Heap::allocateLocalHandle):
        (JSC::Heap::handleStack):
        * runtime/JSCell.h:
        (JSC::JSCell::::getString):
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSC::JSGlobalData::allocateLocalHandle):
        * runtime/JSONObject.cpp:
        (JSC::Stringifier::Stringifier):
        (JSC::Stringifier::stringify):
        (JSC::Stringifier::appendStringifiedValue):
        (JSC::Stringifier::Holder::Holder):
        (JSC::Walker::Walker):
        (JSC::Walker::walk):
        (JSC::JSONProtoFuncParse):
        (JSC::JSONProtoFuncStringify):
        (JSC::JSONStringify):
        * runtime/JSONObject.h:
        * runtime/MarkStack.h:
        (JSC::MarkStack::appendValues):
        (JSC::MarkStack::appendSlots):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.pro
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/collector/handles/Handle.h
Source/JavaScriptCore/collector/handles/HandleStack.cpp [new file with mode: 0644]
Source/JavaScriptCore/collector/handles/HandleStack.h [new file with mode: 0644]
Source/JavaScriptCore/collector/handles/Local.h [new file with mode: 0644]
Source/JavaScriptCore/collector/handles/LocalScope.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/Heap.cpp
Source/JavaScriptCore/runtime/Heap.h
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSGlobalData.cpp
Source/JavaScriptCore/runtime/JSGlobalData.h
Source/JavaScriptCore/runtime/JSONObject.cpp
Source/JavaScriptCore/runtime/JSONObject.h
Source/JavaScriptCore/runtime/MarkStack.h