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++) { |