diff options
Diffstat (limited to 'Source/JavaScriptCore/bytecode/StructureStubInfo.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/StructureStubInfo.cpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp index 5ec2a3f..4d59ac1 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "StructureStubInfo.h" +#include "JSObject.h" #include "ScopeChain.h" namespace JSC { @@ -43,7 +44,6 @@ void StructureStubInfo::deref() return; case access_get_by_id_chain: u.getByIdChain.baseObjectStructure->deref(); - u.getByIdChain.chain->deref(); return; case access_get_by_id_self_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; @@ -60,7 +60,6 @@ void StructureStubInfo::deref() case access_put_by_id_transition: u.putByIdTransition.previousStructure->deref(); u.putByIdTransition.structure->deref(); - u.putByIdTransition.chain->deref(); return; case access_put_by_id_replace: u.putByIdReplace.baseObjectStructure->deref(); @@ -77,6 +76,42 @@ void StructureStubInfo::deref() ASSERT_NOT_REACHED(); } } + +void StructureStubInfo::markAggregate(MarkStack& markStack) +{ + switch (accessType) { + case access_get_by_id_self: + return; + case access_get_by_id_proto: + return; + case access_get_by_id_chain: + return; + case access_get_by_id_self_list: { + PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; + polymorphicStructures->markAggregate(markStack, u.getByIdSelfList.listSize); + return; + } + case access_get_by_id_proto_list: { + PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList; + polymorphicStructures->markAggregate(markStack, u.getByIdProtoList.listSize); + return; + } + case access_put_by_id_transition: + return; + case access_put_by_id_replace: + return; + case access_get_by_id: + case access_put_by_id: + case access_get_by_id_generic: + case access_put_by_id_generic: + case access_get_array_length: + case access_get_string_length: + // These instructions don't ref their Structures. + return; + default: + ASSERT_NOT_REACHED(); + } +} #endif } // namespace JSC |