Title: [153205] trunk
Revision
153205
Author
[email protected]
Date
2013-07-24 21:01:54 -0700 (Wed, 24 Jul 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: trunk/LayoutTests/ChangeLog (153204 => 153205)


--- trunk/LayoutTests/ChangeLog	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/LayoutTests/ChangeLog	2013-07-25 04:01:54 UTC (rev 153205)
@@ -1,3 +1,14 @@
+2013-06-03  Filip Pizlo  <[email protected]>
+
+        Unreviewed, unbreak all of the tests.
+        
+        Printing "Some tests failed" is great for the silentTestPass mode, but breaks all previous
+        expected-to-fail tests. Changed it so we only print this helpful message if we're in
+        silentTestPass mode.
+
+        * fast/js/resources/js-test-pre.js:
+        (isSuccessfullyParsed):
+
 2013-05-31  Filip Pizlo  <[email protected]>
 
         fourthTier: convert more fast/js/dfg-* tests to wait for the concurrent JIT

Modified: trunk/LayoutTests/fast/js/resources/js-test-pre.js (153204 => 153205)


--- trunk/LayoutTests/fast/js/resources/js-test-pre.js	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/LayoutTests/fast/js/resources/js-test-pre.js	2013-07-25 04:01:54 UTC (rev 153205)
@@ -622,7 +622,7 @@
     shouldBeTrue("successfullyParsed");
     if (silentTestPass && didPassSomeTestsSilently)
         debug("Passed some tests silently.");
-    if (didFailSomeTests)
+    if (silentTestPass && didFailSomeTests)
         debug("Some tests failed.");
     debug('<br /><span class="pass">TEST COMPLETE</span>');
 }

Modified: trunk/Source/_javascript_Core/ChangeLog (153204 => 153205)


--- trunk/Source/_javascript_Core/ChangeLog	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-07-25 04:01:54 UTC (rev 153205)
@@ -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: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (153204 => 153205)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2013-07-25 04:01:54 UTC (rev 153205)
@@ -2644,7 +2644,7 @@
         if (!info.stub->code().executableMemory()->contains(returnAddress.value()))
             continue;
 
-        RELEASE_ASSERT(info.stub->codeOrigin().bytecodeIndex < CodeOrigin::invalidBytecodeIndex);
+        RELEASE_ASSERT(info.stub->codeOrigin().bytecodeIndex != CodeOrigin::invalidBytecodeIndex);
         return info.stub.get();
     }
     
@@ -2657,7 +2657,7 @@
         ClosureCallStubRoutine* stub = static_cast<ClosureCallStubRoutine*>(genericStub);
         if (!stub->code().executableMemory()->contains(returnAddress.value()))
             continue;
-        RELEASE_ASSERT(stub->codeOrigin().bytecodeIndex < CodeOrigin::invalidBytecodeIndex);
+        RELEASE_ASSERT(stub->codeOrigin().bytecodeIndex != CodeOrigin::invalidBytecodeIndex);
         return stub;
     }
     
@@ -2717,9 +2717,9 @@
         if (inlineCallFrame->baselineCodeBlock() == this)
             break;
         origin = inlineCallFrame->caller;
-        RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::invalidBytecodeIndex);
+        RELEASE_ASSERT(origin.bytecodeIndex != CodeOrigin::invalidBytecodeIndex);
     }
-    RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::invalidBytecodeIndex);
+    RELEASE_ASSERT(origin.bytecodeIndex != CodeOrigin::invalidBytecodeIndex);
     unsigned bytecodeIndex = origin.bytecodeIndex;
     RELEASE_ASSERT(bytecodeIndex < instructionCount());
     return bytecodeIndex;

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h (153204 => 153205)


--- trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2013-07-25 04:01:54 UTC (rev 153205)
@@ -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: trunk/Source/_javascript_Core/jit/JIT.cpp (153204 => 153205)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2013-07-25 04:01:54 UTC (rev 153205)
@@ -527,7 +527,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: trunk/Source/_javascript_Core/jit/JIT.h (153204 => 153205)


--- trunk/Source/_javascript_Core/jit/JIT.h	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/jit/JIT.h	2013-07-25 04:01:54 UTC (rev 153205)
@@ -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: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (153204 => 153205)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2013-07-25 04:01:54 UTC (rev 153205)
@@ -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: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (153204 => 153205)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2013-07-25 04:01:52 UTC (rev 153204)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2013-07-25 04:01:54 UTC (rev 153205)
@@ -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