Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: test/cctest/compiler/test-run-inlining.cc

Issue 473263004: Towards removing dependency from generic lowering on compilation info. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add strict mode to store nodes. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/compiler/test-run-inlining.cc
diff --git a/test/cctest/compiler/test-run-inlining.cc b/test/cctest/compiler/test-run-inlining.cc
index e676fb28764dbb1a9e30bd759dd1915935a71ed1..0b876be92bd9bbae8bc343bf19419b6fbc82688f 100644
--- a/test/cctest/compiler/test-run-inlining.cc
+++ b/test/cctest/compiler/test-run-inlining.cc
@@ -36,12 +36,12 @@ static void InstallAssertStackDepthHelper(v8::Isolate* isolate) {
TEST(SimpleInlining) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function(){"
"function foo(s) { AssertStackDepth(1); return s; };"
"function bar(s, t) { return foo(s); };"
- "return bar;})();");
+ "return bar;})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(1), T.Val(1), T.Val(2));
@@ -49,13 +49,13 @@ TEST(SimpleInlining) {
TEST(SimpleInliningContext) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"function foo(s) { AssertStackDepth(1); var x = 12; return s + x; };"
"function bar(s, t) { return foo(s); };"
"return bar;"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(13), T.Val(1), T.Val(2));
@@ -63,14 +63,14 @@ TEST(SimpleInliningContext) {
TEST(CaptureContext) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"var f = (function () {"
"var x = 42;"
"function bar(s) { return x + s; };"
"return (function (s) { return bar(s); });"
"})();"
- "(function (s) { return f(s)})");
+ "(function (s) { return f(s)})",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(42 + 12), T.Val(12), T.undefined());
@@ -80,13 +80,13 @@ TEST(CaptureContext) {
// TODO(sigurds) For now we do not inline any native functions. If we do at
// some point, change this test.
TEST(DontInlineEval) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"var x = 42;"
"(function () {"
"function bar(s, t) { return eval(\"AssertStackDepth(2); x\") };"
"return bar;"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(42), T.Val("x"), T.undefined());
@@ -94,13 +94,13 @@ TEST(DontInlineEval) {
TEST(InlineOmitArguments) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"var x = 42;"
"function bar(s, t, u, v) { AssertStackDepth(1); return x + s; };"
"return (function (s,t) { return bar(s); });"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(42 + 12), T.Val(12), T.undefined());
@@ -108,14 +108,14 @@ TEST(InlineOmitArguments) {
TEST(InlineSurplusArguments) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"var x = 42;"
"function foo(s) { AssertStackDepth(1); return x + s; };"
"function bar(s,t) { return foo(s,t,13); };"
"return bar;"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(42 + 12), T.Val(12), T.undefined());
@@ -123,13 +123,13 @@ TEST(InlineSurplusArguments) {
TEST(InlineTwice) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"var x = 42;"
"function bar(s) { AssertStackDepth(1); return x + s; };"
"return (function (s,t) { return bar(s) + bar(t); });"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(2 * 42 + 12 + 4), T.Val(12), T.Val(4));
@@ -137,14 +137,14 @@ TEST(InlineTwice) {
TEST(InlineTwiceDependent) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"var x = 42;"
"function foo(s) { AssertStackDepth(1); return x + s; };"
"function bar(s,t) { return foo(foo(s)); };"
"return bar;"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(42 + 42 + 12), T.Val(12), T.Val(4));
@@ -152,14 +152,14 @@ TEST(InlineTwiceDependent) {
TEST(InlineTwiceDependentDiamond) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"function foo(s) { if (true) {"
" return 12 } else { return 13; } };"
"function bar(s,t) { return foo(foo(1)); };"
"return bar;"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(12), T.undefined(), T.undefined());
@@ -167,7 +167,6 @@ TEST(InlineTwiceDependentDiamond) {
TEST(InlineTwiceDependentDiamondReal) {
- FLAG_turbo_inlining = true;
FunctionTester T(
"(function () {"
"var x = 41;"
@@ -175,7 +174,8 @@ TEST(InlineTwiceDependentDiamondReal) {
" return x - s } else { return x + s; } };"
"function bar(s,t) { return foo(foo(s)); };"
"return bar;"
- "})();");
+ "})();",
+ true, true);
InstallAssertStackDepthHelper(CcTest::isolate());
T.CheckCall(T.Val(-11), T.Val(11), T.Val(4));
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | tools/run-tests.py » ('j') | tools/run-tests.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698