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

Unified Diff: test/cctest/compiler/test-run-jscalls.cc

Issue 2406803002: [turbofan] Enforce native context specialization. (Closed)
Patch Set: Remove unused variables Created 4 years, 2 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/compiler/test-run-inlining.cc ('k') | test/mjsunit/regress/regress-568765.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-jscalls.cc
diff --git a/test/cctest/compiler/test-run-jscalls.cc b/test/cctest/compiler/test-run-jscalls.cc
index 84d7f714ae232b90057f56f76c77904338dd65da..64bd67cc0a6cf1ae158789eb9633dd49cc2e8af0 100644
--- a/test/cctest/compiler/test-run-jscalls.cc
+++ b/test/cctest/compiler/test-run-jscalls.cc
@@ -205,56 +205,6 @@ TEST(CallEval) {
T.CheckCall(T.Val(42), T.Val("x"), T.undefined());
}
-
-TEST(ContextLoadedFromActivation) {
- const char* script =
- "var x = 42;"
- "(function() {"
- " return function () { return x };"
- "})()";
-
- // Disable context specialization.
- FunctionTester T(script);
- v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
- v8::Context::Scope scope(context);
- v8::Local<v8::Value> value = CompileRun(script);
- i::Handle<i::Object> ofun = v8::Utils::OpenHandle(*value);
- i::Handle<i::JSFunction> jsfun = Handle<JSFunction>::cast(ofun);
- jsfun->set_code(T.function->code());
- jsfun->set_shared(T.function->shared());
- jsfun->set_literals(T.function->literals());
- CHECK(context->Global()
- ->Set(context, v8_str("foo"), v8::Utils::CallableToLocal(jsfun))
- .FromJust());
- CompileRun("var x = 24;");
- ExpectInt32("foo();", 24);
-}
-
-
-TEST(BuiltinLoadedFromActivation) {
- const char* script =
- "var x = 42;"
- "(function() {"
- " return function () { return this; };"
- "})()";
-
- // Disable context specialization.
- FunctionTester T(script);
- v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
- v8::Context::Scope scope(context);
- v8::Local<v8::Value> value = CompileRun(script);
- i::Handle<i::Object> ofun = v8::Utils::OpenHandle(*value);
- i::Handle<i::JSFunction> jsfun = Handle<JSFunction>::cast(ofun);
- jsfun->set_code(T.function->code());
- jsfun->set_shared(T.function->shared());
- jsfun->set_literals(T.function->literals());
- CHECK(context->Global()
- ->Set(context, v8_str("foo"), v8::Utils::CallableToLocal(jsfun))
- .FromJust());
- CompileRun("var x = 24;");
- ExpectObject("foo()", context->Global());
-}
-
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/compiler/test-run-inlining.cc ('k') | test/mjsunit/regress/regress-568765.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698