| OLD | NEW |
| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/once.h" | 9 #include "src/base/once.h" |
| 10 #include "src/base/utils/random-number-generator.h" | 10 #include "src/base/utils/random-number-generator.h" |
| (...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 static inline void EvacuateSeqTwoByteString(Map* map, | 2186 static inline void EvacuateSeqTwoByteString(Map* map, |
| 2187 HeapObject** slot, | 2187 HeapObject** slot, |
| 2188 HeapObject* object) { | 2188 HeapObject* object) { |
| 2189 int object_size = SeqTwoByteString::cast(object)-> | 2189 int object_size = SeqTwoByteString::cast(object)-> |
| 2190 SeqTwoByteStringSize(map->instance_type()); | 2190 SeqTwoByteStringSize(map->instance_type()); |
| 2191 EvacuateObject<DATA_OBJECT, kObjectAlignment>( | 2191 EvacuateObject<DATA_OBJECT, kObjectAlignment>( |
| 2192 map, slot, object, object_size); | 2192 map, slot, object, object_size); |
| 2193 } | 2193 } |
| 2194 | 2194 |
| 2195 | 2195 |
| 2196 static inline bool IsShortcutCandidate(int type) { | |
| 2197 return ((type & kShortcutTypeMask) == kShortcutTypeTag); | |
| 2198 } | |
| 2199 | |
| 2200 static inline void EvacuateShortcutCandidate(Map* map, | 2196 static inline void EvacuateShortcutCandidate(Map* map, |
| 2201 HeapObject** slot, | 2197 HeapObject** slot, |
| 2202 HeapObject* object) { | 2198 HeapObject* object) { |
| 2203 ASSERT(IsShortcutCandidate(map->instance_type())); | 2199 ASSERT(IsShortcutCandidate(map->instance_type())); |
| 2204 | 2200 |
| 2205 Heap* heap = map->GetHeap(); | 2201 Heap* heap = map->GetHeap(); |
| 2206 | 2202 |
| 2207 if (marks_handling == IGNORE_MARKS && | 2203 if (marks_handling == IGNORE_MARKS && |
| 2208 ConsString::cast(object)->unchecked_second() == | 2204 ConsString::cast(object)->unchecked_second() == |
| 2209 heap->empty_string()) { | 2205 heap->empty_string()) { |
| (...skipping 4205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6415 static_cast<int>(object_sizes_last_time_[index])); | 6411 static_cast<int>(object_sizes_last_time_[index])); |
| 6416 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6412 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6417 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6413 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6418 | 6414 |
| 6419 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6415 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6420 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6416 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6421 ClearObjectStats(); | 6417 ClearObjectStats(); |
| 6422 } | 6418 } |
| 6423 | 6419 |
| 6424 } } // namespace v8::internal | 6420 } } // namespace v8::internal |
| OLD | NEW |