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

Side by Side Diff: src/objects-visiting-inl.h

Issue 11794045: Use POLYMORPHIC for polymorphic Keyed(Load|Store)IC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/type-info.h » ('j') | 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 template<typename StaticVisitor> 205 template<typename StaticVisitor>
206 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget( 206 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(
207 Heap* heap, RelocInfo* rinfo) { 207 Heap* heap, RelocInfo* rinfo) {
208 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); 208 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
209 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 209 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
210 // Monomorphic ICs are preserved when possible, but need to be flushed 210 // Monomorphic ICs are preserved when possible, but need to be flushed
211 // when they might be keeping a Context alive, or when the heap is about 211 // when they might be keeping a Context alive, or when the heap is about
212 // to be serialized. 212 // to be serialized.
213 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() 213 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
214 && (target->ic_state() == MEGAMORPHIC || heap->flush_monomorphic_ics() || 214 && (target->ic_state() == MEGAMORPHIC ||
215 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() ||
215 Serializer::enabled() || target->ic_age() != heap->global_ic_age())) { 216 Serializer::enabled() || target->ic_age() != heap->global_ic_age())) {
216 IC::Clear(rinfo->pc()); 217 IC::Clear(rinfo->pc());
217 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 218 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
218 } 219 }
219 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 220 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
220 StaticVisitor::MarkObject(heap, target); 221 StaticVisitor::MarkObject(heap, target);
221 } 222 }
222 223
223 224
224 template<typename StaticVisitor> 225 template<typename StaticVisitor>
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 RelocIterator it(this, mode_mask); 680 RelocIterator it(this, mode_mask);
680 for (; !it.done(); it.next()) { 681 for (; !it.done(); it.next()) {
681 it.rinfo()->template Visit<StaticVisitor>(heap); 682 it.rinfo()->template Visit<StaticVisitor>(heap);
682 } 683 }
683 } 684 }
684 685
685 686
686 } } // namespace v8::internal 687 } } // namespace v8::internal
687 688
688 #endif // V8_OBJECTS_VISITING_INL_H_ 689 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698