| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 // Maintain marking consistency for HeapObjectIterator and | 342 // Maintain marking consistency for HeapObjectIterator and |
| 343 // IncrementalMarking. | 343 // IncrementalMarking. |
| 344 int size_delta = to_trim * entry_size; | 344 int size_delta = to_trim * entry_size; |
| 345 if (heap->marking()->TransferMark(elms->address(), | 345 if (heap->marking()->TransferMark(elms->address(), |
| 346 elms->address() + size_delta)) { | 346 elms->address() + size_delta)) { |
| 347 MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta); | 347 MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta); |
| 348 } | 348 } |
| 349 | 349 |
| 350 HEAP_PROFILE(heap, ObjectMoveEvent(elms->address(), | 350 HEAP_PROFILE(heap, ObjectMoveEvent(elms->address(), |
| 351 elms->address() + size_delta)); | 351 elms->address() + size_delta, |
| 352 elms->Size())); |
| 352 return FixedArrayBase::cast(HeapObject::FromAddress( | 353 return FixedArrayBase::cast(HeapObject::FromAddress( |
| 353 elms->address() + to_trim * entry_size)); | 354 elms->address() + to_trim * entry_size)); |
| 354 } | 355 } |
| 355 | 356 |
| 356 | 357 |
| 357 static bool ArrayPrototypeHasNoElements(Heap* heap, | 358 static bool ArrayPrototypeHasNoElements(Heap* heap, |
| 358 Context* native_context, | 359 Context* native_context, |
| 359 JSObject* array_proto) { | 360 JSObject* array_proto) { |
| 360 // This method depends on non writability of Object and Array prototype | 361 // This method depends on non writability of Object and Array prototype |
| 361 // fields. | 362 // fields. |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1826 return Handle<Code>(code_address); \ | 1827 return Handle<Code>(code_address); \ |
| 1827 } | 1828 } |
| 1828 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1829 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1829 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1830 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1830 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1831 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1831 #undef DEFINE_BUILTIN_ACCESSOR_C | 1832 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1832 #undef DEFINE_BUILTIN_ACCESSOR_A | 1833 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1833 | 1834 |
| 1834 | 1835 |
| 1835 } } // namespace v8::internal | 1836 } } // namespace v8::internal |
| OLD | NEW |