| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2749 set_experimental_extra_natives_source_cache( | 2749 set_experimental_extra_natives_source_cache( |
| 2750 *factory->NewFixedArray(ExperimentalExtraNatives::GetBuiltinsCount())); | 2750 *factory->NewFixedArray(ExperimentalExtraNatives::GetBuiltinsCount())); |
| 2751 | 2751 |
| 2752 set_undefined_cell(*factory->NewCell(factory->undefined_value())); | 2752 set_undefined_cell(*factory->NewCell(factory->undefined_value())); |
| 2753 | 2753 |
| 2754 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 2754 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
| 2755 // Number of queued microtasks stored in Isolate::pending_microtask_count(). | 2755 // Number of queued microtasks stored in Isolate::pending_microtask_count(). |
| 2756 set_microtask_queue(empty_fixed_array()); | 2756 set_microtask_queue(empty_fixed_array()); |
| 2757 | 2757 |
| 2758 { | 2758 { |
| 2759 StaticFeedbackVectorSpec spec; | |
| 2760 FeedbackVectorSlot slot = spec.AddLoadICSlot(); | |
| 2761 DCHECK_EQ(slot, FeedbackVectorSlot(TypeFeedbackVector::kDummyLoadICSlot)); | |
| 2762 USE(slot); | |
| 2763 | |
| 2764 Handle<TypeFeedbackMetadata> dummy_metadata = | |
| 2765 TypeFeedbackMetadata::New(isolate(), &spec); | |
| 2766 Handle<TypeFeedbackVector> dummy_vector = | |
| 2767 TypeFeedbackVector::New(isolate(), dummy_metadata); | |
| 2768 | |
| 2769 set_dummy_vector(*dummy_vector); | |
| 2770 | |
| 2771 // Now initialize dummy vector's entries. | |
| 2772 LoadICNexus(isolate()).ConfigureMegamorphic(); | |
| 2773 } | |
| 2774 | |
| 2775 { | |
| 2776 // Create a canonical empty TypeFeedbackVector, which is shared by all | 2759 // Create a canonical empty TypeFeedbackVector, which is shared by all |
| 2777 // functions that don't need actual type feedback slots. Note however | 2760 // functions that don't need actual type feedback slots. Note however |
| 2778 // that all these functions will share the same invocation count, but | 2761 // that all these functions will share the same invocation count, but |
| 2779 // that shouldn't matter since we only use the invocation count to | 2762 // that shouldn't matter since we only use the invocation count to |
| 2780 // relativize the absolute call counts, but we can only have call counts | 2763 // relativize the absolute call counts, but we can only have call counts |
| 2781 // if we have actual feedback slots. | 2764 // if we have actual feedback slots. |
| 2782 Handle<FixedArray> empty_type_feedback_vector = factory->NewFixedArray( | 2765 Handle<FixedArray> empty_type_feedback_vector = factory->NewFixedArray( |
| 2783 TypeFeedbackVector::kReservedIndexCount, TENURED); | 2766 TypeFeedbackVector::kReservedIndexCount, TENURED); |
| 2784 empty_type_feedback_vector->set(TypeFeedbackVector::kMetadataIndex, | 2767 empty_type_feedback_vector->set(TypeFeedbackVector::kMetadataIndex, |
| 2785 empty_fixed_array()); | 2768 empty_fixed_array()); |
| (...skipping 3802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6588 } | 6571 } |
| 6589 | 6572 |
| 6590 | 6573 |
| 6591 // static | 6574 // static |
| 6592 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6575 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6593 return StaticVisitorBase::GetVisitorId(map); | 6576 return StaticVisitorBase::GetVisitorId(map); |
| 6594 } | 6577 } |
| 6595 | 6578 |
| 6596 } // namespace internal | 6579 } // namespace internal |
| 6597 } // namespace v8 | 6580 } // namespace v8 |
| OLD | NEW |