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

Side by Side Diff: src/heap/heap-inl.h

Issue 1217943004: Vector ICs: Introduce an InstanceType for the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improved printer. Created 5 years, 5 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
OLDNEW
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 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
11 #include "src/heap/heap.h" 11 #include "src/heap/heap.h"
12 #include "src/heap/store-buffer.h" 12 #include "src/heap/store-buffer.h"
13 #include "src/heap/store-buffer-inl.h" 13 #include "src/heap/store-buffer-inl.h"
14 #include "src/heap-profiler.h" 14 #include "src/heap-profiler.h"
15 #include "src/isolate.h" 15 #include "src/isolate.h"
16 #include "src/list-inl.h" 16 #include "src/list-inl.h"
17 #include "src/msan.h" 17 #include "src/msan.h"
18 #include "src/objects.h" 18 #include "src/objects.h"
19 #include "src/type-feedback-vector.h"
19 20
20 namespace v8 { 21 namespace v8 {
21 namespace internal { 22 namespace internal {
22 23
23 void PromotionQueue::insert(HeapObject* target, int size) { 24 void PromotionQueue::insert(HeapObject* target, int size) {
24 if (emergency_stack_ != NULL) { 25 if (emergency_stack_ != NULL) {
25 emergency_stack_->Add(Entry(target, size)); 26 emergency_stack_->Add(Entry(target, size));
26 return; 27 return;
27 } 28 }
28 29
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return CopyFixedArrayWithMap(src, src->map()); 143 return CopyFixedArrayWithMap(src, src->map());
143 } 144 }
144 145
145 146
146 AllocationResult Heap::CopyFixedDoubleArray(FixedDoubleArray* src) { 147 AllocationResult Heap::CopyFixedDoubleArray(FixedDoubleArray* src) {
147 if (src->length() == 0) return src; 148 if (src->length() == 0) return src;
148 return CopyFixedDoubleArrayWithMap(src, src->map()); 149 return CopyFixedDoubleArrayWithMap(src, src->map());
149 } 150 }
150 151
151 152
153 AllocationResult Heap::CopyTypeFeedbackVector(TypeFeedbackVector* src) {
154 if (src->length() == 0) return src;
155 return CopyTypeFeedbackVectorWithMap(src, src->map());
156 }
157
158
152 AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space, 159 AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
153 AllocationSpace retry_space, 160 AllocationSpace retry_space,
154 AllocationAlignment alignment) { 161 AllocationAlignment alignment) {
155 DCHECK(AllowHandleAllocation::IsAllowed()); 162 DCHECK(AllowHandleAllocation::IsAllowed());
156 DCHECK(AllowHeapAllocation::IsAllowed()); 163 DCHECK(AllowHeapAllocation::IsAllowed());
157 DCHECK(gc_state_ == NOT_IN_GC); 164 DCHECK(gc_state_ == NOT_IN_GC);
158 #ifdef DEBUG 165 #ifdef DEBUG
159 if (FLAG_gc_interval >= 0 && AllowAllocationFailure::IsAllowed(isolate_) && 166 if (FLAG_gc_interval >= 0 && AllowAllocationFailure::IsAllowed(isolate_) &&
160 Heap::allocation_timeout_-- <= 0) { 167 Heap::allocation_timeout_-- <= 0) {
161 return AllocationResult::Retry(space); 168 return AllocationResult::Retry(space);
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 689
683 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 690 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
684 for (Object** current = start; current < end; current++) { 691 for (Object** current = start; current < end; current++) {
685 CHECK((*current)->IsSmi()); 692 CHECK((*current)->IsSmi());
686 } 693 }
687 } 694 }
688 } 695 }
689 } // namespace v8::internal 696 } // namespace v8::internal
690 697
691 #endif // V8_HEAP_HEAP_INL_H_ 698 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698