diff options
Diffstat (limited to 'Source/JavaScriptCore/bytecode/StructureStubInfo.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/StructureStubInfo.cpp | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp index 4d59ac1..be5760a 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp @@ -35,42 +35,28 @@ namespace JSC { void StructureStubInfo::deref() { switch (accessType) { - case access_get_by_id_self: - u.getByIdSelf.baseObjectStructure->deref(); - return; - case access_get_by_id_proto: - u.getByIdProto.baseObjectStructure->deref(); - u.getByIdProto.prototypeStructure->deref(); - return; - case access_get_by_id_chain: - u.getByIdChain.baseObjectStructure->deref(); - return; case access_get_by_id_self_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; - polymorphicStructures->derefStructures(u.getByIdSelfList.listSize); delete polymorphicStructures; return; } case access_get_by_id_proto_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList; - polymorphicStructures->derefStructures(u.getByIdProtoList.listSize); delete polymorphicStructures; return; } + case access_get_by_id_self: + case access_get_by_id_proto: + case access_get_by_id_chain: case access_put_by_id_transition: - u.putByIdTransition.previousStructure->deref(); - u.putByIdTransition.structure->deref(); - return; case access_put_by_id_replace: - u.putByIdReplace.baseObjectStructure->deref(); - 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. + // These instructions don't have to release any allocated memory return; default: ASSERT_NOT_REACHED(); @@ -81,10 +67,15 @@ void StructureStubInfo::markAggregate(MarkStack& markStack) { switch (accessType) { case access_get_by_id_self: + markStack.append(&u.getByIdSelf.baseObjectStructure); return; case access_get_by_id_proto: + markStack.append(&u.getByIdProto.baseObjectStructure); + markStack.append(&u.getByIdProto.prototypeStructure); return; case access_get_by_id_chain: + markStack.append(&u.getByIdChain.baseObjectStructure); + markStack.append(&u.getByIdChain.chain); return; case access_get_by_id_self_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; @@ -97,8 +88,12 @@ void StructureStubInfo::markAggregate(MarkStack& markStack) return; } case access_put_by_id_transition: + markStack.append(&u.putByIdTransition.previousStructure); + markStack.append(&u.putByIdTransition.structure); + markStack.append(&u.putByIdTransition.chain); return; case access_put_by_id_replace: + markStack.append(&u.putByIdReplace.baseObjectStructure); return; case access_get_by_id: case access_put_by_id: @@ -106,7 +101,7 @@ void StructureStubInfo::markAggregate(MarkStack& markStack) case access_put_by_id_generic: case access_get_array_length: case access_get_string_length: - // These instructions don't ref their Structures. + // These instructions don't need to mark anything return; default: ASSERT_NOT_REACHED(); |