OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 10360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10371 if (kind == NULL || *kind == target->kind()) { | 10371 if (kind == NULL || *kind == target->kind()) { |
10372 IC::Clear(this->GetIsolate(), info->pc(), | 10372 IC::Clear(this->GetIsolate(), info->pc(), |
10373 info->host()->constant_pool()); | 10373 info->host()->constant_pool()); |
10374 } | 10374 } |
10375 } | 10375 } |
10376 } | 10376 } |
10377 } | 10377 } |
10378 | 10378 |
10379 | 10379 |
10380 void SharedFunctionInfo::ClearTypeFeedbackInfo() { | 10380 void SharedFunctionInfo::ClearTypeFeedbackInfo() { |
10381 FixedArray* vector = feedback_vector(); | 10381 TypeFeedbackVector* vector = feedback_vector(); |
10382 Heap* heap = GetHeap(); | 10382 Heap* heap = GetHeap(); |
10383 int length = vector->length(); | 10383 int length = vector->length(); |
10384 | 10384 |
10385 for (int i = 0; i < length; i++) { | 10385 for (int i = 0; i < length; i++) { |
10386 Object* obj = vector->get(i); | 10386 Object* obj = vector->get(i); |
10387 if (obj->IsHeapObject()) { | 10387 if (obj->IsHeapObject()) { |
10388 InstanceType instance_type = | 10388 InstanceType instance_type = |
10389 HeapObject::cast(obj)->map()->instance_type(); | 10389 HeapObject::cast(obj)->map()->instance_type(); |
10390 switch (instance_type) { | 10390 switch (instance_type) { |
10391 case ALLOCATION_SITE_TYPE: | 10391 case ALLOCATION_SITE_TYPE: |
10392 // AllocationSites are not cleared because they do not store | 10392 // AllocationSites are not cleared because they do not store |
10393 // information that leaks. | 10393 // information that leaks. |
10394 break; | 10394 break; |
10395 // Fall through... | 10395 // Fall through... |
10396 default: | 10396 default: |
10397 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), | 10397 vector->set(i, TypeFeedbackVector::RawUninitializedSentinel(heap), |
10398 SKIP_WRITE_BARRIER); | 10398 SKIP_WRITE_BARRIER); |
10399 } | 10399 } |
10400 } | 10400 } |
10401 } | 10401 } |
10402 } | 10402 } |
10403 | 10403 |
10404 | 10404 |
10405 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10405 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10406 DisallowHeapAllocation no_gc; | 10406 DisallowHeapAllocation no_gc; |
10407 DCHECK(kind() == FUNCTION); | 10407 DCHECK(kind() == FUNCTION); |
(...skipping 5951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16359 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16359 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16360 static const char* error_messages_[] = { | 16360 static const char* error_messages_[] = { |
16361 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16361 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16362 }; | 16362 }; |
16363 #undef ERROR_MESSAGES_TEXTS | 16363 #undef ERROR_MESSAGES_TEXTS |
16364 return error_messages_[reason]; | 16364 return error_messages_[reason]; |
16365 } | 16365 } |
16366 | 16366 |
16367 | 16367 |
16368 } } // namespace v8::internal | 16368 } } // namespace v8::internal |
OLD | NEW |