| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 // IncrementalMarking. | 269 // IncrementalMarking. |
| 270 int size_delta = to_trim * entry_size; | 270 int size_delta = to_trim * entry_size; |
| 271 if (heap->marking()->TransferMark(elms->address(), | 271 if (heap->marking()->TransferMark(elms->address(), |
| 272 elms->address() + size_delta)) { | 272 elms->address() + size_delta)) { |
| 273 MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta); | 273 MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta); |
| 274 } | 274 } |
| 275 | 275 |
| 276 FixedArrayBase* new_elms = FixedArrayBase::cast(HeapObject::FromAddress( | 276 FixedArrayBase* new_elms = FixedArrayBase::cast(HeapObject::FromAddress( |
| 277 elms->address() + size_delta)); | 277 elms->address() + size_delta)); |
| 278 HeapProfiler* profiler = heap->isolate()->heap_profiler(); | 278 HeapProfiler* profiler = heap->isolate()->heap_profiler(); |
| 279 if (profiler->is_profiling()) { | 279 if (profiler->is_tracking_object_moves()) { |
| 280 profiler->ObjectMoveEvent(elms->address(), | 280 profiler->ObjectMoveEvent(elms->address(), |
| 281 new_elms->address(), | 281 new_elms->address(), |
| 282 new_elms->Size()); | 282 new_elms->Size()); |
| 283 if (profiler->is_tracking_allocations()) { | 283 } |
| 284 // Report filler object as a new allocation. | 284 if (profiler->is_tracking_allocations()) { |
| 285 // Otherwise it will become an untracked object. | 285 // Report filler object as a new allocation. |
| 286 profiler->NewObjectEvent(elms->address(), elms->Size()); | 286 // Otherwise it will become an untracked object. |
| 287 } | 287 profiler->NewObjectEvent(elms->address(), elms->Size()); |
| 288 } | 288 } |
| 289 return new_elms; | 289 return new_elms; |
| 290 } | 290 } |
| 291 | 291 |
| 292 | 292 |
| 293 static bool ArrayPrototypeHasNoElements(Heap* heap, | 293 static bool ArrayPrototypeHasNoElements(Heap* heap, |
| 294 Context* native_context, | 294 Context* native_context, |
| 295 JSObject* array_proto) { | 295 JSObject* array_proto) { |
| 296 // This method depends on non writability of Object and Array prototype | 296 // This method depends on non writability of Object and Array prototype |
| 297 // fields. | 297 // fields. |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 } | 1799 } |
| 1800 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1800 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1801 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1801 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1802 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1802 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1803 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1803 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1804 #undef DEFINE_BUILTIN_ACCESSOR_C | 1804 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1805 #undef DEFINE_BUILTIN_ACCESSOR_A | 1805 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1806 | 1806 |
| 1807 | 1807 |
| 1808 } } // namespace v8::internal | 1808 } } // namespace v8::internal |
| OLD | NEW |