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

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

Issue 88043002: Out-of-line constant pool on Arm: Stage 3 - Set Constant Pool Pointer on Function Entry (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add immed check Created 7 years 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
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 471 }
472 VisitSharedFunctionInfoStrongCode(heap, object); 472 VisitSharedFunctionInfoStrongCode(heap, object);
473 } 473 }
474 474
475 475
476 template<typename StaticVisitor> 476 template<typename StaticVisitor>
477 void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( 477 void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray(
478 Map* map, HeapObject* object) { 478 Map* map, HeapObject* object) {
479 Heap* heap = map->GetHeap(); 479 Heap* heap = map->GetHeap();
480 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object); 480 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object);
481 int first_ptr_offset = constant_pool->OffsetOfElementAt( 481 if (constant_pool->count_of_ptr_entries() > 0) {
482 constant_pool->first_ptr_index()); 482 int first_ptr_offset = constant_pool->OffsetOfElementAt(
483 int last_ptr_offset = constant_pool->OffsetOfElementAt( 483 constant_pool->first_ptr_index());
484 constant_pool->first_ptr_index() + constant_pool->count_of_ptr_entries()); 484 int last_ptr_offset = constant_pool->OffsetOfElementAt(
485 StaticVisitor::VisitPointers( 485 constant_pool->first_ptr_index() +
486 heap, 486 constant_pool->count_of_ptr_entries());
487 HeapObject::RawField(object, first_ptr_offset), 487 StaticVisitor::VisitPointers(
488 HeapObject::RawField(object, last_ptr_offset)); 488 heap,
489 HeapObject::RawField(object, first_ptr_offset),
490 HeapObject::RawField(object, last_ptr_offset));
491 }
489 } 492 }
490 493
491 494
492 template<typename StaticVisitor> 495 template<typename StaticVisitor>
493 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction( 496 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(
494 Map* map, HeapObject* object) { 497 Map* map, HeapObject* object) {
495 Heap* heap = map->GetHeap(); 498 Heap* heap = map->GetHeap();
496 JSFunction* function = JSFunction::cast(object); 499 JSFunction* function = JSFunction::cast(object);
497 MarkCompactCollector* collector = heap->mark_compact_collector(); 500 MarkCompactCollector* collector = heap->mark_compact_collector();
498 if (collector->is_code_flushing_enabled()) { 501 if (collector->is_code_flushing_enabled()) {
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 RelocInfo::ModeMask(RelocInfo::JS_RETURN) | 880 RelocInfo::ModeMask(RelocInfo::JS_RETURN) |
878 RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) | 881 RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) |
879 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); 882 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
880 883
881 // There are two places where we iterate code bodies: here and the 884 // There are two places where we iterate code bodies: here and the
882 // templated CodeIterateBody (below). They should be kept in sync. 885 // templated CodeIterateBody (below). They should be kept in sync.
883 IteratePointer(v, kRelocationInfoOffset); 886 IteratePointer(v, kRelocationInfoOffset);
884 IteratePointer(v, kHandlerTableOffset); 887 IteratePointer(v, kHandlerTableOffset);
885 IteratePointer(v, kDeoptimizationDataOffset); 888 IteratePointer(v, kDeoptimizationDataOffset);
886 IteratePointer(v, kTypeFeedbackInfoOffset); 889 IteratePointer(v, kTypeFeedbackInfoOffset);
890 IteratePointer(v, kConstantPoolOffset);
887 891
888 RelocIterator it(this, mode_mask); 892 RelocIterator it(this, mode_mask);
889 Isolate* isolate = this->GetIsolate(); 893 Isolate* isolate = this->GetIsolate();
890 for (; !it.done(); it.next()) { 894 for (; !it.done(); it.next()) {
891 it.rinfo()->Visit(isolate, v); 895 it.rinfo()->Visit(isolate, v);
892 } 896 }
893 } 897 }
894 898
895 899
896 template<typename StaticVisitor> 900 template<typename StaticVisitor>
(...skipping 13 matching lines...) Expand all
910 reinterpret_cast<Object**>(this->address() + kRelocationInfoOffset)); 914 reinterpret_cast<Object**>(this->address() + kRelocationInfoOffset));
911 StaticVisitor::VisitPointer( 915 StaticVisitor::VisitPointer(
912 heap, 916 heap,
913 reinterpret_cast<Object**>(this->address() + kHandlerTableOffset)); 917 reinterpret_cast<Object**>(this->address() + kHandlerTableOffset));
914 StaticVisitor::VisitPointer( 918 StaticVisitor::VisitPointer(
915 heap, 919 heap,
916 reinterpret_cast<Object**>(this->address() + kDeoptimizationDataOffset)); 920 reinterpret_cast<Object**>(this->address() + kDeoptimizationDataOffset));
917 StaticVisitor::VisitPointer( 921 StaticVisitor::VisitPointer(
918 heap, 922 heap,
919 reinterpret_cast<Object**>(this->address() + kTypeFeedbackInfoOffset)); 923 reinterpret_cast<Object**>(this->address() + kTypeFeedbackInfoOffset));
924 StaticVisitor::VisitPointer(
925 heap,
926 reinterpret_cast<Object**>(this->address() + kConstantPoolOffset));
927
920 928
921 RelocIterator it(this, mode_mask); 929 RelocIterator it(this, mode_mask);
922 for (; !it.done(); it.next()) { 930 for (; !it.done(); it.next()) {
923 it.rinfo()->template Visit<StaticVisitor>(heap); 931 it.rinfo()->template Visit<StaticVisitor>(heap);
924 } 932 }
925 } 933 }
926 934
927 935
928 } } // namespace v8::internal 936 } } // namespace v8::internal
929 937
930 #endif // V8_OBJECTS_VISITING_INL_H_ 938 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« src/frames.h ('K') | « src/objects-inl.h ('k') | src/x64/frames-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698