Revert r10811 because of test flakiness.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 23 Feb 2012 14:12:44 +0000 (14:12 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 23 Feb 2012 14:12:44 +0000 (14:12 +0000)
TBR=vegorov@chromium.org
BUG=v8:1322

Review URL: https://chromiumcodereview.appspot.com/9453012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ast.cc
test/mjsunit/compiler/inline-literals.js

index 906c2407299c63f6a9f70ccddfe33fc4e134661a..ca3ab7851d39f69528d2291cf45c314f1bf4743a 100644 (file)
@@ -1010,7 +1010,6 @@ INCREASE_NODE_COUNT(ReturnStatement)
 INCREASE_NODE_COUNT(Conditional)
 INCREASE_NODE_COUNT(Literal)
 INCREASE_NODE_COUNT(ObjectLiteral)
-INCREASE_NODE_COUNT(FunctionLiteral)
 INCREASE_NODE_COUNT(Assignment)
 INCREASE_NODE_COUNT(Throw)
 INCREASE_NODE_COUNT(Property)
@@ -1086,6 +1085,12 @@ void AstConstructionVisitor::VisitDebuggerStatement(DebuggerStatement* node) {
 }
 
 
+void AstConstructionVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
+  increase_node_count();
+  add_flag(kDontInline);
+}
+
+
 void AstConstructionVisitor::VisitSharedFunctionInfoLiteral(
     SharedFunctionInfoLiteral* node) {
   increase_node_count();
index 33d15f5b0444e8f64c2f12c89d84c845fafe44ae..f78abe82d16aa795be48375adc08fc86db02f3ad 100644 (file)
@@ -45,26 +45,6 @@ function TestObjectLiteral(a, b, c) {
 
 TestObjectLiteral(1, 2, 3);
 TestObjectLiteral(1, 2, 3);
-%OptimizeFunctionOnNextCall(o1);
+%OptimizeFunctionOnNextCall(TestObjectLiteral);
 TestObjectLiteral(1, 2, 3);
 TestObjectLiteral('a', 'b', 'c');
-
-function f2() {
-  return function(b, c) { return b + c; };
-}
-
-function f1(a, b, c) {
-  return a + f2()(b, c);
-}
-
-function TestFunctionLiteral(a, b, c) {
-  var expected = a + b + c;
-  var result = f1(a, b, c);
-  assertEquals(expected, result, "TestFunctionLiteral");
-}
-
-TestFunctionLiteral(1, 2, 3);
-TestFunctionLiteral(1, 2, 3);
-%OptimizeFunctionOnNextCall(f1);
-TestFunctionLiteral(1, 2, 3);
-TestFunctionLiteral('a', 'b', 'c');