MapData and WeakMapData don't need to be objects
https://bugs.webkit.org/show_bug.cgi?id=121167
Patch by Sam Weinig <[email protected]> on 2013-09-11
Reviewed by Geoffrey Garen.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
- runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::mapStructure):
Remove MapData and WeakMapData structures (they moved to VM with other non-object Structures).
(JSC::JSMap::finishCreation):
(JSC::JSMap::create):
(JSC::JSSet::finishCreation):
(JSC::JSSet::create):
(JSC::JSWeakMap::finishCreation):
(JSC::JSWeakMap::create):
Update to not pass a global object to the MapData or WeakMapData Structure.
(JSC::MapData::MapData):
(JSC::MapData::create):
(JSC::MapData::createStructure):
(JSC::WeakMapData::WeakMapData):
(JSC::WeakMapData::set): Change to take a VM rather than a CallFrame, as that it all it needs.
(JSC::WeakMapData::create):
(JSC::WeakMapData::createStructure):
Instead of inheriting from JSDestructibleObject, inherit from JSCell and mark self as needing destruction
and having an immortal structure.
(JSC::VM::VM):
Add MapData and WeakMapData Structures.
- runtime/WeakMapPrototype.cpp:
(JSC::protoFuncWeakMapSet):
Pass a VM rather than an ExecState.