namespace JSC {
+ enum AccessType {
+ access_get_by_id_self,
+ access_get_by_id_proto,
+ access_get_by_id_chain,
+ access_get_by_id_self_list,
+ access_get_by_id_proto_list,
+ access_put_by_id_transition,
+ access_put_by_id_replace,
+ access_get_by_id,
+ access_put_by_id,
+ access_get_by_id_generic,
+ access_put_by_id_generic,
+ access_get_array_length,
+ access_get_string_length,
+ };
+
struct StructureStubInfo {
- StructureStubInfo(OpcodeID opcodeID)
- : opcodeID(opcodeID)
+ StructureStubInfo(AccessType accessType)
+ : accessType(accessType)
+ , seen(false)
{
}
void initGetByIdSelf(Structure* baseObjectStructure)
{
- opcodeID = op_get_by_id_self;
+ accessType = access_get_by_id_self;
u.getByIdSelf.baseObjectStructure = baseObjectStructure;
baseObjectStructure->ref();
void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure)
{
- opcodeID = op_get_by_id_proto;
+ accessType = access_get_by_id_proto;
u.getByIdProto.baseObjectStructure = baseObjectStructure;
baseObjectStructure->ref();
void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain)
{
- opcodeID = op_get_by_id_chain;
+ accessType = access_get_by_id_chain;
u.getByIdChain.baseObjectStructure = baseObjectStructure;
baseObjectStructure->ref();
void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize)
{
- opcodeID = op_get_by_id_self_list;
+ accessType = access_get_by_id_self_list;
u.getByIdProtoList.structureList = structureList;
u.getByIdProtoList.listSize = listSize;
void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize)
{
- opcodeID = op_get_by_id_proto_list;
+ accessType = access_get_by_id_proto_list;
u.getByIdProtoList.structureList = structureList;
u.getByIdProtoList.listSize = listSize;
void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain)
{
- opcodeID = op_put_by_id_transition;
+ accessType = access_put_by_id_transition;
u.putByIdTransition.previousStructure = previousStructure;
previousStructure->ref();
void initPutByIdReplace(Structure* baseObjectStructure)
{
- opcodeID = op_put_by_id_replace;
+ accessType = access_put_by_id_replace;
u.putByIdReplace.baseObjectStructure = baseObjectStructure;
baseObjectStructure->ref();
void deref();
- OpcodeID opcodeID;
+ bool seenOnce()
+ {
+ return seen;
+ }
+
+ void setSeen()
+ {
+ seen = true;
+ }
+
+ int accessType : 31;
+ int seen : 1;
+
union {
struct {
Structure* baseObjectStructure;