Title: [153202] trunk/Source/_javascript_Core
Revision
153202
Author
[email protected]
Date
2013-07-24 21:01:48 -0700 (Wed, 24 Jul 2013)

Log Message

fourthTier: Remove CodeOrigin::valueProfileOffset since it was only needed for op_call_put_result.

Rubber stamped by Mark Hahnenberg.

* bytecode/CodeOrigin.h:
(CodeOrigin):
(JSC::CodeOrigin::CodeOrigin):
(JSC::CodeOrigin::isSet):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::currentCodeOrigin):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::valueProfileFor):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (153201 => 153202)


--- trunk/Source/_javascript_Core/ChangeLog	2013-07-25 04:01:46 UTC (rev 153201)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-07-25 04:01:48 UTC (rev 153202)
@@ -1,5 +1,20 @@
 2013-05-31  Filip Pizlo  <[email protected]>
 
+        Remove CodeOrigin::valueProfileOffset since it was only needed for op_call_put_result.
+
+        Rubber stamped by Mark Hahnenberg.
+
+        * bytecode/CodeOrigin.h:
+        (CodeOrigin):
+        (JSC::CodeOrigin::CodeOrigin):
+        (JSC::CodeOrigin::isSet):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::currentCodeOrigin):
+        * dfg/DFGGraph.h:
+        (JSC::DFG::Graph::valueProfileFor):
+
+2013-05-31  Filip Pizlo  <[email protected]>
+
         Remove finalDestinationOrIgnored since it isn't called anymore.
 
         Rubber stamped by Mark Hahnenberg.
@@ -14,8 +29,6 @@
 
         Reviewed by Gavin Barraclough.
         
-        Work in progress. This still makes like 20 tests crash.
-        
         op_call_put_result is an oddball. Its semantics are that it takes the return
         value of a call instruction, which is set aside in regT0/regT1, and places them
         into some stack slot. This is weird since there is an implicit contract with the

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (153201 => 153202)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2013-07-25 04:01:46 UTC (rev 153201)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2013-07-25 04:01:48 UTC (rev 153202)
@@ -2644,7 +2644,7 @@
         if (!info.stub->code().executableMemory()->contains(returnAddress.value()))
             continue;
 
-        RELEASE_ASSERT(info.stub->codeOrigin().bytecodeIndex < CodeOrigin::maximumBytecodeIndex);
+        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::maximumBytecodeIndex);
+        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::maximumBytecodeIndex);
+        RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::invalidBytecodeIndex);
     }
-    RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::maximumBytecodeIndex);
+    RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::invalidBytecodeIndex);
     unsigned bytecodeIndex = origin.bytecodeIndex;
     RELEASE_ASSERT(bytecodeIndex < instructionCount());
     return bytecodeIndex;

Modified: trunk/Source/_javascript_Core/bytecode/CodeOrigin.h (153201 => 153202)


--- trunk/Source/_javascript_Core/bytecode/CodeOrigin.h	2013-07-25 04:01:46 UTC (rev 153201)
+++ trunk/Source/_javascript_Core/bytecode/CodeOrigin.h	2013-07-25 04:01:48 UTC (rev 153202)
@@ -43,39 +43,31 @@
 class JSFunction;
 
 struct CodeOrigin {
-    static const unsigned maximumBytecodeIndex = (1u << 29) - 1;
+    static const unsigned invalidBytecodeIndex = UINT_MAX;
     
-    // Bytecode offset that you'd use to re-execute this instruction.
-    unsigned bytecodeIndex : 29;
-    // Bytecode offset corresponding to the opcode that gives the result (needed to handle
-    // op_call/op_call_put_result and op_method_check/op_get_by_id).
-    unsigned valueProfileOffset : 3;
+    // Bytecode offset that you'd use to re-execute this instruction, and the
+    // bytecode index of the bytecode instruction that produces some result that
+    // you're interested in (used for mapping Nodes whose values you're using
+    // to bytecode instructions that have the appropriate value profile).
+    unsigned bytecodeIndex;
     
     InlineCallFrame* inlineCallFrame;
     
     CodeOrigin()
-        : bytecodeIndex(maximumBytecodeIndex)
-        , valueProfileOffset(0)
+        : bytecodeIndex(invalidBytecodeIndex)
         , inlineCallFrame(0)
     {
     }
     
-    explicit CodeOrigin(unsigned bytecodeIndex, InlineCallFrame* inlineCallFrame = 0, unsigned valueProfileOffset = 0)
+    explicit CodeOrigin(unsigned bytecodeIndex, InlineCallFrame* inlineCallFrame = 0)
         : bytecodeIndex(bytecodeIndex)
-        , valueProfileOffset(valueProfileOffset)
         , inlineCallFrame(inlineCallFrame)
     {
-        RELEASE_ASSERT(bytecodeIndex <= maximumBytecodeIndex);
-        RELEASE_ASSERT(valueProfileOffset < (1u << 3));
+        ASSERT(bytecodeIndex < invalidBytecodeIndex);
     }
     
-    bool isSet() const { return bytecodeIndex != maximumBytecodeIndex; }
+    bool isSet() const { return bytecodeIndex != invalidBytecodeIndex; }
     
-    unsigned bytecodeIndexForValueProfile() const
-    {
-        return bytecodeIndex + valueProfileOffset;
-    }
-    
     // The inline depth is the depth of the inline stack, so 1 = not inlined,
     // 2 = inlined one deep, etc.
     unsigned inlineDepth() const;

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (153201 => 153202)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2013-07-25 04:01:46 UTC (rev 153201)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2013-07-25 04:01:48 UTC (rev 153202)
@@ -686,7 +686,7 @@
 
     CodeOrigin currentCodeOrigin()
     {
-        return CodeOrigin(m_currentIndex, inlineCallFrame(), 0);
+        return CodeOrigin(m_currentIndex, inlineCallFrame());
     }
     
     bool canFold(Node* node)

Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.h (153201 => 153202)


--- trunk/Source/_javascript_Core/dfg/DFGGraph.h	2013-07-25 04:01:46 UTC (rev 153201)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.h	2013-07-25 04:01:48 UTC (rev 153202)
@@ -445,7 +445,7 @@
         }
         
         if (node->hasHeapPrediction())
-            return profiledBlock->valueProfileForBytecodeOffset(node->codeOrigin.bytecodeIndexForValueProfile());
+            return profiledBlock->valueProfileForBytecodeOffset(node->codeOrigin.bytecodeIndex);
         
         return 0;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to