OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 10724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10735 void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) { | 10735 void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) { |
10736 ASSERT(!IsInobjectSlackTrackingInProgress()); | 10736 ASSERT(!IsInobjectSlackTrackingInProgress()); |
10737 | 10737 |
10738 if (!FLAG_clever_optimizations) return; | 10738 if (!FLAG_clever_optimizations) return; |
10739 | 10739 |
10740 // Only initiate the tracking the first time. | 10740 // Only initiate the tracking the first time. |
10741 if (live_objects_may_exist()) return; | 10741 if (live_objects_may_exist()) return; |
10742 set_live_objects_may_exist(true); | 10742 set_live_objects_may_exist(true); |
10743 | 10743 |
10744 // No tracking during the snapshot construction phase. | 10744 // No tracking during the snapshot construction phase. |
10745 if (Serializer::enabled()) return; | 10745 Isolate* isolate = GetIsolate(); |
| 10746 if (Serializer::enabled(isolate)) return; |
10746 | 10747 |
10747 if (map->unused_property_fields() == 0) return; | 10748 if (map->unused_property_fields() == 0) return; |
10748 | 10749 |
10749 // Nonzero counter is a leftover from the previous attempt interrupted | 10750 // Nonzero counter is a leftover from the previous attempt interrupted |
10750 // by GC, keep it. | 10751 // by GC, keep it. |
10751 if (construction_count() == 0) { | 10752 if (construction_count() == 0) { |
10752 set_construction_count(kGenerousAllocationCount); | 10753 set_construction_count(kGenerousAllocationCount); |
10753 } | 10754 } |
10754 set_initial_map(map); | 10755 set_initial_map(map); |
10755 Builtins* builtins = map->GetHeap()->isolate()->builtins(); | 10756 Builtins* builtins = isolate->builtins(); |
10756 ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubGeneric), | 10757 ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubGeneric), |
10757 construct_stub()); | 10758 construct_stub()); |
10758 set_construct_stub(builtins->builtin(Builtins::kJSConstructStubCountdown)); | 10759 set_construct_stub(builtins->builtin(Builtins::kJSConstructStubCountdown)); |
10759 } | 10760 } |
10760 | 10761 |
10761 | 10762 |
10762 // Called from GC, hence reinterpret_cast and unchecked accessors. | 10763 // Called from GC, hence reinterpret_cast and unchecked accessors. |
10763 void SharedFunctionInfo::DetachInitialMap() { | 10764 void SharedFunctionInfo::DetachInitialMap() { |
10764 Map* map = reinterpret_cast<Map*>(initial_map()); | 10765 Map* map = reinterpret_cast<Map*>(initial_map()); |
10765 | 10766 |
(...skipping 6557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17323 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17324 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17324 static const char* error_messages_[] = { | 17325 static const char* error_messages_[] = { |
17325 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17326 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17326 }; | 17327 }; |
17327 #undef ERROR_MESSAGES_TEXTS | 17328 #undef ERROR_MESSAGES_TEXTS |
17328 return error_messages_[reason]; | 17329 return error_messages_[reason]; |
17329 } | 17330 } |
17330 | 17331 |
17331 | 17332 |
17332 } } // namespace v8::internal | 17333 } } // namespace v8::internal |
OLD | NEW |