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 10721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10732 ASSERT(!IsInobjectSlackTrackingInProgress()); | 10732 ASSERT(!IsInobjectSlackTrackingInProgress()); |
10733 | 10733 |
10734 if (!FLAG_clever_optimizations) return; | 10734 if (!FLAG_clever_optimizations) return; |
10735 | 10735 |
10736 // Only initiate the tracking the first time. | 10736 // Only initiate the tracking the first time. |
10737 if (live_objects_may_exist()) return; | 10737 if (live_objects_may_exist()) return; |
10738 set_live_objects_may_exist(true); | 10738 set_live_objects_may_exist(true); |
10739 | 10739 |
10740 // No tracking during the snapshot construction phase. | 10740 // No tracking during the snapshot construction phase. |
10741 Isolate* isolate = GetIsolate(); | 10741 Isolate* isolate = GetIsolate(); |
10742 if (Serializer::enabled(isolate)) return; | 10742 if (isolate->serializer_enabled()) return; |
10743 | 10743 |
10744 if (map->unused_property_fields() == 0) return; | 10744 if (map->unused_property_fields() == 0) return; |
10745 | 10745 |
10746 // Nonzero counter is a leftover from the previous attempt interrupted | 10746 // Nonzero counter is a leftover from the previous attempt interrupted |
10747 // by GC, keep it. | 10747 // by GC, keep it. |
10748 if (construction_count() == 0) { | 10748 if (construction_count() == 0) { |
10749 set_construction_count(kGenerousAllocationCount); | 10749 set_construction_count(kGenerousAllocationCount); |
10750 } | 10750 } |
10751 set_initial_map(map); | 10751 set_initial_map(map); |
10752 Builtins* builtins = isolate->builtins(); | 10752 Builtins* builtins = isolate->builtins(); |
(...skipping 6494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17247 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17247 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17248 static const char* error_messages_[] = { | 17248 static const char* error_messages_[] = { |
17249 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17249 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17250 }; | 17250 }; |
17251 #undef ERROR_MESSAGES_TEXTS | 17251 #undef ERROR_MESSAGES_TEXTS |
17252 return error_messages_[reason]; | 17252 return error_messages_[reason]; |
17253 } | 17253 } |
17254 | 17254 |
17255 | 17255 |
17256 } } // namespace v8::internal | 17256 } } // namespace v8::internal |
OLD | NEW |