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

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

Issue 157503002: A64: Synchronize with r18444. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-printer.cc ('k') | src/optimizing-compiler-thread.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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext( 324 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext(
325 Map* map, HeapObject* object) { 325 Map* map, HeapObject* object) {
326 FixedBodyVisitor<StaticVisitor, 326 FixedBodyVisitor<StaticVisitor,
327 Context::MarkCompactBodyDescriptor, 327 Context::MarkCompactBodyDescriptor,
328 void>::Visit(map, object); 328 void>::Visit(map, object);
329 329
330 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); 330 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector();
331 for (int idx = Context::FIRST_WEAK_SLOT; 331 for (int idx = Context::FIRST_WEAK_SLOT;
332 idx < Context::NATIVE_CONTEXT_SLOTS; 332 idx < Context::NATIVE_CONTEXT_SLOTS;
333 ++idx) { 333 ++idx) {
334 Object** slot = 334 Object** slot = Context::cast(object)->RawFieldOfElementAt(idx);
335 HeapObject::RawField(object, FixedArray::OffsetOfElementAt(idx));
336 collector->RecordSlot(slot, slot, *slot); 335 collector->RecordSlot(slot, slot, *slot);
337 } 336 }
338 } 337 }
339 338
340 339
341 template<typename StaticVisitor> 340 template<typename StaticVisitor>
342 void StaticMarkingVisitor<StaticVisitor>::VisitMap( 341 void StaticMarkingVisitor<StaticVisitor>::VisitMap(
343 Map* map, HeapObject* object) { 342 Map* map, HeapObject* object) {
344 Heap* heap = map->GetHeap(); 343 Heap* heap = map->GetHeap();
345 Map* map_object = Map::cast(object); 344 Map* map_object = Map::cast(object);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 470 }
472 VisitSharedFunctionInfoStrongCode(heap, object); 471 VisitSharedFunctionInfoStrongCode(heap, object);
473 } 472 }
474 473
475 474
476 template<typename StaticVisitor> 475 template<typename StaticVisitor>
477 void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( 476 void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray(
478 Map* map, HeapObject* object) { 477 Map* map, HeapObject* object) {
479 Heap* heap = map->GetHeap(); 478 Heap* heap = map->GetHeap();
480 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object); 479 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object);
481 int first_ptr_offset = constant_pool->OffsetOfElementAt( 480 if (constant_pool->count_of_ptr_entries() > 0) {
482 constant_pool->first_ptr_index()); 481 int first_ptr_offset = constant_pool->OffsetOfElementAt(
483 int last_ptr_offset = constant_pool->OffsetOfElementAt( 482 constant_pool->first_ptr_index());
484 constant_pool->first_ptr_index() + constant_pool->count_of_ptr_entries()); 483 int last_ptr_offset = constant_pool->OffsetOfElementAt(
485 StaticVisitor::VisitPointers( 484 constant_pool->first_ptr_index() +
486 heap, 485 constant_pool->count_of_ptr_entries());
487 HeapObject::RawField(object, first_ptr_offset), 486 StaticVisitor::VisitPointers(
488 HeapObject::RawField(object, last_ptr_offset)); 487 heap,
488 HeapObject::RawField(object, first_ptr_offset),
489 HeapObject::RawField(object, last_ptr_offset));
490 }
489 } 491 }
490 492
491 493
492 template<typename StaticVisitor> 494 template<typename StaticVisitor>
493 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction( 495 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(
494 Map* map, HeapObject* object) { 496 Map* map, HeapObject* object) {
495 Heap* heap = map->GetHeap(); 497 Heap* heap = map->GetHeap();
496 JSFunction* function = JSFunction::cast(object); 498 JSFunction* function = JSFunction::cast(object);
497 MarkCompactCollector* collector = heap->mark_compact_collector(); 499 MarkCompactCollector* collector = heap->mark_compact_collector();
498 if (collector->is_code_flushing_enabled()) { 500 if (collector->is_code_flushing_enabled()) {
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 RelocInfo::ModeMask(RelocInfo::JS_RETURN) | 879 RelocInfo::ModeMask(RelocInfo::JS_RETURN) |
878 RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) | 880 RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) |
879 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); 881 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
880 882
881 // There are two places where we iterate code bodies: here and the 883 // There are two places where we iterate code bodies: here and the
882 // templated CodeIterateBody (below). They should be kept in sync. 884 // templated CodeIterateBody (below). They should be kept in sync.
883 IteratePointer(v, kRelocationInfoOffset); 885 IteratePointer(v, kRelocationInfoOffset);
884 IteratePointer(v, kHandlerTableOffset); 886 IteratePointer(v, kHandlerTableOffset);
885 IteratePointer(v, kDeoptimizationDataOffset); 887 IteratePointer(v, kDeoptimizationDataOffset);
886 IteratePointer(v, kTypeFeedbackInfoOffset); 888 IteratePointer(v, kTypeFeedbackInfoOffset);
889 IteratePointer(v, kConstantPoolOffset);
887 890
888 RelocIterator it(this, mode_mask); 891 RelocIterator it(this, mode_mask);
889 Isolate* isolate = this->GetIsolate(); 892 Isolate* isolate = this->GetIsolate();
890 for (; !it.done(); it.next()) { 893 for (; !it.done(); it.next()) {
891 it.rinfo()->Visit(isolate, v); 894 it.rinfo()->Visit(isolate, v);
892 } 895 }
893 } 896 }
894 897
895 898
896 template<typename StaticVisitor> 899 template<typename StaticVisitor>
(...skipping 13 matching lines...) Expand all
910 reinterpret_cast<Object**>(this->address() + kRelocationInfoOffset)); 913 reinterpret_cast<Object**>(this->address() + kRelocationInfoOffset));
911 StaticVisitor::VisitPointer( 914 StaticVisitor::VisitPointer(
912 heap, 915 heap,
913 reinterpret_cast<Object**>(this->address() + kHandlerTableOffset)); 916 reinterpret_cast<Object**>(this->address() + kHandlerTableOffset));
914 StaticVisitor::VisitPointer( 917 StaticVisitor::VisitPointer(
915 heap, 918 heap,
916 reinterpret_cast<Object**>(this->address() + kDeoptimizationDataOffset)); 919 reinterpret_cast<Object**>(this->address() + kDeoptimizationDataOffset));
917 StaticVisitor::VisitPointer( 920 StaticVisitor::VisitPointer(
918 heap, 921 heap,
919 reinterpret_cast<Object**>(this->address() + kTypeFeedbackInfoOffset)); 922 reinterpret_cast<Object**>(this->address() + kTypeFeedbackInfoOffset));
923 StaticVisitor::VisitPointer(
924 heap,
925 reinterpret_cast<Object**>(this->address() + kConstantPoolOffset));
926
920 927
921 RelocIterator it(this, mode_mask); 928 RelocIterator it(this, mode_mask);
922 for (; !it.done(); it.next()) { 929 for (; !it.done(); it.next()) {
923 it.rinfo()->template Visit<StaticVisitor>(heap); 930 it.rinfo()->template Visit<StaticVisitor>(heap);
924 } 931 }
925 } 932 }
926 933
927 934
928 } } // namespace v8::internal 935 } } // namespace v8::internal
929 936
930 #endif // V8_OBJECTS_VISITING_INL_H_ 937 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698