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

Unified Diff: test/cctest/compiler/test-run-bytecode-graph-builder.cc

Issue 2254493002: [interpreter] Use VisitForTest for loop conditions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase(line) golden file Created 4 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-bytecode-graph-builder.cc
diff --git a/test/cctest/compiler/test-run-bytecode-graph-builder.cc b/test/cctest/compiler/test-run-bytecode-graph-builder.cc
index 024747f9f76fbc83f10848dde57bee6064897c1e..735cb197b569f9dbc79ad86e5e74904b22b57ab7 100644
--- a/test/cctest/compiler/test-run-bytecode-graph-builder.cc
+++ b/test/cctest/compiler/test-run-bytecode-graph-builder.cc
@@ -2332,7 +2332,19 @@ TEST(BytecodeGraphBuilderDo) {
" if (x == 4) break;\n"
"} while (x < 7);\n"
"return y;",
- {factory->NewNumberFromInt(16)}}};
+ {factory->NewNumberFromInt(16)}},
+ {"var x = 0, sum = 0;\n"
+ "do {\n"
+ " do {\n"
+ " ++sum;\n"
+ " ++x;\n"
+ " } while (sum < 1 || x < 2)\n"
+ " do {\n"
+ " ++x;\n"
+ " } while (x < 1)\n"
+ "} while (sum < 3)\n"
+ "return sum;",
+ {factory->NewNumber(3)}}};
for (size_t i = 0; i < arraysize(snippets); i++) {
ScopedVector<char> script(1024);
@@ -2413,6 +2425,19 @@ TEST(BytecodeGraphBuilderFor) {
"}\n"
"return sum;",
{factory->NewNumberFromInt(385)}},
+ {"var sum = 0;\n"
+ "for (var x = 0; x < 5; x++) {\n"
+ " for (var y = 0; y < 5; y++) {\n"
+ " ++sum;\n"
+ " }\n"
+ "}\n"
+ "for (var x = 0; x < 5; x++) {\n"
+ " for (var y = 0; y < 5; y++) {\n"
+ " ++sum;\n"
+ " }\n"
+ "}\n"
+ "return sum;",
+ {factory->NewNumberFromInt(50)}},
};
for (size_t i = 0; i < arraysize(snippets); i++) {
« no previous file with comments | « src/interpreter/control-flow-builders.cc ('k') | test/cctest/interpreter/bytecode_expectations/BasicLoops.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698