Changeset 46620 in webkit for trunk/JavaScriptCore/bytecode


Ignore:
Timestamp:
Jul 30, 2009, 7:57:31 PM (16 years ago)
Author:
[email protected]
Message:

2009-07-30 Gavin Barraclough <[email protected]>

Reviewed by NOBODY (build fix).

Temporarily revert r46618 since this is b0rking on Linux.

Location:
trunk/JavaScriptCore/bytecode
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r46618 r46620  
    231231static void printStructureStubInfo(const StructureStubInfo& stubInfo, unsigned instructionOffset)
    232232{
    233     switch (stubInfo.accessType) {
    234     case access_get_by_id_self:
     233    switch (stubInfo.opcodeID) {
     234    case op_get_by_id_self:
    235235        printf("  [%4d] %s: %s\n", instructionOffset, "get_by_id_self", pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String().c_str());
    236236        return;
    237     case access_get_by_id_proto:
     237    case op_get_by_id_proto:
    238238        printf("  [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().c_str());
    239239        return;
    240     case access_get_by_id_chain:
     240    case op_get_by_id_chain:
    241241        printf("  [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().c_str());
    242242        return;
    243     case access_get_by_id_self_list:
     243    case op_get_by_id_self_list:
    244244        printf("  [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_self_list", pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String().c_str(), stubInfo.u.getByIdSelfList.listSize);
    245245        return;
    246     case access_get_by_id_proto_list:
     246    case op_get_by_id_proto_list:
    247247        printf("  [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_proto_list", pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String().c_str(), stubInfo.u.getByIdProtoList.listSize);
    248248        return;
    249     case access_put_by_id_transition:
     249    case op_put_by_id_transition:
    250250        printf("  [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().c_str());
    251251        return;
    252     case access_put_by_id_replace:
     252    case op_put_by_id_replace:
    253253        printf("  [%4d] %s: %s\n", instructionOffset, "put_by_id_replace", pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String().c_str());
    254254        return;
    255     case access_get_by_id:
     255    case op_get_by_id:
    256256        printf("  [%4d] %s\n", instructionOffset, "get_by_id");
    257257        return;
    258     case access_put_by_id:
     258    case op_put_by_id:
    259259        printf("  [%4d] %s\n", instructionOffset, "put_by_id");
    260260        return;
    261     case access_get_by_id_generic:
     261    case op_get_by_id_generic:
    262262        printf("  [%4d] %s\n", instructionOffset, "op_get_by_id_generic");
    263263        return;
    264     case access_put_by_id_generic:
     264    case op_put_by_id_generic:
    265265        printf("  [%4d] %s\n", instructionOffset, "op_put_by_id_generic");
    266266        return;
    267     case access_get_array_length:
     267    case op_get_array_length:
    268268        printf("  [%4d] %s\n", instructionOffset, "op_get_array_length");
    269269        return;
    270     case access_get_string_length:
     270    case op_get_string_length:
    271271        printf("  [%4d] %s\n", instructionOffset, "op_get_string_length");
    272272        return;
  • trunk/JavaScriptCore/bytecode/CodeBlock.h

    r46618 r46620  
    3737#include "JumpTable.h"
    3838#include "Nodes.h"
    39 #include "PtrAndFlags.h"
    4039#include "RegExp.h"
    4140#include "UString.h"
     
    5554
    5655namespace JSC {
    57 
    58     enum HasSeenShouldRepatch {
    59         hasSeenShouldRepatch
    60     };
    6156
    6257    class ExecState;
     
    111106        CodeLocationDataLabelPtr hotPathBegin;
    112107        CodeLocationNearCall hotPathOther;
    113         PtrAndFlags<CodeBlock, HasSeenShouldRepatch> ownerCodeBlock;
     108        CodeBlock* ownerCodeBlock;
    114109        CodeBlock* callee;
    115110        unsigned position;
     
    117112        void setUnlinked() { callee = 0; }
    118113        bool isLinked() { return callee; }
    119 
    120         bool seenOnce()
    121         {
    122             return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch);
    123         }
    124 
    125         void setSeen()
    126         {
    127             ownerCodeBlock.setFlag(hasSeenShouldRepatch);
    128         }
    129114    };
    130115
     
    136121        }
    137122
    138         bool seenOnce()
    139         {
    140             return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch);
    141         }
    142 
    143         void setSeen()
    144         {
    145             cachedPrototypeStructure.setFlag(hasSeenShouldRepatch);
    146         }
    147 
    148123        CodeLocationCall callReturnLocation;
    149124        CodeLocationDataLabelPtr structureLabel;
    150125        Structure* cachedStructure;
    151         PtrAndFlags<Structure, HasSeenShouldRepatch> cachedPrototypeStructure;
     126        Structure* cachedPrototypeStructure;
    152127    };
    153128
  • trunk/JavaScriptCore/bytecode/StructureStubInfo.cpp

    r46618 r46620  
    3232void StructureStubInfo::deref()
    3333{
    34     switch (accessType) {
    35     case access_get_by_id_self:
     34    switch (opcodeID) {
     35    case op_get_by_id_self:
    3636        u.getByIdSelf.baseObjectStructure->deref();
    3737        return;
    38     case access_get_by_id_proto:
     38    case op_get_by_id_proto:
    3939        u.getByIdProto.baseObjectStructure->deref();
    4040        u.getByIdProto.prototypeStructure->deref();
    4141        return;
    42     case access_get_by_id_chain:
     42    case op_get_by_id_chain:
    4343        u.getByIdChain.baseObjectStructure->deref();
    4444        u.getByIdChain.chain->deref();
    4545        return;
    46     case access_get_by_id_self_list: {
     46    case op_get_by_id_self_list: {
    4747        PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList;
    4848        polymorphicStructures->derefStructures(u.getByIdSelfList.listSize);
     
    5050        return;
    5151    }
    52     case access_get_by_id_proto_list: {
     52    case op_get_by_id_proto_list: {
    5353        PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList;
    5454        polymorphicStructures->derefStructures(u.getByIdProtoList.listSize);
     
    5656        return;
    5757    }
    58     case access_put_by_id_transition:
     58    case op_put_by_id_transition:
    5959        u.putByIdTransition.previousStructure->deref();
    6060        u.putByIdTransition.structure->deref();
    6161        u.putByIdTransition.chain->deref();
    6262        return;
    63     case access_put_by_id_replace:
     63    case op_put_by_id_replace:
    6464        u.putByIdReplace.baseObjectStructure->deref();
    6565        return;
    66     case access_get_by_id:
    67     case access_put_by_id:
    68     case access_get_by_id_generic:
    69     case access_put_by_id_generic:
    70     case access_get_array_length:
    71     case access_get_string_length:
     66    case op_get_by_id:
     67    case op_put_by_id:
     68    case op_get_by_id_generic:
     69    case op_put_by_id_generic:
     70    case op_get_array_length:
     71    case op_get_string_length:
    7272        // These instructions don't ref their Structures.
    7373        return;
  • trunk/JavaScriptCore/bytecode/StructureStubInfo.h

    r46618 r46620  
    3434#include "Structure.h"
    3535
    36 
    3736namespace JSC {
    3837
    39     static const int access_get_by_id_self = 0;
    40     static const int access_get_by_id_proto = 1;
    41     static const int access_get_by_id_chain = 2;
    42     static const int access_get_by_id_self_list = 3;
    43     static const int access_get_by_id_proto_list = 4;
    44     static const int access_put_by_id_transition = 5;
    45     static const int access_put_by_id_replace = 6;
    46     static const int access_get_by_id = 7;
    47     static const int access_put_by_id = 8;
    48     static const int access_get_by_id_generic = 9;
    49     static const int access_put_by_id_generic = 10;
    50     static const int access_get_array_length = 11;
    51     static const int access_get_string_length = 12;
    52 
    5338    struct StructureStubInfo {
    54         StructureStubInfo(int accessType)
    55             : accessType(accessType)
    56             , seen(false)
     39        StructureStubInfo(OpcodeID opcodeID)
     40            : opcodeID(opcodeID)
    5741        {
    5842        }
     
    6044        void initGetByIdSelf(Structure* baseObjectStructure)
    6145        {
    62             accessType = access_get_by_id_self;
     46            opcodeID = op_get_by_id_self;
    6347
    6448            u.getByIdSelf.baseObjectStructure = baseObjectStructure;
     
    6852        void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure)
    6953        {
    70             accessType = access_get_by_id_proto;
     54            opcodeID = op_get_by_id_proto;
    7155
    7256            u.getByIdProto.baseObjectStructure = baseObjectStructure;
     
    7963        void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain)
    8064        {
    81             accessType = access_get_by_id_chain;
     65            opcodeID = op_get_by_id_chain;
    8266
    8367            u.getByIdChain.baseObjectStructure = baseObjectStructure;
     
    9074        void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize)
    9175        {
    92             accessType = access_get_by_id_self_list;
     76            opcodeID = op_get_by_id_self_list;
    9377
    9478            u.getByIdProtoList.structureList = structureList;
     
    9882        void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize)
    9983        {
    100             accessType = access_get_by_id_proto_list;
     84            opcodeID = op_get_by_id_proto_list;
    10185
    10286            u.getByIdProtoList.structureList = structureList;
     
    10892        void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain)
    10993        {
    110             accessType = access_put_by_id_transition;
     94            opcodeID = op_put_by_id_transition;
    11195
    11296            u.putByIdTransition.previousStructure = previousStructure;
     
    122106        void initPutByIdReplace(Structure* baseObjectStructure)
    123107        {
    124             accessType = access_put_by_id_replace;
     108            opcodeID = op_put_by_id_replace;
    125109   
    126110            u.putByIdReplace.baseObjectStructure = baseObjectStructure;
     
    130114        void deref();
    131115
    132         bool seenOnce()
    133         {
    134             return seen;
    135         }
    136 
    137         void setSeen()
    138         {
    139             seen = true;
    140         }
    141 
    142         int accessType : 31;
    143         int seen : 1;
    144 
     116        OpcodeID opcodeID;
    145117        union {
    146118            struct {
Note: See TracChangeset for help on using the changeset viewer.