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

Side by Side Diff: test/cctest/test-heap.cc

Issue 1369973002: Use FeedbackVectorSlotKind instead of Code::Kind for type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-feedback-vector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3791 matching lines...) Expand 10 before | Expand all | Expand 10 after
3802 } 3802 }
3803 return NULL; 3803 return NULL;
3804 } 3804 }
3805 3805
3806 3806
3807 static void CheckVectorIC(Handle<JSFunction> f, int ic_slot_index, 3807 static void CheckVectorIC(Handle<JSFunction> f, int ic_slot_index,
3808 InlineCacheState desired_state) { 3808 InlineCacheState desired_state) {
3809 Handle<TypeFeedbackVector> vector = 3809 Handle<TypeFeedbackVector> vector =
3810 Handle<TypeFeedbackVector>(f->shared()->feedback_vector()); 3810 Handle<TypeFeedbackVector>(f->shared()->feedback_vector());
3811 FeedbackVectorICSlot slot(ic_slot_index); 3811 FeedbackVectorICSlot slot(ic_slot_index);
3812 if (vector->GetKind(slot) == Code::LOAD_IC) { 3812 if (vector->GetKind(slot) == FeedbackVectorSlotKind::LOAD_IC) {
3813 LoadICNexus nexus(vector, slot); 3813 LoadICNexus nexus(vector, slot);
3814 CHECK(nexus.StateFromFeedback() == desired_state); 3814 CHECK(nexus.StateFromFeedback() == desired_state);
3815 } else { 3815 } else {
3816 CHECK(vector->GetKind(slot) == Code::KEYED_LOAD_IC); 3816 CHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, vector->GetKind(slot));
3817 KeyedLoadICNexus nexus(vector, slot); 3817 KeyedLoadICNexus nexus(vector, slot);
3818 CHECK(nexus.StateFromFeedback() == desired_state); 3818 CHECK(nexus.StateFromFeedback() == desired_state);
3819 } 3819 }
3820 } 3820 }
3821 3821
3822 3822
3823 static void CheckVectorICCleared(Handle<JSFunction> f, int ic_slot_index) { 3823 static void CheckVectorICCleared(Handle<JSFunction> f, int ic_slot_index) {
3824 Handle<TypeFeedbackVector> vector = 3824 Handle<TypeFeedbackVector> vector =
3825 Handle<TypeFeedbackVector>(f->shared()->feedback_vector()); 3825 Handle<TypeFeedbackVector>(f->shared()->feedback_vector());
3826 FeedbackVectorICSlot slot(ic_slot_index); 3826 FeedbackVectorICSlot slot(ic_slot_index);
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
6513 // The CollectGarbage call above starts sweeper threads. 6513 // The CollectGarbage call above starts sweeper threads.
6514 // The crash will happen if the following two functions 6514 // The crash will happen if the following two functions
6515 // are called before sweeping finishes. 6515 // are called before sweeping finishes.
6516 heap->StartIncrementalMarking(); 6516 heap->StartIncrementalMarking();
6517 heap->FinalizeIncrementalMarkingIfComplete("test"); 6517 heap->FinalizeIncrementalMarkingIfComplete("test");
6518 } 6518 }
6519 6519
6520 6520
6521 } // namespace internal 6521 } // namespace internal
6522 } // namespace v8 6522 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-feedback-vector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698