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

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

Issue 1572283002: [Interpreter] Add wide context slot load / store operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments. 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
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index c41d4a29a6ac19b58a19746fda421f2f29b708e3..4c14fe0f685175df6edb134359b264d49164daf1 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -1944,7 +1944,11 @@ TEST(InterpreterContextVariables) {
HandleAndZoneScope handles;
i::Isolate* isolate = handles.main_isolate();
- std::pair<const char*, Handle<Object>> context_vars[] = {
+ std::ostringstream unique_vars;
+ for (int i = 0; i < 250; i++) {
+ unique_vars << "var a" << i << " = 0;";
+ }
+ std::pair<std::string, Handle<Object>> context_vars[] = {
std::make_pair("var a; (function() { a = 1; })(); return a;",
handle(Smi::FromInt(1), isolate)),
std::make_pair("var a = 10; (function() { a; })(); return a;",
@@ -1959,10 +1963,14 @@ TEST(InterpreterContextVariables) {
"{ let b = 20; var c = function() { [a, b] };\n"
" return a + b; }",
handle(Smi::FromInt(30), isolate)),
+ std::make_pair("'use strict';" + unique_vars.str() +
+ "eval(); var b = 100; return b;",
+ handle(Smi::FromInt(100), isolate)),
};
for (size_t i = 0; i < arraysize(context_vars); i++) {
- std::string source(InterpreterTester::SourceForBody(context_vars[i].first));
+ std::string source(
+ InterpreterTester::SourceForBody(context_vars[i].first.c_str()));
InterpreterTester tester(handles.main_isolate(), source.c_str());
auto callable = tester.GetCallable<>();
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698