| OLD | NEW |
| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 template<typename StaticVisitor> | 475 template<typename StaticVisitor> |
| 476 void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( | 476 void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( |
| 477 Map* map, HeapObject* object) { | 477 Map* map, HeapObject* object) { |
| 478 Heap* heap = map->GetHeap(); | 478 Heap* heap = map->GetHeap(); |
| 479 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object); | 479 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object); |
| 480 if (constant_pool->count_of_ptr_entries() > 0) { | 480 if (constant_pool->count_of_ptr_entries() > 0) { |
| 481 int first_ptr_offset = constant_pool->OffsetOfElementAt( | 481 int first_ptr_offset = constant_pool->OffsetOfElementAt( |
| 482 constant_pool->first_ptr_index()); | 482 constant_pool->first_ptr_index()); |
| 483 int last_ptr_offset = constant_pool->OffsetOfElementAt( | 483 int last_ptr_offset = constant_pool->OffsetOfElementAt( |
| 484 constant_pool->first_ptr_index() + | 484 constant_pool->first_ptr_index() + |
| 485 constant_pool->count_of_ptr_entries()); | 485 constant_pool->count_of_ptr_entries() - 1); |
| 486 StaticVisitor::VisitPointers( | 486 StaticVisitor::VisitPointers( |
| 487 heap, | 487 heap, |
| 488 HeapObject::RawField(object, first_ptr_offset), | 488 HeapObject::RawField(object, first_ptr_offset), |
| 489 HeapObject::RawField(object, last_ptr_offset)); | 489 HeapObject::RawField(object, last_ptr_offset)); |
| 490 } | 490 } |
| 491 } | 491 } |
| 492 | 492 |
| 493 | 493 |
| 494 template<typename StaticVisitor> | 494 template<typename StaticVisitor> |
| 495 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction( | 495 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction( |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 RelocIterator it(this, mode_mask); | 928 RelocIterator it(this, mode_mask); |
| 929 for (; !it.done(); it.next()) { | 929 for (; !it.done(); it.next()) { |
| 930 it.rinfo()->template Visit<StaticVisitor>(heap); | 930 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 931 } | 931 } |
| 932 } | 932 } |
| 933 | 933 |
| 934 | 934 |
| 935 } } // namespace v8::internal | 935 } } // namespace v8::internal |
| 936 | 936 |
| 937 #endif // V8_OBJECTS_VISITING_INL_H_ | 937 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |