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

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

Issue 1288413002: Make some foo.h headers usable without foo-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 4 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
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | 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"
11 #include "src/counters.h" 11 #include "src/counters.h"
12 #include "src/heap/heap.h" 12 #include "src/heap/heap.h"
13 #include "src/heap/incremental-marking-inl.h" 13 #include "src/heap/incremental-marking-inl.h"
14 #include "src/heap/spaces-inl.h" 14 #include "src/heap/spaces-inl.h"
15 #include "src/heap/store-buffer.h" 15 #include "src/heap/store-buffer.h"
16 #include "src/heap/store-buffer-inl.h" 16 #include "src/heap/store-buffer-inl.h"
17 #include "src/heap-profiler.h" 17 #include "src/heap-profiler.h"
18 #include "src/isolate.h" 18 #include "src/isolate.h"
19 #include "src/list-inl.h" 19 #include "src/list-inl.h"
20 #include "src/log.h"
20 #include "src/msan.h" 21 #include "src/msan.h"
21 #include "src/objects.h" 22 #include "src/objects.h"
22 23
23 namespace v8 { 24 namespace v8 {
24 namespace internal { 25 namespace internal {
25 26
26 void PromotionQueue::insert(HeapObject* target, int size) { 27 void PromotionQueue::insert(HeapObject* target, int size) {
27 if (emergency_stack_ != NULL) { 28 if (emergency_stack_ != NULL) {
28 emergency_stack_->Add(Entry(target, size)); 29 emergency_stack_->Add(Entry(target, size));
29 return; 30 return;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 void ExternalStringTable::ShrinkNewStrings(int position) { 626 void ExternalStringTable::ShrinkNewStrings(int position) {
626 new_space_strings_.Rewind(position); 627 new_space_strings_.Rewind(position);
627 #ifdef VERIFY_HEAP 628 #ifdef VERIFY_HEAP
628 if (FLAG_verify_heap) { 629 if (FLAG_verify_heap) {
629 Verify(); 630 Verify();
630 } 631 }
631 #endif 632 #endif
632 } 633 }
633 634
634 635
636 int DescriptorLookupCache::Lookup(Map* source, Name* name) {
637 if (!name->IsUniqueName()) return kAbsent;
638 int index = Hash(source, name);
639 Key& key = keys_[index];
640 if ((key.source == source) && (key.name == name)) return results_[index];
641 return kAbsent;
642 }
643
644
645 void DescriptorLookupCache::Update(Map* source, Name* name, int result) {
646 DCHECK(result != kAbsent);
647 if (name->IsUniqueName()) {
648 int index = Hash(source, name);
649 Key& key = keys_[index];
650 key.source = source;
651 key.name = name;
652 results_[index] = result;
653 }
654 }
655
656
635 void Heap::ClearInstanceofCache() { 657 void Heap::ClearInstanceofCache() {
636 set_instanceof_cache_function(Smi::FromInt(0)); 658 set_instanceof_cache_function(Smi::FromInt(0));
637 } 659 }
638 660
639 661
640 Object* Heap::ToBoolean(bool condition) { 662 Object* Heap::ToBoolean(bool condition) {
641 return condition ? true_value() : false_value(); 663 return condition ? true_value() : false_value();
642 } 664 }
643 665
644 666
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 707
686 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 708 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
687 for (Object** current = start; current < end; current++) { 709 for (Object** current = start; current < end; current++) {
688 CHECK((*current)->IsSmi()); 710 CHECK((*current)->IsSmi());
689 } 711 }
690 } 712 }
691 } 713 }
692 } // namespace v8::internal 714 } // namespace v8::internal
693 715
694 #endif // V8_HEAP_HEAP_INL_H_ 716 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698