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

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

Issue 1063513003: [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix script bound variables. Created 5 years, 8 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/compiler/pipeline.cc ('k') | test/mjsunit/compiler/global-delete.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-decls.cc
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
index f3dc77710281e8bc8ffbbe03785a72df5ee9b5f0..bb8e0f3cc34f30482675b143d9455aa10be1cb8d 100644
--- a/test/cctest/test-decls.cc
+++ b/test/cctest/test-decls.cc
@@ -923,6 +923,27 @@ TEST(CrossScriptDynamicLookup) {
}
+TEST(CrossScriptGlobal0) {
Michael Starzinger 2015/04/22 12:42:18 nit: Do we need to add this test, since it's just
+ HandleScope handle_scope(CcTest::isolate());
+ {
+ SimpleContext context;
+
+ context.Check(
+ "var global = this;"
+ "global.x = 255;"
+ "x",
+ EXPECT_RESULT, Number::New(CcTest::isolate(), 255));
+ context.Check(
+ "'use strict';"
+ "let x = 1;"
+ "global.x",
+ EXPECT_RESULT, Number::New(CcTest::isolate(), 255));
+ context.Check("global.x = 15; x", EXPECT_RESULT,
+ Number::New(CcTest::isolate(), 1));
+ }
+}
+
+
TEST(CrossScriptGlobal) {
HandleScope handle_scope(CcTest::isolate());
{
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/mjsunit/compiler/global-delete.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698