Title: [107348] trunk/Source/_javascript_Core
Revision
107348
Author
[email protected]
Date
2012-02-09 19:48:54 -0800 (Thu, 09 Feb 2012)

Log Message

Eliminate dead code in BytecodeGenerator::resolve()
https://bugs.webkit.org/show_bug.cgi?id=78242

Patch by Andy Wingo <[email protected]> on 2012-02-09
Reviewed by Gavin Barraclough.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::resolve):
BytecodeGenerator::shouldOptimizeLocals() is only true for
FunctionCode, and thus cannot be true for GlobalCode.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (107347 => 107348)


--- trunk/Source/_javascript_Core/ChangeLog	2012-02-10 03:45:06 UTC (rev 107347)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-02-10 03:48:54 UTC (rev 107348)
@@ -1,5 +1,17 @@
 2012-02-09  Andy Wingo  <[email protected]>
 
+        Eliminate dead code in BytecodeGenerator::resolve()
+        https://bugs.webkit.org/show_bug.cgi?id=78242
+
+        Reviewed by Gavin Barraclough.
+
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::resolve):
+        BytecodeGenerator::shouldOptimizeLocals() is only true for
+        FunctionCode, and thus cannot be true for GlobalCode.
+
+2012-02-09  Andy Wingo  <[email protected]>
+
         Remove BytecodeGenerator::isLocal
         https://bugs.webkit.org/show_bug.cgi?id=78241
 

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (107347 => 107348)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2012-02-10 03:45:06 UTC (rev 107347)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2012-02-10 03:48:54 UTC (rev 107348)
@@ -1162,15 +1162,8 @@
     }
 
     // Cases where we cannot statically optimize the lookup.
-    if (property == propertyNames().arguments || !canOptimizeNonLocals()) {
-        if (shouldOptimizeLocals() && m_codeType == GlobalCode) {
-            ScopeChainIterator iter = m_scopeChain->begin();
-            JSObject* globalObject = iter->get();
-            ASSERT((++iter) == m_scopeChain->end());
-            return ResolveResult::globalResolve(globalObject);
-        } else
-            return ResolveResult::dynamicResolve(0);
-    }
+    if (property == propertyNames().arguments || !canOptimizeNonLocals())
+        return ResolveResult::dynamicResolve(0);
 
     ScopeChainIterator iter = m_scopeChain->begin();
     ScopeChainIterator end = m_scopeChain->end();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to