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

Side by Side Diff: src/heap/heap-inl.h

Issue 734873002: Use 16 instead of 4 for determining member offsets. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « src/base/macros.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 const v8::GCCallbackFlags callbackFlags) { 580 const v8::GCCallbackFlags callbackFlags) {
581 const char* collector_reason = NULL; 581 const char* collector_reason = NULL;
582 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason); 582 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason);
583 return CollectGarbage(collector, gc_reason, collector_reason, callbackFlags); 583 return CollectGarbage(collector, gc_reason, collector_reason, callbackFlags);
584 } 584 }
585 585
586 586
587 Isolate* Heap::isolate() { 587 Isolate* Heap::isolate() {
588 return reinterpret_cast<Isolate*>( 588 return reinterpret_cast<Isolate*>(
589 reinterpret_cast<intptr_t>(this) - 589 reinterpret_cast<intptr_t>(this) -
590 reinterpret_cast<size_t>(reinterpret_cast<Isolate*>(4)->heap()) + 4); 590 reinterpret_cast<size_t>(reinterpret_cast<Isolate*>(16)->heap()) + 16);
591 } 591 }
592 592
593 593
594 // Calls the FUNCTION_CALL function and retries it up to three times 594 // Calls the FUNCTION_CALL function and retries it up to three times
595 // to guarantee that any allocations performed during the call will 595 // to guarantee that any allocations performed during the call will
596 // succeed if there's enough memory. 596 // succeed if there's enough memory.
597 597
598 // Warning: Do not use the identifiers __object__, __maybe_object__ or 598 // Warning: Do not use the identifiers __object__, __maybe_object__ or
599 // __scope__ in a call to this macro. 599 // __scope__ in a call to this macro.
600 600
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 769
770 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 770 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
771 for (Object** current = start; current < end; current++) { 771 for (Object** current = start; current < end; current++) {
772 CHECK((*current)->IsSmi()); 772 CHECK((*current)->IsSmi());
773 } 773 }
774 } 774 }
775 } 775 }
776 } // namespace v8::internal 776 } // namespace v8::internal
777 777
778 #endif // V8_HEAP_HEAP_INL_H_ 778 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/base/macros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698