Ignore:
Timestamp:
Jan 4, 2018, 7:54:40 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Remove LocalScope
https://bugs.webkit.org/show_bug.cgi?id=181206

Reviewed by Geoffrey Garen.

The last user of HandleStack and LocalScope is JSON. But MarkedArgumentBuffer is enough for their use.
This patch changes JSON parsing and stringifying to using MarkedArgumentBuffer. And remove HandleStack
and LocalScope.

We make Stringifier and Walker WTF_FORBID_HEAP_ALLOCATION to place them on the stack. So they can hold
JSObject* directly in their fields.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/HandleStack.cpp: Removed.
  • heap/HandleStack.h: Removed.
  • heap/Heap.cpp:

(JSC::Heap::addCoreConstraints):

  • heap/Heap.h:

(JSC::Heap::handleSet):
(JSC::Heap::handleStack): Deleted.

  • heap/Local.h: Removed.
  • heap/LocalScope.h: Removed.
  • runtime/JSONObject.cpp:

(JSC::Stringifier::Holder::object const):
(JSC::gap):
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::stringify):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::Holder):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::Walker):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
(JSC::JSONParse):
(JSC::JSONStringify):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Heap.h

    r226405 r226407  
    3131#include "GCRequest.h"
    3232#include "HandleSet.h"
    33 #include "HandleStack.h"
    3433#include "HeapFinalizerCallback.h"
    3534#include "HeapObserver.h"
     
    239238
    240239    HandleSet* handleSet() { return &m_handleSet; }
    241     HandleStack* handleStack() { return &m_handleStack; }
    242240
    243241    void willStartIterating();
     
    606604   
    607605    HandleSet m_handleSet;
    608     HandleStack m_handleStack;
    609606    std::unique_ptr<CodeBlockSet> m_codeBlocks;
    610607    std::unique_ptr<JITStubRoutineSet> m_jitStubRoutines;
Note: See TracChangeset for help on using the changeset viewer.