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

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

Issue 2223523002: [Interpreter] Avoid dereferencing handles on BytecodeGenerator for AST operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_const_array
Patch Set: Rebase 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
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 235d3e3b1b53ec8c9f78ff02caf47a873d69f740..484d2f32264643d36cb29130e0e3259061185f06 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -23959,6 +23959,24 @@ TEST(StreamingScriptConstantArray) {
RunStreamingTest(chunks);
}
+TEST(StreamingScriptEvalShadowing) {
+ // When run with Ignition, tests that the streaming parser canonicalizes
+ // handles so the Variable::is_possibly_eval() is correct.
+ const char* chunk1 =
+ "(function() {\n"
+ " var y = 2;\n"
+ " return (function() {\n"
+ " eval('var y = 13;');\n"
+ " function g() {\n"
+ " return y\n"
+ " }\n"
+ " return g();\n"
+ " })()\n"
+ "})()\n";
+ const char* chunks[] = {chunk1, NULL};
+ RunStreamingTest(chunks);
+}
+
TEST(StreamingBiggerScript) {
const char* chunk1 =
"function foo() {\n"
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698