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

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

Issue 226233002: Revert "Reland of https://codereview.chromium.org/172523002/" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/v8globals.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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 303
304 template<typename StaticVisitor> 304 template<typename StaticVisitor>
305 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget( 305 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(
306 Heap* heap, RelocInfo* rinfo) { 306 Heap* heap, RelocInfo* rinfo) {
307 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); 307 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
308 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 308 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
309 // Monomorphic ICs are preserved when possible, but need to be flushed 309 // Monomorphic ICs are preserved when possible, but need to be flushed
310 // when they might be keeping a Context alive, or when the heap is about 310 // when they might be keeping a Context alive, or when the heap is about
311 // to be serialized. 311 // to be serialized.
312
313 // TODO(mvstanton): CALL_IC in monomorphic state needs to be cleared because
314 // it's state is synced with a type feedback slot, which is always cleared on
315 // gc. If we leave it alone, we'll end up in a hybrid of (cleared feedback
316 // slot but monomorphic IC), which is complex.
317 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() 312 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
318 && (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC || 313 && (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC ||
319 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() || 314 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() ||
320 (target->ic_state() == MONOMORPHIC &&
321 target->kind() == Code::CALL_IC) ||
322 Serializer::enabled() || target->ic_age() != heap->global_ic_age())) { 315 Serializer::enabled() || target->ic_age() != heap->global_ic_age())) {
323 IC::Clear(target->GetIsolate(), rinfo->pc(), 316 IC::Clear(target->GetIsolate(), rinfo->pc(),
324 rinfo->host()->constant_pool()); 317 rinfo->host()->constant_pool());
325 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 318 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
326 } 319 }
327 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 320 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
328 StaticVisitor::MarkObject(heap, target); 321 StaticVisitor::MarkObject(heap, target);
329 } 322 }
330 323
331 324
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 RelocIterator it(this, mode_mask); 942 RelocIterator it(this, mode_mask);
950 for (; !it.done(); it.next()) { 943 for (; !it.done(); it.next()) {
951 it.rinfo()->template Visit<StaticVisitor>(heap); 944 it.rinfo()->template Visit<StaticVisitor>(heap);
952 } 945 }
953 } 946 }
954 947
955 948
956 } } // namespace v8::internal 949 } } // namespace v8::internal
957 950
958 #endif // V8_OBJECTS_VISITING_INL_H_ 951 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698