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

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

Issue 879693004: Remove IC age from Code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove tests Created 5 years, 10 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/objects-inl.h ('k') | no next file » | 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 a64915f0a6d9f4243611f9ab5e9825e4e5520428..4646f3df66e555b128cdbe3342879b8b7b3a9b85 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3393,15 +3393,6 @@ static void CheckVectorIC(Handle<JSFunction> f, int ic_slot_index,
}
-static void CheckVectorICCleared(Handle<JSFunction> f, int ic_slot_index) {
- Handle<TypeFeedbackVector> vector =
- Handle<TypeFeedbackVector>(f->shared()->feedback_vector());
- FeedbackVectorICSlot slot(ic_slot_index);
- LoadICNexus nexus(vector, slot);
- CHECK(IC::IsCleared(&nexus));
-}
-
-
TEST(IncrementalMarkingPreservesMonomorphicIC) {
if (i::FLAG_always_opt) return;
CcTest::InitializeVM();
@@ -3437,50 +3428,6 @@ TEST(IncrementalMarkingPreservesMonomorphicIC) {
}
-TEST(IncrementalMarkingClearsMonomorphicIC) {
- if (i::FLAG_always_opt) return;
- CcTest::InitializeVM();
- v8::HandleScope scope(CcTest::isolate());
- v8::Local<v8::Value> obj1;
-
- {
- LocalContext env;
- CompileRun("function fun() { this.x = 1; }; var obj = new fun();");
- obj1 = env->Global()->Get(v8_str("obj"));
- }
-
- // Prepare function f that contains a monomorphic IC for object
- // originating from a different native context.
- CcTest::global()->Set(v8_str("obj1"), obj1);
- CompileRun("function f(o) { return o.x; } f(obj1); f(obj1);");
- 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);
- if (FLAG_vector_ics) {
- CheckVectorIC(f, 0, MONOMORPHIC);
- CHECK(ic_before->ic_state() == DEFAULT);
- } else {
- CHECK(ic_before->ic_state() == MONOMORPHIC);
- }
-
- // Fire context dispose notification.
- CcTest::isolate()->ContextDisposedNotification();
- SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
-
- Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
- if (FLAG_vector_ics) {
- CheckVectorICCleared(f, 0);
- CHECK(ic_after->ic_state() == DEFAULT);
- } else {
- CHECK(IC::IsCleared(ic_after));
- }
-}
-
-
TEST(IncrementalMarkingPreservesPolymorphicIC) {
if (i::FLAG_always_opt) return;
CcTest::InitializeVM();
@@ -3529,57 +3476,6 @@ TEST(IncrementalMarkingPreservesPolymorphicIC) {
}
-TEST(IncrementalMarkingClearsPolymorphicIC) {
- 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);
- if (FLAG_vector_ics) {
- CheckVectorIC(f, 0, POLYMORPHIC);
- CHECK(ic_before->ic_state() == DEFAULT);
- } else {
- CHECK(ic_before->ic_state() == POLYMORPHIC);
- }
-
- // Fire context dispose notification.
- CcTest::isolate()->ContextDisposedNotification();
- SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
-
- Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
- if (FLAG_vector_ics) {
- CheckVectorICCleared(f, 0);
- CHECK(ic_before->ic_state() == DEFAULT);
- } else {
- CHECK(IC::IsCleared(ic_after));
- }
-}
-
-
class SourceResource : public v8::String::ExternalOneByteStringResource {
public:
explicit SourceResource(const char* data)
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698