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

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

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 3 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-visiting.h ('k') | src/profile-generator.cc » ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 SlicedString::BodyDescriptor, 49 SlicedString::BodyDescriptor,
50 int>::Visit); 50 int>::Visit);
51 51
52 table_.Register(kVisitFixedArray, 52 table_.Register(kVisitFixedArray,
53 &FlexibleBodyVisitor<StaticVisitor, 53 &FlexibleBodyVisitor<StaticVisitor,
54 FixedArray::BodyDescriptor, 54 FixedArray::BodyDescriptor,
55 int>::Visit); 55 int>::Visit);
56 56
57 table_.Register(kVisitFixedDoubleArray, &VisitFixedDoubleArray); 57 table_.Register(kVisitFixedDoubleArray, &VisitFixedDoubleArray);
58 58
59 table_.Register(kVisitNativeContext, 59 table_.Register(kVisitGlobalContext,
60 &FixedBodyVisitor<StaticVisitor, 60 &FixedBodyVisitor<StaticVisitor,
61 Context::ScavengeBodyDescriptor, 61 Context::ScavengeBodyDescriptor,
62 int>::Visit); 62 int>::Visit);
63 63
64 table_.Register(kVisitByteArray, &VisitByteArray); 64 table_.Register(kVisitByteArray, &VisitByteArray);
65 65
66 table_.Register(kVisitSharedFunctionInfo, 66 table_.Register(kVisitSharedFunctionInfo,
67 &FixedBodyVisitor<StaticVisitor, 67 &FixedBodyVisitor<StaticVisitor,
68 SharedFunctionInfo::BodyDescriptor, 68 SharedFunctionInfo::BodyDescriptor,
69 int>::Visit); 69 int>::Visit);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SlicedString::BodyDescriptor, 110 SlicedString::BodyDescriptor,
111 void>::Visit); 111 void>::Visit);
112 112
113 table_.Register(kVisitFixedArray, 113 table_.Register(kVisitFixedArray,
114 &FlexibleBodyVisitor<StaticVisitor, 114 &FlexibleBodyVisitor<StaticVisitor,
115 FixedArray::BodyDescriptor, 115 FixedArray::BodyDescriptor,
116 void>::Visit); 116 void>::Visit);
117 117
118 table_.Register(kVisitFixedDoubleArray, &DataObjectVisitor::Visit); 118 table_.Register(kVisitFixedDoubleArray, &DataObjectVisitor::Visit);
119 119
120 table_.Register(kVisitNativeContext, &VisitNativeContext); 120 table_.Register(kVisitGlobalContext, &VisitGlobalContext);
121 121
122 table_.Register(kVisitByteArray, &DataObjectVisitor::Visit); 122 table_.Register(kVisitByteArray, &DataObjectVisitor::Visit);
123 123
124 table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit); 124 table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit);
125 125
126 table_.Register(kVisitSeqAsciiString, &DataObjectVisitor::Visit); 126 table_.Register(kVisitSeqAsciiString, &DataObjectVisitor::Visit);
127 127
128 table_.Register(kVisitSeqTwoByteString, &DataObjectVisitor::Visit); 128 table_.Register(kVisitSeqTwoByteString, &DataObjectVisitor::Visit);
129 129
130 table_.Register(kVisitJSWeakMap, &StaticVisitor::VisitJSWeakMap); 130 table_.Register(kVisitJSWeakMap, &StaticVisitor::VisitJSWeakMap);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 template<typename StaticVisitor> 211 template<typename StaticVisitor>
212 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget( 212 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(
213 Heap* heap, RelocInfo* rinfo) { 213 Heap* heap, RelocInfo* rinfo) {
214 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); 214 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
215 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 215 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
216 // Monomorphic ICs are preserved when possible, but need to be flushed 216 // Monomorphic ICs are preserved when possible, but need to be flushed
217 // when they might be keeping a Context alive, or when the heap is about 217 // when they might be keeping a Context alive, or when the heap is about
218 // to be serialized. 218 // to be serialized.
219 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() 219 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
220 && (target->ic_state() == MEGAMORPHIC || heap->flush_monomorphic_ics() || 220 && (target->ic_state() == MEGAMORPHIC || Serializer::enabled() ||
221 Serializer::enabled() || target->ic_age() != heap->global_ic_age())) { 221 heap->isolate()->context_exit_happened() ||
222 target->ic_age() != heap->global_ic_age())) {
222 IC::Clear(rinfo->pc()); 223 IC::Clear(rinfo->pc());
223 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 224 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
224 } 225 }
225 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 226 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
226 StaticVisitor::MarkObject(heap, target); 227 StaticVisitor::MarkObject(heap, target);
227 } 228 }
228 229
229 230
230 template<typename StaticVisitor> 231 template<typename StaticVisitor>
231 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext( 232 void StaticMarkingVisitor<StaticVisitor>::VisitGlobalContext(
232 Map* map, HeapObject* object) { 233 Map* map, HeapObject* object) {
233 FixedBodyVisitor<StaticVisitor, 234 FixedBodyVisitor<StaticVisitor,
234 Context::MarkCompactBodyDescriptor, 235 Context::MarkCompactBodyDescriptor,
235 void>::Visit(map, object); 236 void>::Visit(map, object);
236 237
237 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); 238 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector();
238 for (int idx = Context::FIRST_WEAK_SLOT; 239 for (int idx = Context::FIRST_WEAK_SLOT;
239 idx < Context::NATIVE_CONTEXT_SLOTS; 240 idx < Context::GLOBAL_CONTEXT_SLOTS;
240 ++idx) { 241 ++idx) {
241 Object** slot = 242 Object** slot =
242 HeapObject::RawField(object, FixedArray::OffsetOfElementAt(idx)); 243 HeapObject::RawField(object, FixedArray::OffsetOfElementAt(idx));
243 collector->RecordSlot(slot, slot, *slot); 244 collector->RecordSlot(slot, slot, *slot);
244 } 245 }
245 } 246 }
246 247
247 248
248 template<typename StaticVisitor> 249 template<typename StaticVisitor>
249 void StaticMarkingVisitor<StaticVisitor>::VisitCode( 250 void StaticMarkingVisitor<StaticVisitor>::VisitCode(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 RelocIterator it(this, mode_mask); 320 RelocIterator it(this, mode_mask);
320 for (; !it.done(); it.next()) { 321 for (; !it.done(); it.next()) {
321 it.rinfo()->template Visit<StaticVisitor>(heap); 322 it.rinfo()->template Visit<StaticVisitor>(heap);
322 } 323 }
323 } 324 }
324 325
325 326
326 } } // namespace v8::internal 327 } } // namespace v8::internal
327 328
328 #endif // V8_OBJECTS_VISITING_INL_H_ 329 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects-visiting.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698