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

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

Issue 771033003: Revert of Use weak cells in map checks in polymorphic ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/cctest.status ('k') | test/mjsunit/opt-elements-kind.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index a21f5416d0bf826f30116f782c4a98313adb049c..825c8223852692fb51c4b8f2e9a3c34cab4c104a 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3423,44 +3423,6 @@
}
-TEST(IncrementalMarkingPreservesPolymorphicIC) {
- if (i::FLAG_always_opt) return;
- CcTest::InitializeVM();
- v8::HandleScope scope(CcTest::isolate());
- v8::Local<v8::Value> obj1, obj2;
-
- {
- LocalContext env;
- CompileRun("function fun() { this.x = 1; }; var obj = new fun();");
- obj1 = env->Global()->Get(v8_str("obj"));
- }
-
- {
- LocalContext env;
- CompileRun("function fun() { this.x = 2; }; var obj = new fun();");
- obj2 = env->Global()->Get(v8_str("obj"));
- }
-
- // Prepare function f that contains a polymorphic IC for objects
- // originating from two different native contexts.
- CcTest::global()->Set(v8_str("obj1"), obj1);
- CcTest::global()->Set(v8_str("obj2"), obj2);
- CompileRun("function f(o) { return o.x; } f(obj1); f(obj1); f(obj2);");
- Handle<JSFunction> f = v8::Utils::OpenHandle(
- *v8::Handle<v8::Function>::Cast(CcTest::global()->Get(v8_str("f"))));
-
- Code* ic_before = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
- CHECK(ic_before->ic_state() == POLYMORPHIC);
-
- // Fire context dispose notification.
- SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
-
- Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
- CHECK(ic_after->ic_state() == POLYMORPHIC);
-}
-
-
TEST(IncrementalMarkingClearsPolymorphicIC) {
if (i::FLAG_always_opt) return;
CcTest::InitializeVM();
@@ -4418,25 +4380,6 @@
}
-TEST(WeakMapInPolymorphicLoadIC) {
- CheckWeakness(
- "function loadIC(obj) {"
- " return obj.name;"
- "}"
- " (function() {"
- " var proto = {'name' : 'weak'};"
- " var obj = Object.create(proto);"
- " loadIC(obj);"
- " loadIC(obj);"
- " loadIC(obj);"
- " var poly = Object.create(proto);"
- " poly.x = true;"
- " loadIC(poly);"
- " return proto;"
- " })();");
-}
-
-
TEST(WeakMapInMonomorphicKeyedLoadIC) {
// TODO(mvstanton): vector ics need weak support!
if (FLAG_vector_ics) return;
@@ -4454,25 +4397,6 @@
}
-TEST(WeakMapInPolymorphicKeyedLoadIC) {
- CheckWeakness(
- "function keyedLoadIC(obj, field) {"
- " return obj[field];"
- "}"
- " (function() {"
- " var proto = {'name' : 'weak'};"
- " var obj = Object.create(proto);"
- " keyedLoadIC(obj, 'name');"
- " keyedLoadIC(obj, 'name');"
- " keyedLoadIC(obj, 'name');"
- " var poly = Object.create(proto);"
- " poly.x = true;"
- " keyedLoadIC(poly, 'name');"
- " return proto;"
- " })();");
-}
-
-
TEST(WeakMapInMonomorphicStoreIC) {
CheckWeakness("function storeIC(obj, value) {"
" obj.name = value;"
@@ -4488,25 +4412,6 @@
}
-TEST(WeakMapInPolymorphicStoreIC) {
- CheckWeakness(
- "function storeIC(obj, value) {"
- " obj.name = value;"
- "}"
- " (function() {"
- " var proto = {'name' : 'weak'};"
- " var obj = Object.create(proto);"
- " storeIC(obj, 'x');"
- " storeIC(obj, 'x');"
- " storeIC(obj, 'x');"
- " var poly = Object.create(proto);"
- " poly.x = true;"
- " storeIC(poly, 'x');"
- " return proto;"
- " })();");
-}
-
-
TEST(WeakMapInMonomorphicKeyedStoreIC) {
CheckWeakness("function keyedStoreIC(obj, field, value) {"
" obj[field] = value;"
@@ -4519,25 +4424,6 @@
" keyedStoreIC(obj, 'x');"
" return proto;"
" })();");
-}
-
-
-TEST(WeakMapInPolymorphicKeyedStoreIC) {
- CheckWeakness(
- "function keyedStoreIC(obj, field, value) {"
- " obj[field] = value;"
- "}"
- " (function() {"
- " var proto = {'name' : 'weak'};"
- " var obj = Object.create(proto);"
- " keyedStoreIC(obj, 'x');"
- " keyedStoreIC(obj, 'x');"
- " keyedStoreIC(obj, 'x');"
- " var poly = Object.create(proto);"
- " poly.x = true;"
- " keyedStoreIC(poly, 'x');"
- " return proto;"
- " })();");
}
« no previous file with comments | « test/cctest/cctest.status ('k') | test/mjsunit/opt-elements-kind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698