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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "allocation-site-scopes.h" | 8 #include "allocation-site-scopes.h" |
9 #include "api.h" | 9 #include "api.h" |
10 #include "arguments.h" | 10 #include "arguments.h" |
(...skipping 11199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11210 for (int i = 0; i < length; i++) { | 11210 for (int i = 0; i < length; i++) { |
11211 Object* obj = vector->get(i); | 11211 Object* obj = vector->get(i); |
11212 if (obj->IsHeapObject()) { | 11212 if (obj->IsHeapObject()) { |
11213 InstanceType instance_type = | 11213 InstanceType instance_type = |
11214 HeapObject::cast(obj)->map()->instance_type(); | 11214 HeapObject::cast(obj)->map()->instance_type(); |
11215 switch (instance_type) { | 11215 switch (instance_type) { |
11216 case ALLOCATION_SITE_TYPE: | 11216 case ALLOCATION_SITE_TYPE: |
11217 // AllocationSites are not cleared because they do not store | 11217 // AllocationSites are not cleared because they do not store |
11218 // information that leaks. | 11218 // information that leaks. |
11219 break; | 11219 break; |
11220 case JS_FUNCTION_TYPE: | |
11221 // No need to clear the native context array function. | |
11222 if (obj == JSFunction::cast(obj)->context()->native_context()-> | |
11223 get(Context::ARRAY_FUNCTION_INDEX)) { | |
11224 break; | |
11225 } | |
11226 // Fall through... | 11220 // Fall through... |
11227 | |
11228 default: | 11221 default: |
11229 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), | 11222 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), |
11230 SKIP_WRITE_BARRIER); | 11223 SKIP_WRITE_BARRIER); |
11231 } | 11224 } |
11232 } | 11225 } |
11233 } | 11226 } |
11234 } | 11227 } |
11235 | 11228 |
11236 | 11229 |
11237 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 11230 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
(...skipping 6031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17269 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17262 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17270 static const char* error_messages_[] = { | 17263 static const char* error_messages_[] = { |
17271 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17264 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17272 }; | 17265 }; |
17273 #undef ERROR_MESSAGES_TEXTS | 17266 #undef ERROR_MESSAGES_TEXTS |
17274 return error_messages_[reason]; | 17267 return error_messages_[reason]; |
17275 } | 17268 } |
17276 | 17269 |
17277 | 17270 |
17278 } } // namespace v8::internal | 17271 } } // namespace v8::internal |
OLD | NEW |