Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: src/builtins.cc

Issue 22852024: Track JS allocations as they arrive with no affection on performance when tracking is switched off (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code style fixes after review #2 Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 // Maintain marking consistency for HeapObjectIterator and 268 // Maintain marking consistency for HeapObjectIterator and
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 HEAP_PROFILE(heap, ObjectMoveEvent(elms->address(), 276 HEAP_PROFILE(heap, ObjectMoveEvent(elms->address(),
277 elms->address() + size_delta)); 277 elms->address() + size_delta,
278 elms->Size()));
278 return FixedArrayBase::cast(HeapObject::FromAddress( 279 return FixedArrayBase::cast(HeapObject::FromAddress(
279 elms->address() + to_trim * entry_size)); 280 elms->address() + to_trim * entry_size));
280 } 281 }
281 282
282 283
283 static bool ArrayPrototypeHasNoElements(Heap* heap, 284 static bool ArrayPrototypeHasNoElements(Heap* heap,
284 Context* native_context, 285 Context* native_context,
285 JSObject* array_proto) { 286 JSObject* array_proto) {
286 // This method depends on non writability of Object and Array prototype 287 // This method depends on non writability of Object and Array prototype
287 // fields. 288 // fields.
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 return Handle<Code>(code_address); \ 1783 return Handle<Code>(code_address); \
1783 } 1784 }
1784 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1785 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1785 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1786 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1786 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1787 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1787 #undef DEFINE_BUILTIN_ACCESSOR_C 1788 #undef DEFINE_BUILTIN_ACCESSOR_C
1788 #undef DEFINE_BUILTIN_ACCESSOR_A 1789 #undef DEFINE_BUILTIN_ACCESSOR_A
1789 1790
1790 1791
1791 } } // namespace v8::internal 1792 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698