X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/b80e619319b1def83d1e8b4f84042b661be1be7f..14957cd040308e3eeec43d26bae5d76da13fcd85:/bytecode/StructureStubInfo.h diff --git a/bytecode/StructureStubInfo.h b/bytecode/StructureStubInfo.h index 8e2c489..7f11edd 100644 --- a/bytecode/StructureStubInfo.h +++ b/bytecode/StructureStubInfo.h @@ -58,34 +58,27 @@ namespace JSC { { } - void initGetByIdSelf(Structure* baseObjectStructure) + void initGetByIdSelf(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure) { accessType = access_get_by_id_self; - u.getByIdSelf.baseObjectStructure = baseObjectStructure; - baseObjectStructure->ref(); + u.getByIdSelf.baseObjectStructure.set(globalData, owner, baseObjectStructure); } - void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure) + void initGetByIdProto(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure, Structure* prototypeStructure) { accessType = access_get_by_id_proto; - u.getByIdProto.baseObjectStructure = baseObjectStructure; - baseObjectStructure->ref(); - - u.getByIdProto.prototypeStructure = prototypeStructure; - prototypeStructure->ref(); + u.getByIdProto.baseObjectStructure.set(globalData, owner, baseObjectStructure); + u.getByIdProto.prototypeStructure.set(globalData, owner, prototypeStructure); } - void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain) + void initGetByIdChain(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure, StructureChain* chain) { accessType = access_get_by_id_chain; - u.getByIdChain.baseObjectStructure = baseObjectStructure; - baseObjectStructure->ref(); - - u.getByIdChain.chain = chain; - chain->ref(); + u.getByIdChain.baseObjectStructure.set(globalData, owner, baseObjectStructure); + u.getByIdChain.chain.set(globalData, owner, chain); } void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize) @@ -106,29 +99,24 @@ namespace JSC { // PutById* - void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain) + void initPutByIdTransition(JSGlobalData& globalData, JSCell* owner, Structure* previousStructure, Structure* structure, StructureChain* chain) { accessType = access_put_by_id_transition; - u.putByIdTransition.previousStructure = previousStructure; - previousStructure->ref(); - - u.putByIdTransition.structure = structure; - structure->ref(); - - u.putByIdTransition.chain = chain; - chain->ref(); + u.putByIdTransition.previousStructure.set(globalData, owner, previousStructure); + u.putByIdTransition.structure.set(globalData, owner, structure); + u.putByIdTransition.chain.set(globalData, owner, chain); } - void initPutByIdReplace(Structure* baseObjectStructure) + void initPutByIdReplace(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure) { accessType = access_put_by_id_replace; - u.putByIdReplace.baseObjectStructure = baseObjectStructure; - baseObjectStructure->ref(); + u.putByIdReplace.baseObjectStructure.set(globalData, owner, baseObjectStructure); } void deref(); + void visitAggregate(SlotVisitor&); bool seenOnce() { @@ -145,15 +133,15 @@ namespace JSC { union { struct { - Structure* baseObjectStructure; + WriteBarrierBase baseObjectStructure; } getByIdSelf; struct { - Structure* baseObjectStructure; - Structure* prototypeStructure; + WriteBarrierBase baseObjectStructure; + WriteBarrierBase prototypeStructure; } getByIdProto; struct { - Structure* baseObjectStructure; - StructureChain* chain; + WriteBarrierBase baseObjectStructure; + WriteBarrierBase chain; } getByIdChain; struct { PolymorphicAccessStructureList* structureList; @@ -164,12 +152,12 @@ namespace JSC { int listSize; } getByIdProtoList; struct { - Structure* previousStructure; - Structure* structure; - StructureChain* chain; + WriteBarrierBase previousStructure; + WriteBarrierBase structure; + WriteBarrierBase chain; } putByIdTransition; struct { - Structure* baseObjectStructure; + WriteBarrierBase baseObjectStructure; } putByIdReplace; } u;