DFG should not emit GetMethod node
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2011 02:11:58 +0000 (02:11 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2011 02:11:58 +0000 (02:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=73175

Reviewed by Gavin Barraclough.

Replaces all instances of the GetMethod node with GetById. This appears to
be a slight win on V8. This patch leaves GetMethod support in the code-base,
making this decision easy to reverse, for now.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101217 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

index d30d836..f674864 100644 (file)
@@ -1,3 +1,17 @@
+2011-11-27  Filip Pizlo  <fpizlo@apple.com>
+
+        DFG should not emit GetMethod node
+        https://bugs.webkit.org/show_bug.cgi?id=73175
+
+        Reviewed by Gavin Barraclough.
+        
+        Replaces all instances of the GetMethod node with GetById. This appears to
+        be a slight win on V8. This patch leaves GetMethod support in the code-base,
+        making this decision easy to reverse, for now.
+
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+
 2011-11-26  Hajime Morrita  <morrita@chromium.org>
 
         Needs WTF_INLINE and JS_INLINE
index 3d258cf..ea14c5e 100644 (file)
@@ -1653,10 +1653,8 @@ bool ByteCodeParser::parseBlock(unsigned limit)
                     addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(methodCall.cachedPrototypeStructure.get())), cellConstant(methodCall.cachedPrototype.get()));
                 
                 set(getInstruction[1].u.operand, cellConstant(methodCall.cachedFunction.get()));
-            } else {
-                NodeIndex getMethod = addToGraph(GetMethod, OpInfo(identifier), OpInfo(prediction), base);
-                set(getInstruction[1].u.operand, getMethod);
-            }
+            } else
+                set(getInstruction[1].u.operand, addToGraph(GetById, OpInfo(identifier), OpInfo(prediction), base));
             
             m_currentIndex += OPCODE_LENGTH(op_method_check) + OPCODE_LENGTH(op_get_by_id);
             continue;