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

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1587033002: [Interpreter] Ensure we always have an outer register allocation scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_mythri
Patch Set: Similarity 20 Created 4 years, 11 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
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 3884a7c7531a973e6fffbc168563da3dca45c890..506cf00cd045dc91af041451c8a613608852c793 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -2231,6 +2231,19 @@ TEST(InterpreterCountOperators) {
handle(Smi::FromInt(3), isolate)),
std::make_pair("var a = 1; (function() { a = 2 })(); return a--;",
handle(Smi::FromInt(2), isolate)),
+ std::make_pair("var i = 5; while(i--) {}; return i;",
+ handle(Smi::FromInt(-1), isolate)),
+ std::make_pair("var i = 1; if(i--) { return 1; } else { return 2; };",
+ handle(Smi::FromInt(1), isolate)),
+ std::make_pair("var i = -2; do {} while(i++) {}; return i;",
+ handle(Smi::FromInt(1), isolate)),
+ std::make_pair("var i = -1; for(; i++; ) {}; return i",
+ handle(Smi::FromInt(1), isolate)),
+ std::make_pair("var i = 20; switch(i++) {\n"
+ " case 20: return 1;\n"
+ " default: return 2;\n"
+ "}",
+ handle(Smi::FromInt(1), isolate)),
};
for (size_t i = 0; i < arraysize(count_ops); i++) {
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698