Changeset 64943 in webkit


Ignore:
Timestamp:
Aug 8, 2010 12:22:06 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r64938.
http://trac.webkit.org/changeset/64938
https://bugs.webkit.org/show_bug.cgi?id=43685

Did not compile on several ports (Requested by abarth on
#webkit).

  • Android.mk:
  • CMakeLists.txt:
  • GNUmakefile.am:
  • JavaScriptCore.gypi:
  • JavaScriptCore.pro:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h:
  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::load32): (JSC::MacroAssemblerX86::store32):
  • assembler/X86Assembler.h: (JSC::X86Assembler::movl_rm): (JSC::X86Assembler::movl_mr):
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::markAggregate):
  • bytecode/Instruction.h: (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::): (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
  • bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::deref):
  • bytecode/StructureStubInfo.h: (JSC::StructureStubInfo::initGetByIdProto): (JSC::StructureStubInfo::initGetByIdChain): (JSC::StructureStubInfo::):
  • jit/JIT.h:
  • jit/JITMarkObjects.cpp: Removed.
  • jit/JITPropertyAccess.cpp: (JSC::JIT::compileGetDirectOffset): (JSC::JIT::testPrototype): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain):
  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::compileGetDirectOffset): (JSC::JIT::testPrototype): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain):
  • jit/JITStubs.cpp: (JSC::setupPolymorphicProtoList):
  • wtf/Platform.h:
Location:
trunk/JavaScriptCore
Files:
1 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/Android.mk

    r64938 r64943  
    5353        jit/JITCall.cpp \
    5454        jit/JITCall32_64.cpp \
    55         jit/JITMarkObjects.cpp \
    5655        jit/JITOpcodes.cpp \
    5756        jit/JITPropertyAccess.cpp \
  • trunk/JavaScriptCore/CMakeLists.txt

    r64938 r64943  
    5656    jit/JITCall.cpp
    5757    jit/JIT.cpp
    58     jit/JITMarkObjects.cpp
    5958    jit/JITOpcodes32_64.cpp
    6059    jit/JITOpcodes.cpp
  • trunk/JavaScriptCore/ChangeLog

    r64938 r64943  
     12010-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r64938.
     4        http://trac.webkit.org/changeset/64938
     5        https://bugs.webkit.org/show_bug.cgi?id=43685
     6
     7        Did not compile on several ports (Requested by abarth on
     8        #webkit).
     9
     10        * Android.mk:
     11        * CMakeLists.txt:
     12        * GNUmakefile.am:
     13        * JavaScriptCore.gypi:
     14        * JavaScriptCore.pro:
     15        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
     16        * JavaScriptCore.xcodeproj/project.pbxproj:
     17        * assembler/AbstractMacroAssembler.h:
     18        * assembler/MacroAssembler.h:
     19        * assembler/MacroAssemblerX86.h:
     20        (JSC::MacroAssemblerX86::load32):
     21        (JSC::MacroAssemblerX86::store32):
     22        * assembler/X86Assembler.h:
     23        (JSC::X86Assembler::movl_rm):
     24        (JSC::X86Assembler::movl_mr):
     25        * bytecode/CodeBlock.cpp:
     26        (JSC::CodeBlock::markAggregate):
     27        * bytecode/Instruction.h:
     28        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
     29        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
     30        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
     31        * bytecode/StructureStubInfo.cpp:
     32        (JSC::StructureStubInfo::deref):
     33        * bytecode/StructureStubInfo.h:
     34        (JSC::StructureStubInfo::initGetByIdProto):
     35        (JSC::StructureStubInfo::initGetByIdChain):
     36        (JSC::StructureStubInfo::):
     37        * jit/JIT.h:
     38        * jit/JITMarkObjects.cpp: Removed.
     39        * jit/JITPropertyAccess.cpp:
     40        (JSC::JIT::compileGetDirectOffset):
     41        (JSC::JIT::testPrototype):
     42        (JSC::JIT::privateCompilePutByIdTransition):
     43        (JSC::JIT::privateCompileGetByIdProto):
     44        (JSC::JIT::privateCompileGetByIdProtoList):
     45        (JSC::JIT::privateCompileGetByIdChainList):
     46        (JSC::JIT::privateCompileGetByIdChain):
     47        * jit/JITPropertyAccess32_64.cpp:
     48        (JSC::JIT::compileGetDirectOffset):
     49        (JSC::JIT::testPrototype):
     50        (JSC::JIT::privateCompilePutByIdTransition):
     51        (JSC::JIT::privateCompileGetByIdProto):
     52        (JSC::JIT::privateCompileGetByIdProtoList):
     53        (JSC::JIT::privateCompileGetByIdChainList):
     54        (JSC::JIT::privateCompileGetByIdChain):
     55        * jit/JITStubs.cpp:
     56        (JSC::setupPolymorphicProtoList):
     57        * wtf/Platform.h:
     58
    1592010-08-07  Nathan Lawrence  <nlawrence@apple.com>
    260
  • trunk/JavaScriptCore/GNUmakefile.am

    r64938 r64943  
    166166        JavaScriptCore/jit/JIT.h \
    167167        JavaScriptCore/jit/JITInlineMethods.h \
    168         JavaScriptCore/jit/JITMarkObjects.cpp \
    169168        JavaScriptCore/jit/JITOpcodes32_64.cpp \
    170169        JavaScriptCore/jit/JITOpcodes.cpp \
  • trunk/JavaScriptCore/JavaScriptCore.gypi

    r64938 r64943  
    119119            'jit/JITCode.h',
    120120            'jit/JITInlineMethods.h',
    121             'jit/JITMarkObjects.cpp',
    122121            'jit/JITOpcodes.cpp',
    123122            'jit/JITOpcodes32_64.cpp',
  • trunk/JavaScriptCore/JavaScriptCore.pro

    r64938 r64943  
    101101    jit/JITCall32_64.cpp \
    102102    jit/JIT.cpp \
    103     jit/JITMarkObjects.cpp \
    104103    jit/JITOpcodes.cpp \
    105104    jit/JITOpcodes32_64.cpp \
  • trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj

    r64938 r64943  
    16901690                        </File>
    16911691                        <File
    1692                                 RelativePath="..\..\jit\JITMarkObjects.cpp"
    1693                                 >
    1694                         <File
    16951692                                RelativePath="..\..\jit\JITOpcodes.cpp"
    16961693                                >
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r64938 r64943  
    510510                BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFD8C910EEB2EE700283848 /* JumpTable.h */; };
    511511                C0A272630E50A06300E96E15 /* NotFound.h in Headers */ = {isa = PBXBuildFile; fileRef = C0A2723F0E509F1E00E96E15 /* NotFound.h */; settings = {ATTRIBUTES = (Private, ); }; };
    512                 DD23669811DBB22D00AF47C8 /* JITMarkObjects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD23669711DBB22D00AF47C8 /* JITMarkObjects.cpp */; };
    513512                DD2724681208D1FF00F9ABE7 /* AlignedMemoryAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = DD2724671208D1FF00F9ABE7 /* AlignedMemoryAllocator.h */; };
    514513                DD2724691208D1FF00F9ABE7 /* AlignedMemoryAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = DD2724671208D1FF00F9ABE7 /* AlignedMemoryAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    10641063                D21202280AD4310C00ED79B6 /* DateConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DateConversion.cpp; sourceTree = "<group>"; };
    10651064                D21202290AD4310C00ED79B6 /* DateConversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DateConversion.h; sourceTree = "<group>"; };
    1066                 DD23669711DBB22D00AF47C8 /* JITMarkObjects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITMarkObjects.cpp; sourceTree = "<group>"; };
    10671065                DD2724671208D1FF00F9ABE7 /* AlignedMemoryAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlignedMemoryAllocator.h; sourceTree = "<group>"; };
    10681066                DD377CBB12072C18006A2517 /* Bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bitmap.h; sourceTree = "<group>"; };
     
    12751273                        isa = PBXGroup;
    12761274                        children = (
    1277                                 DD23669711DBB22D00AF47C8 /* JITMarkObjects.cpp */,
    12781275                                A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */,
    12791276                                A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */,
     
    26792676                                DDF7ABD511F60ED200108E36 /* GCActivityCallbackCF.cpp in Sources */,
    26802677                                8627E5EB11F1281900A313B5 /* PageAllocation.cpp in Sources */,
    2681                                 DD23669811DBB22D00AF47C8 /* JITMarkObjects.cpp in Sources */,
    26822678                                DDE82AD71209D955005C1756 /* GCHandle.cpp in Sources */,
    26832679                        );
  • trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r64938 r64943  
    522522    }
    523523
    524     static int32_t int32AtLocation(CodeLocationDataLabel32 dataLabel32)
    525     {
    526         return AssemblerType::int32AtLocation(dataLabel32.dataLocation());
    527     }
    528 
    529     static void* pointerAtLocation(CodeLocationDataLabelPtr dataLabelPtr)
    530     {
    531         return AssemblerType::pointerAtLocation(dataLabelPtr.dataLocation());
    532     }
    533 
    534     static void* jumpTarget(CodeLocationJump jump)
    535     {
    536         return AssemblerType::jumpTarget(jump.dataLocation());
    537     }
    538 
    539524    static void repatchInt32(CodeLocationDataLabel32 dataLabel32, int32_t value)
    540525    {
  • trunk/JavaScriptCore/assembler/MacroAssembler.h

    r64938 r64943  
    210210    }
    211211
    212     void loadPtrWithPatch(void* address, RegisterID dest)
    213     {
    214         load32WithPatch(address, dest);
    215     }
    216212
    217213    void loadPtr(ImplicitAddress address, RegisterID dest)
  • trunk/JavaScriptCore/assembler/MacroAssemblerX86.h

    r64938 r64943  
    8383    }
    8484
    85     void load32WithPatch(void* address, RegisterID dest)
     85    void load32(void* address, RegisterID dest)
    8686    {
    8787        m_assembler.movl_mr(address, dest);
    88     }
    89 
    90     void load32(void* address, RegisterID dest)
    91     {
    92         if (dest == X86Registers::eax)
    93             m_assembler.movl_mEAX(address);
    94         else
    95             m_assembler.movl_mr(address, dest);
    9688    }
    9789
     
    114106    void store32(RegisterID src, void* address)
    115107    {
    116         if (src == X86Registers::eax)
    117             m_assembler.movl_EAXm(address);
    118         else
    119             m_assembler.movl_rm(src, address);
     108        m_assembler.movl_rm(src, address);
    120109    }
    121110
  • trunk/JavaScriptCore/assembler/X86Assembler.h

    r64938 r64943  
    11551155    void movl_rm(RegisterID src, void* addr)
    11561156    {
    1157         m_formatter.oneByteOp(OP_MOV_EvGv, src, addr);
     1157        if (src == X86Registers::eax)
     1158            movl_EAXm(addr);
     1159        else
     1160            m_formatter.oneByteOp(OP_MOV_EvGv, src, addr);
    11581161    }
    11591162   
    11601163    void movl_mr(void* addr, RegisterID dst)
    11611164    {
    1162         m_formatter.oneByteOp(OP_MOV_GvEv, dst, addr);
     1165        if (dst == X86Registers::eax)
     1166            movl_mEAX(addr);
     1167        else
     1168            m_formatter.oneByteOp(OP_MOV_GvEv, dst, addr);
    11631169    }
    11641170
     
    15521558
    15531559        setPointer(reinterpret_cast<char*>(code) + where.m_offset, value);
    1554     }
    1555 
    1556     static int32_t int32AtLocation(void* where)
    1557     {
    1558         return static_cast<int32_t*>(where)[-1];
    1559     }
    1560 
    1561     static void* pointerAtLocation(void* where)
    1562     {
    1563         return static_cast<void**>(where)[-1];
    1564     }
    1565 
    1566     static void* jumpTarget(void* jump)
    1567     {
    1568         intptr_t src = reinterpret_cast<intptr_t>(jump);
    1569         int32_t offset = static_cast<int32_t*>(jump)[-1];
    1570         return reinterpret_cast<void*>(src + offset);
    15711560    }
    15721561
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r64938 r64943  
    15211521        m_functionDecls[i]->markAggregate(markStack);
    15221522    markStack.append(m_globalObject);
    1523 #if ENABLE(MOVABLE_GC_OBJECTS)
    1524     // This is the code that is responsible for marking the actual pointers
    1525     // to JSCell*s in the JIT'ed code.  Normally, these pointers are marked
    1526     // elsewhere, however when we have movable objects, we will need to update
    1527     // all of the references.
    1528     for (size_t i = 0; i < m_structureStubInfos.size(); ++i)
    1529         m_structureStubInfos[i].markAggregate(markStack, this);
    1530 #endif
    15311523}
    15321524
  • trunk/JavaScriptCore/bytecode/Instruction.h

    r64938 r64943  
    6464                StructureChain* chain;
    6565            } u;
    66 #if ENABLE(MOVABLE_GC_OBJECTS)
    67             int count;
    68             PropertySlot::CachedPropertyType propertyType;
    69 #endif
    7066
    7167            void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base)
     
    7773            }
    7874           
    79 #if ENABLE(MOVABLE_GC_OBJECTS)
    80             void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base, Structure* _proto, PropertySlot::CachedPropertyType _propertyType)
    81 #else
    8275            void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base, Structure* _proto)
    83 #endif
    8476            {
    8577                stubRoutine = _stubRoutine;
     
    8779                u.proto = _proto;
    8880                isChain = false;
    89 #if ENABLE(MOVABLE_GC_OBJECTS)
    90                 propertyType = _propertyType;
    91 #endif
    9281            }
    9382           
    94 #if ENABLE(MOVABLE_GC_OBJECTS)
    95             void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base, StructureChain* _chain, int _count, PropertySlot::CachedPropertyType _propertyType)
    96 #else
    9783            void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base, StructureChain* _chain)
    98 #endif
    9984            {
    10085                stubRoutine = _stubRoutine;
     
    10287                u.chain = _chain;
    10388                isChain = true;
    104 #if ENABLE(MOVABLE_GC_OBJECTS)
    105                 count = _count;
    106                 propertyType = _propertyType;
    107 #endif
    10889            }
    10990        } list[POLYMORPHIC_LIST_CACHE_SIZE];
     
    11495        }
    11596
    116 #if ENABLE(MOVABLE_GC_OBJECTS)
    117         PolymorphicAccessStructureList(PolymorphicAccessStructureListStubRoutineType stubRoutine, Structure* firstBase, Structure* firstProto, PropertySlot::CachedPropertyType propertyType)
    118         {
    119             list[0].set(stubRoutine, firstBase, firstProto, propertyType);
    120         }
    121 #else
    12297        PolymorphicAccessStructureList(PolymorphicAccessStructureListStubRoutineType stubRoutine, Structure* firstBase, Structure* firstProto)
    12398        {
    12499            list[0].set(stubRoutine, firstBase, firstProto);
    125100        }
    126 #endif
    127101
    128 #if ENABLE(MOVABLE_GC_OBJECTS)
    129         PolymorphicAccessStructureList(PolymorphicAccessStructureListStubRoutineType stubRoutine, Structure* firstBase, StructureChain* firstChain, int count, PropertySlot::CachedPropertyType propertyType)
    130         {
    131             list[0].set(stubRoutine, firstBase, firstChain, count, propertyType);
    132         }
    133 #else
    134102        PolymorphicAccessStructureList(PolymorphicAccessStructureListStubRoutineType stubRoutine, Structure* firstBase, StructureChain* firstChain)
    135103        {
    136104            list[0].set(stubRoutine, firstBase, firstChain);
    137105        }
    138 #endif
    139106
    140107        void derefStructures(int count)
  • trunk/JavaScriptCore/bytecode/StructureStubInfo.cpp

    r64938 r64943  
    2626#include "config.h"
    2727#include "StructureStubInfo.h"
    28 
    29 #include "JIT.h"
    3028
    3129namespace JSC {
     
    7876    }
    7977}
    80 
    81 #if ENABLE(MOVABLE_GC_OBJECTS)
    82 void StructureStubInfo::markAggregate(MarkStack& markStack, CodeBlock* codeBlock)
    83 {
    84     switch (accessType) {
    85     case access_get_by_id_proto:
    86         JIT::markGetByIdProto(markStack, codeBlock, this);
    87         return;
    88     case access_get_by_id_chain:
    89         JIT::markGetByIdChain(markStack, codeBlock, this);
    90         return;
    91     case access_get_by_id_proto_list:
    92         JIT::markGetByIdProtoList(markStack, codeBlock, this);
    93         return;
    94     case access_put_by_id_transition:
    95         JIT::markPutByIdTransition(markStack, codeBlock, this);
    96         return;
    97     case access_get_by_id_self:
    98     case access_get_by_id_self_list:
    99     case access_put_by_id_replace:
    100     case access_get_by_id:
    101     case access_put_by_id:
    102     case access_get_by_id_generic:
    103     case access_put_by_id_generic:
    104     case access_get_array_length:
    105     case access_get_string_length:
    106         return;
    107     default:
    108         ASSERT_NOT_REACHED();
    109     }
    110 }
    111 #endif
    112 
    11378#endif
    11479
  • trunk/JavaScriptCore/bytecode/StructureStubInfo.h

    r64938 r64943  
    3131#include "Instruction.h"
    3232#include "MacroAssembler.h"
    33 #include "PropertySlot.h"
    3433#include "Opcode.h"
    3534#include "Structure.h"
     
    6867        }
    6968
    70 #if ENABLE(MOVABLE_GC_OBJECTS)
    71         void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure, CodeLocationLabel routine, PropertySlot::CachedPropertyType propertyType)
    72 #else
    7369        void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure, CodeLocationLabel routine)
    74 #endif
    7570        {
    7671            accessType = access_get_by_id_proto;
     
    8378
    8479            stubRoutine = routine;
    85 
    86 #if ENABLE(MOVABLE_GC_OBJECTS)
    87             u.getByIdProto.propertyType = propertyType;
    88 #endif
    8980        }
    9081
    91 #if ENABLE(MOVABLE_GC_OBJECTS)
    92         void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain, CodeLocationLabel routine, int count, PropertySlot::CachedPropertyType propertyType)
    93 #else
    9482        void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain, CodeLocationLabel routine)
    95 #endif
    9683        {
    9784            accessType = access_get_by_id_chain;
     
    10491
    10592            stubRoutine = routine;
    106 
    107 #if ENABLE(MOVABLE_GC_OBJECTS)
    108             u.getByIdChain.count = count;
    109             u.getByIdChain.propertyType = propertyType;
    110 #endif
    11193        }
    11294
     
    158140
    159141        void deref();
    160 #if ENABLE(MOVABLE_GC_OBJECTS)
    161         void markAggregate(MarkStack&, CodeBlock*);
    162 #endif
    163142
    164143        bool seenOnce()
     
    182161                Structure* baseObjectStructure;
    183162                Structure* prototypeStructure;
    184 #if ENABLE(MOVABLE_GC_OBJECTS)
    185                 // The propertyType is required to properly determine the
    186                 // structure of the underlying code so that we may patch it
    187                 // correctly.  Different code is generated for different
    188                 // property types, and therefore, the offsets that we need to
    189                 // patch at will change.
    190                 PropertySlot::CachedPropertyType propertyType;
    191 #endif
    192163            } getByIdProto;
    193164            struct {
    194165                Structure* baseObjectStructure;
    195166                StructureChain* chain;
    196 #if ENABLE(MOVABLE_GC_OBJECTS)
    197                 // We need the count so that we can iterate over the prototype
    198                 // chain, marking all of the references to objects.
    199                 int count;
    200                 PropertySlot::CachedPropertyType propertyType;
    201 #endif
    202167            } getByIdChain;
    203168            struct {
  • trunk/JavaScriptCore/jit/JIT.h

    r64938 r64943  
    238238        static void patchMethodCallProto(CodeBlock* codeblock, MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*, ReturnAddressPtr);
    239239
    240 #if ENABLE(MOVABLE_GC_OBJECTS)
    241         static void patchPrototypeStructureAddress(CodeLocationDataLabelPtr, MarkStack&, RepatchBuffer&);
    242         static void patchGetDirectOffset(CodeLocationLabel, MarkStack&, RepatchBuffer&, PropertySlot::CachedPropertyType);
    243         static void markGetByIdChainInternal(CodeLocationLabel, MarkStack&, RepatchBuffer&, PropertySlot::CachedPropertyType);
    244 
    245         static void markGetByIdProto(MarkStack&, CodeBlock*, StructureStubInfo*);
    246         static void markGetByIdChain(MarkStack&, CodeBlock*, StructureStubInfo*);
    247         static void markGetByIdProtoList(MarkStack&, CodeBlock*, StructureStubInfo*);
    248         static void markPutByIdTransition(MarkStack&, CodeBlock*, StructureStubInfo*);
    249         static void markGlobalObjectReference(MarkStack&, CodeBlock*, CodeLocationDataLabelPtr);
    250 #endif
    251 
    252240        static bool compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, ReturnAddressPtr returnAddress)
    253241        {
     
    308296        void emitLoadInt32ToDouble(unsigned index, FPRegisterID value);
    309297
    310         unsigned testPrototype(JSValue, JumpList& failureCases);
     298        void testPrototype(JSValue, JumpList& failureCases);
    311299
    312300#if USE(JSVALUE32_64)
     
    379367        static const int patchOffsetMethodCheckProtoStruct = 18;
    380368        static const int patchOffsetMethodCheckPutFunction = 29;
    381 
    382         static const int patchOffsetGetByIdProtoStruct = 19;
    383         static const int patchOffsetPutByIdProtoStruct = 12;
    384         static const int patchLengthTestPrototype = 16;
    385         static const int patchLengthBranchPtr = 10;
    386         static const int patchLengthMove = 6;
    387         static const int patchLengthStore = 10;
    388369#elif CPU(ARM_TRADITIONAL)
    389370        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
     
    556537        static const int patchOffsetMethodCheckProtoStruct = 30;
    557538        static const int patchOffsetMethodCheckPutFunction = 50;
    558 
    559         static const int patchOffsetGetByIdProtoStruct = 40;
    560         static const int patchOffsetPutByIdProtoStruct = 20;
    561         static const int patchLengthTestPrototype = 29;
    562         static const int patchLengthBranchPtr = 9;
    563         static const int patchLengthMove = 10;
    564         static const int patchLengthStore = 13;
    565539#elif CPU(X86)
    566540        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
  • trunk/JavaScriptCore/jit/JITPropertyAccess.cpp

    r64938 r64943  
    574574}
    575575
    576 void JIT::compileGetDirectOffset(JSObject* base, RegisterID, RegisterID result, size_t cachedOffset)
     576void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID result, size_t cachedOffset)
    577577{
    578578    if (base->isUsingInlineStorage())
     
    580580    else {
    581581        PropertyStorage* protoPropertyStorage = &base->m_externalStorage;
    582         loadPtr(static_cast<void*>(protoPropertyStorage), result);
    583         loadPtr(Address(result, cachedOffset * sizeof(JSValue)), result);
     582        loadPtr(static_cast<void*>(protoPropertyStorage), temp);
     583        loadPtr(Address(temp, cachedOffset * sizeof(JSValue)), result);
    584584    }
    585585}
    586586
    587 unsigned JIT::testPrototype(JSValue prototype, JumpList& failureCases)
     587void JIT::testPrototype(JSValue prototype, JumpList& failureCases)
    588588{
    589589    if (prototype.isNull())
    590         return 0;
    591 
    592     Label testPrototypeBegin(this);
     590        return;
     591
    593592    // We have a special case for X86_64 here because X86 instructions that take immediate values
    594593    // only take 32 bit immediate values, wheras the pointer constants we are using here are 64 bit
     
    601600    failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&asCell(prototype)->m_structure), ImmPtr(asCell(prototype)->structure())));
    602601#endif
    603     ASSERT_JIT_OFFSET(differenceBetween(testPrototypeBegin, Label(this)), patchLengthTestPrototype);
    604 
    605     return patchLengthTestPrototype;
    606602}
    607603
    608604bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
    609605{
    610     Label putByIdTransitionBegin(this);
    611606    JumpList failureCases;
    612607    // Check eax is an object of the right Structure.
    613608    failureCases.append(emitJumpIfNotJSCell(regT0));
    614609    failureCases.append(branchPtr(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), ImmPtr(oldStructure)));
    615 
    616     unsigned offset = patchOffsetPutByIdProtoStruct + patchLengthBranchPtr;
    617     ASSERT_JIT_OFFSET(differenceBetween(putByIdTransitionBegin, Label(this)), offset);
    618 
    619     offset += testPrototype(oldStructure->storedPrototype(), failureCases);
    620     ASSERT_JIT_OFFSET(differenceBetween(putByIdTransitionBegin, Label(this)), offset);
     610    testPrototype(oldStructure->storedPrototype(), failureCases);
    621611
    622612    // ecx = baseObject->m_structure
    623613    if (!direct) {
    624         for (RefPtr<Structure>* it = chain->head(); *it; ++it) {
    625             offset += testPrototype((*it)->storedPrototype(), failureCases);
    626             ASSERT_JIT_OFFSET(differenceBetween(putByIdTransitionBegin, Label(this)), offset);
    627         }
     614        for (RefPtr<Structure>* it = chain->head(); *it; ++it)
     615            testPrototype((*it)->storedPrototype(), failureCases);
    628616    }
    629617
     
    784772bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
    785773{
    786     Label getByIdProtoBegin(this);
    787774    // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
    788775    // referencing the prototype object - let's speculatively load it's table nice and early!)
     
    801788#endif
    802789
    803     ASSERT_JIT_OFFSET(differenceBetween(getByIdProtoBegin, Label(this)), patchOffsetGetByIdProtoStruct + patchLengthBranchPtr);
    804790    bool needsStubLink = false;
    805791   
     
    852838    // We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
    853839    repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
    854 #if ENABLE(MOVABLE_GC_OBJECTS)
    855     stubInfo->initGetByIdProto(structure, prototypeStructure, entryLabel, slot.cachedPropertyType());
    856 #else
    857840    stubInfo->initGetByIdProto(structure, prototypeStructure, entryLabel);
    858 #endif
    859841    return true;
    860842}
     
    927909bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
    928910{
    929     Label getByIdProtoListBegin(this);
    930911    PolymorphicAccessStructureList* prototypeStructures = stubInfo->u.getByIdProtoList.structureList;
    931912    int currentIndex = stubInfo->u.getByIdProtoList.listSize;
     
    946927    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
    947928#endif
    948 
    949     ASSERT_JIT_OFFSET(differenceBetween(getByIdProtoListBegin, Label(this)), patchOffsetGetByIdProtoStruct + patchLengthBranchPtr);
    950929
    951930    // Checks out okay!
     
    995974    structure->ref();
    996975    prototypeStructure->ref();
    997 #if ENABLE(MOVABLE_GC_OBJECTS)
    998     prototypeStructures->list[currentIndex].set(entryLabel, structure, prototypeStructure, slot.cachedPropertyType());
    999 #else
    1000976    prototypeStructures->list[currentIndex].set(entryLabel, structure, prototypeStructure);
    1001 #endif
    1002977
    1003978    // Finally patch the jump to slow case back in the hot path to jump here instead.
     
    1015990
    1016991    ASSERT(count);
    1017 
    1018     Label getByIdChainListBegin(this);
    1019992    JumpList bucketsOfFail;
    1020993
     
    10301003        currStructure = it->get();
    10311004        testPrototype(protoObject, bucketsOfFail);
    1032         ASSERT_JIT_OFFSET(differenceBetween(getByIdChainListBegin, Label(this)),
    1033             patchOffsetGetByIdProtoStruct + patchLengthBranchPtr + i * patchLengthTestPrototype);
    10341005    }
    10351006    ASSERT(protoObject);
     
    10801051    structure->ref();
    10811052    chain->ref();
    1082 #if ENABLE(MOVABLE_GC_OBJECTS)
    1083     prototypeStructures->list[currentIndex].set(entryLabel, structure, chain, count, slot.cachedPropertyType());
    1084 #else
    10851053    prototypeStructures->list[currentIndex].set(entryLabel, structure, chain);
    1086 #endif
    10871054
    10881055    // Finally patch the jump to slow case back in the hot path to jump here instead.
     
    10981065    ASSERT(count);
    10991066
    1100     Label getByIdChainBegin(this);
    11011067    JumpList bucketsOfFail;
    11021068
     
    11111077        currStructure = it->get();
    11121078        testPrototype(protoObject, bucketsOfFail);
    1113         ASSERT_JIT_OFFSET(differenceBetween(getByIdChainBegin, Label(this)),
    1114             patchOffsetGetByIdProtoStruct + patchLengthBranchPtr + i * patchLengthTestPrototype);
    11151079    }
    11161080    ASSERT(protoObject);
     
    11641128    // We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
    11651129    repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
    1166 #if ENABLE(MOVABLE_GC_OBJECTS)
    1167     stubInfo->initGetByIdChain(structure, chain, entryLabel, count, slot.cachedPropertyType());
    1168 #else
    11691130    stubInfo->initGetByIdChain(structure, chain, entryLabel);
    1170 #endif
    1171 
    11721131    return true;
    11731132}
  • trunk/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

    r64938 r64943  
    575575void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset)
    576576{
    577     Label directOffsetBegin(this);
    578577    if (base->isUsingInlineStorage()) {
    579         // On X86, load32 will optimize for a slightly smaller instruction in the case that resultPayoad is regT0
    580         // Since we want this instruction to always be the same length, we use load32WithPatch to avoid this problem
    581         load32WithPatch(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload), resultPayload);
    582         ASSERT_JIT_OFFSET(differenceBetween(directOffsetBegin, Label(this)), patchLengthMove);
     578        load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload), resultPayload);
    583579        load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag), resultTag);
    584580        return;
     
    588584   
    589585    PropertyStorage* protoPropertyStorage = &base->m_externalStorage;
    590     loadPtrWithPatch(static_cast<void*>(protoPropertyStorage), temp);
    591     ASSERT_JIT_OFFSET(differenceBetween(directOffsetBegin, Label(this)), patchLengthMove);
     586    loadPtr(static_cast<void*>(protoPropertyStorage), temp);
    592587    load32(Address(temp, offset + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload);
    593588    load32(Address(temp, offset + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag);
    594589}
    595590
    596 unsigned JIT::testPrototype(JSValue prototype, JumpList& failureCases)
     591void JIT::testPrototype(JSValue prototype, JumpList& failureCases)
    597592{
    598593    if (prototype.isNull())
    599         return 0;
    600    
    601     Label testPrototypeBegin(this);
     594        return;
     595   
    602596    // We have a special case for X86_64 here because X86 instructions that take immediate values
    603597    // only take 32 bit immediate values, wheras the pointer constants we are using here are 64 bit
     
    610604    failureCases.append(branchPtr(NotEqual, AbsoluteAddress(&asCell(prototype)->m_structure), ImmPtr(asCell(prototype)->structure())));
    611605#endif
    612     ASSERT_JIT_OFFSET(differenceBetween(testPrototypeBegin, Label(this)), patchLengthTestPrototype);
    613 
    614     return patchLengthTestPrototype;
    615606}
    616607
     
    619610    // It is assumed that regT0 contains the basePayload and regT1 contains the baseTag.  The value can be found on the stack.
    620611   
    621     Label putByIdTransitionBegin(this);
    622612    JumpList failureCases;
    623613    failureCases.append(branch32(NotEqual, regT1, Imm32(JSValue::CellTag)));
    624614    failureCases.append(branchPtr(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), ImmPtr(oldStructure)));
    625 
    626     int offset = patchOffsetPutByIdProtoStruct + patchLengthBranchPtr;
    627     ASSERT_JIT_OFFSET(differenceBetween(putByIdTransitionBegin, Label(this)), offset);
    628 
    629     offset += testPrototype(oldStructure->storedPrototype(), failureCases);
    630     ASSERT_JIT_OFFSET(differenceBetween(putByIdTransitionBegin, Label(this)), offset);
     615    testPrototype(oldStructure->storedPrototype(), failureCases);
    631616   
    632617    if (!direct) {
    633618        // Verify that nothing in the prototype chain has a setter for this property.
    634         for (RefPtr<Structure>* it = chain->head(); *it; ++it) {
    635             offset += testPrototype((*it)->storedPrototype(), failureCases);
    636             ASSERT_JIT_OFFSET(differenceBetween(putByIdTransitionBegin, Label(this)), offset);
    637         }
     619        for (RefPtr<Structure>* it = chain->head(); *it; ++it)
     620            testPrototype((*it)->storedPrototype(), failureCases);
    638621    }
    639    
     622
    640623    // Reallocate property storage if needed.
    641624    Call callTarget;
     
    800783    // regT0 holds a JSCell*
    801784   
    802     Label getByIdProtoBegin(this);
    803785    // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
    804786    // referencing the prototype object - let's speculatively load it's table nice and early!)
     
    815797    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
    816798#endif
    817     ASSERT_JIT_OFFSET(differenceBetween(getByIdProtoBegin, Label(this)), patchOffsetGetByIdProtoStruct + patchLengthBranchPtr);
    818 
    819799    bool needsStubLink = false;
    820800    // Checks out okay!
     
    869849    // We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
    870850    repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
    871 #if ENABLE(MOVABLE_GC_OBJECTS)
    872     stubInfo->initGetByIdProto(structure, prototypeStructure, entryLabel, slot.cachedPropertyType());
    873 #else
    874851    stubInfo->initGetByIdProto(structure, prototypeStructure, entryLabel);
    875 #endif
    876852    return true;
    877853}
     
    951927    // regT0 holds a JSCell*
    952928   
    953     Label getByIdProtoListBegin(this);
    954929    // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
    955930    // referencing the prototype object - let's speculatively load it's table nice and early!)
     
    967942    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
    968943#endif
    969     ASSERT_JIT_OFFSET(differenceBetween(getByIdProtoListBegin, Label(this)), patchOffsetGetByIdProtoStruct + patchLengthBranchPtr);
    970944   
    971945    bool needsStubLink = false;
     
    988962    } else
    989963        compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset);
    990 
     964   
    991965    Jump success = jump();
    992966   
     
    1013987    structure->ref();
    1014988    prototypeStructure->ref();
    1015 #if ENABLE(MOVABLE_GC_OBJECTS)
    1016     prototypeStructures->list[currentIndex].set(entryLabel, structure, prototypeStructure, slot.cachedPropertyType());
    1017 #else
    1018989    prototypeStructures->list[currentIndex].set(entryLabel, structure, prototypeStructure);
    1019 #endif
    1020 
     990   
    1021991    // Finally patch the jump to slow case back in the hot path to jump here instead.
    1022992    CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
     
    10351005    ASSERT(count);
    10361006   
    1037     Label getByIdChainListBegin(this);
    10381007    JumpList bucketsOfFail;
    10391008   
     
    10481017        currStructure = it->get();
    10491018        testPrototype(protoObject, bucketsOfFail);
    1050 
    1051         ASSERT_JIT_OFFSET(differenceBetween(getByIdChainListBegin, Label(this)),
    1052             patchOffsetGetByIdProtoStruct + patchLengthBranchPtr + static_cast<int>(i) * patchLengthTestPrototype);
    10531019    }
    10541020    ASSERT(protoObject);
     
    10731039    } else
    10741040        compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset);
    1075    
     1041
    10761042    Jump success = jump();
    10771043   
     
    10991065    structure->ref();
    11001066    chain->ref();
    1101 #if ENABLE(MOVABLE_GC_OBJECTS)
    1102     prototypeStructures->list[currentIndex].set(entryLabel, structure, chain, count, slot.cachedPropertyType());
    1103 #else
    11041067    prototypeStructures->list[currentIndex].set(entryLabel, structure, chain);
    1105 #endif
    1106 
     1068   
    11071069    // Finally patch the jump to slow case back in the hot path to jump here instead.
    11081070    CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
     
    11181080    ASSERT(count);
    11191081   
    1120     Label getByIdChainBegin(this);
    11211082    JumpList bucketsOfFail;
    11221083   
     
    11311092        currStructure = it->get();
    11321093        testPrototype(protoObject, bucketsOfFail);
    1133 
    1134         ASSERT_JIT_OFFSET(differenceBetween(getByIdChainBegin, Label(this)),
    1135             patchOffsetGetByIdProtoStruct + patchLengthBranchPtr + static_cast<int>(i) * patchLengthTestPrototype);
    11361094    }
    11371095    ASSERT(protoObject);
     
    11841142    // We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
    11851143    repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
    1186 #if ENABLE(MOVABLE_GC_OBJECTS)
    1187     stubInfo->initGetByIdChain(structure, chain, entryLabel, count, slot.cachedPropertyType());
    1188 #else
    11891144    stubInfo->initGetByIdChain(structure, chain, entryLabel);
    1190 #endif
    11911145    return true;
    11921146}
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r64938 r64943  
    15981598{
    15991599    if (stubInfo->accessType == access_get_by_id_proto)
    1600 #if ENABLE(MOVABLE_GC_OBJECTS)
    1601         stubInfo->initGetByIdProtoList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdProto.baseObjectStructure, stubInfo->u.getByIdProto.prototypeStructure, stubInfo->u.getByIdProto.propertyType));
    1602 #else
    16031600        stubInfo->initGetByIdProtoList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdProto.baseObjectStructure, stubInfo->u.getByIdProto.prototypeStructure));
    1604 #endif
    16051601    else if (stubInfo->accessType == access_get_by_id_chain)
    1606 #if ENABLE(MOVABLE_GC_OBJECTS)
    1607         stubInfo->initGetByIdProtoList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdChain.baseObjectStructure, stubInfo->u.getByIdChain.chain, stubInfo->u.getByIdChain.count, stubInfo->u.getByIdChain.propertyType));
    1608 #else
    16091602        stubInfo->initGetByIdProtoList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdChain.baseObjectStructure, stubInfo->u.getByIdChain.chain));
    1610 #endif
    16111603    ASSERT(stubInfo->accessType == access_get_by_id_proto_list);
    16121604}
  • trunk/JavaScriptCore/wtf/Platform.h

    r64938 r64943  
    10831083#define ENABLE_JSC_ZOMBIES 0
    10841084
    1085 #define ENABLE_MOVABLE_GC_OBJECTS 0
    1086 
    10871085/* FIXME: Eventually we should enable this for all platforms and get rid of the define. */
    10881086#if PLATFORM(MAC) || PLATFORM(WIN)
Note: See TracChangeset for help on using the changeset viewer.