Title: [151082] branches/dfgFourthTier/Source/_javascript_Core
Revision
151082
Author
[email protected]
Date
2013-06-02 10:29:35 -0700 (Sun, 02 Jun 2013)

Log Message

fourthTier: Get rid of StructureStubInfo::bytecodeIndex
https://bugs.webkit.org/show_bug.cgi?id=117127

Reviewed by Mark Hahnenberg.
        
StructureStubInfo already has a CodeOrigin field, which also has a bytecodeIndex.
It makes sense to just always use the CodeOrigin.

* bytecode/StructureStubInfo.h:
(StructureStubInfo):
(JSC::getStructureStubInfoBytecodeIndex):
* jit/JIT.cpp:
(JSC::PropertyStubCompilationInfo::copyToStubInfo):
* jit/JIT.h:
(JSC::JIT::compileGetByIdProto):
(JSC::JIT::compileGetByIdSelfList):
(JSC::JIT::compileGetByIdProtoList):
(JSC::JIT::compileGetByIdChainList):
(JSC::JIT::compileGetByIdChain):
(JSC::JIT::compilePutByIdTransition):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):

Modified Paths

Diff

Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (151081 => 151082)


--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-06-02 08:33:09 UTC (rev 151081)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-06-02 17:29:35 UTC (rev 151082)
@@ -1,3 +1,30 @@
+2013-06-02  Filip Pizlo  <[email protected]>
+
+        fourthTier: Get rid of StructureStubInfo::bytecodeIndex
+        https://bugs.webkit.org/show_bug.cgi?id=117127
+
+        Reviewed by Mark Hahnenberg.
+        
+        StructureStubInfo already has a CodeOrigin field, which also has a bytecodeIndex.
+        It makes sense to just always use the CodeOrigin.
+
+        * bytecode/StructureStubInfo.h:
+        (StructureStubInfo):
+        (JSC::getStructureStubInfoBytecodeIndex):
+        * jit/JIT.cpp:
+        (JSC::PropertyStubCompilationInfo::copyToStubInfo):
+        * jit/JIT.h:
+        (JSC::JIT::compileGetByIdProto):
+        (JSC::JIT::compileGetByIdSelfList):
+        (JSC::JIT::compileGetByIdProtoList):
+        (JSC::JIT::compileGetByIdChainList):
+        (JSC::JIT::compileGetByIdChain):
+        (JSC::JIT::compilePutByIdTransition):
+        * jit/JITPropertyAccess.cpp:
+        (JSC::JIT::privateCompilePutByIdTransition):
+        * jit/JITPropertyAccess32_64.cpp:
+        (JSC::JIT::privateCompilePutByIdTransition):
+
 2013-06-01  Filip Pizlo  <[email protected]>
 
         Fix some minor issues in the DFG's profiling of heap accesses

Modified: branches/dfgFourthTier/Source/_javascript_Core/bytecode/StructureStubInfo.h (151081 => 151082)


--- branches/dfgFourthTier/Source/_javascript_Core/bytecode/StructureStubInfo.h	2013-06-02 08:33:09 UTC (rev 151081)
+++ branches/dfgFourthTier/Source/_javascript_Core/bytecode/StructureStubInfo.h	2013-06-02 17:29:35 UTC (rev 151082)
@@ -198,15 +198,11 @@
             watchpoints, codeBlock, this);
     }
         
-    unsigned bytecodeIndex;
-
     int8_t accessType;
     bool seen : 1;
     bool resetByGC : 1;
 
-#if ENABLE(DFG_JIT)
     CodeOrigin codeOrigin;
-#endif // ENABLE(DFG_JIT)
 
     union {
         struct {
@@ -313,7 +309,7 @@
 
 inline unsigned getStructureStubInfoBytecodeIndex(StructureStubInfo* structureStubInfo)
 {
-    return structureStubInfo->bytecodeIndex;
+    return structureStubInfo->codeOrigin.bytecodeIndex;
 }
 
 } // namespace JSC

Modified: branches/dfgFourthTier/Source/_javascript_Core/jit/JIT.cpp (151081 => 151082)


--- branches/dfgFourthTier/Source/_javascript_Core/jit/JIT.cpp	2013-06-02 08:33:09 UTC (rev 151081)
+++ branches/dfgFourthTier/Source/_javascript_Core/jit/JIT.cpp	2013-06-02 17:29:35 UTC (rev 151082)
@@ -564,7 +564,7 @@
 ALWAYS_INLINE void PropertyStubCompilationInfo::copyToStubInfo(StructureStubInfo& info, LinkBuffer &linkBuffer)
 {
     ASSERT(bytecodeIndex != std::numeric_limits<unsigned>::max());
-    info.bytecodeIndex = bytecodeIndex;
+    info.codeOrigin = CodeOrigin(bytecodeIndex);
     info.callReturnLocation = linkBuffer.locationOf(callReturnLocation);
     info.hotPathBegin = linkBuffer.locationOf(hotPathBegin);
 

Modified: branches/dfgFourthTier/Source/_javascript_Core/jit/JIT.h (151081 => 151082)


--- branches/dfgFourthTier/Source/_javascript_Core/jit/JIT.h	2013-06-02 08:33:09 UTC (rev 151081)
+++ branches/dfgFourthTier/Source/_javascript_Core/jit/JIT.h	2013-06-02 17:29:35 UTC (rev 151082)
@@ -312,40 +312,40 @@
         static void compileGetByIdProto(VM* vm, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, PropertyOffset cachedOffset, ReturnAddressPtr returnAddress)
         {
             JIT jit(vm, codeBlock);
-            jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
+            jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
             jit.privateCompileGetByIdProto(stubInfo, structure, prototypeStructure, ident, slot, cachedOffset, returnAddress, callFrame);
         }
 
         static void compileGetByIdSelfList(VM* vm, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, const Identifier& ident, const PropertySlot& slot, PropertyOffset cachedOffset)
         {
             JIT jit(vm, codeBlock);
-            jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
+            jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
             jit.privateCompileGetByIdSelfList(stubInfo, polymorphicStructures, currentIndex, structure, ident, slot, cachedOffset);
         }
         static void compileGetByIdProtoList(VM* vm, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, PropertyOffset cachedOffset)
         {
             JIT jit(vm, codeBlock);
-            jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
+            jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
             jit.privateCompileGetByIdProtoList(stubInfo, prototypeStructureList, currentIndex, structure, prototypeStructure, ident, slot, cachedOffset, callFrame);
         }
         static void compileGetByIdChainList(VM* vm, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, PropertyOffset cachedOffset)
         {
             JIT jit(vm, codeBlock);
-            jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
+            jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
             jit.privateCompileGetByIdChainList(stubInfo, prototypeStructureList, currentIndex, structure, chain, count, ident, slot, cachedOffset, callFrame);
         }
 
         static void compileGetByIdChain(VM* vm, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, PropertyOffset cachedOffset, ReturnAddressPtr returnAddress)
         {
             JIT jit(vm, codeBlock);
-            jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
+            jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
             jit.privateCompileGetByIdChain(stubInfo, structure, chain, count, ident, slot, cachedOffset, returnAddress, callFrame);
         }
         
         static void compilePutByIdTransition(VM* vm, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, PropertyOffset cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
         {
             JIT jit(vm, codeBlock);
-            jit.m_bytecodeOffset = stubInfo->bytecodeIndex;
+            jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
             jit.privateCompilePutByIdTransition(stubInfo, oldStructure, newStructure, cachedOffset, chain, returnAddress, direct);
         }
         

Modified: branches/dfgFourthTier/Source/_javascript_Core/jit/JITPropertyAccess.cpp (151081 => 151082)


--- branches/dfgFourthTier/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2013-06-02 08:33:09 UTC (rev 151081)
+++ branches/dfgFourthTier/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2013-06-02 17:29:35 UTC (rev 151082)
@@ -708,7 +708,7 @@
     if (m_codeBlock->capabilityLevelState() != DFG::CannotCompile) {
         sub32(
             TrustedImm32(1),
-            AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->bytecodeIndex)->m_counter));
+            AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->codeOrigin.bytecodeIndex)->m_counter));
     }
 #endif
     

Modified: branches/dfgFourthTier/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (151081 => 151082)


--- branches/dfgFourthTier/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2013-06-02 08:33:09 UTC (rev 151081)
+++ branches/dfgFourthTier/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2013-06-02 17:29:35 UTC (rev 151082)
@@ -651,7 +651,7 @@
     if (m_codeBlock->capabilityLevelState() != DFG::CannotCompile) {
         sub32(
             TrustedImm32(1),
-            AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->bytecodeIndex)->m_counter));
+            AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->codeOrigin.bytecodeIndex)->m_counter));
     }
 #endif
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to