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

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

Issue 645533003: Use hash map to look for objects in the root array when serializing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: make use of the hash map more often. Created 6 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | src/serialize.h » ('J')
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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 new_space_strings_.Rewind(position); 692 new_space_strings_.Rewind(position);
693 #ifdef VERIFY_HEAP 693 #ifdef VERIFY_HEAP
694 if (FLAG_verify_heap) { 694 if (FLAG_verify_heap) {
695 Verify(); 695 Verify();
696 } 696 }
697 #endif 697 #endif
698 } 698 }
699 699
700 700
701 void Heap::ClearInstanceofCache() { 701 void Heap::ClearInstanceofCache() {
702 set_instanceof_cache_function(the_hole_value()); 702 set_instanceof_cache_function(Smi::FromInt(0));
703 } 703 }
704 704
705 705
706 Object* Heap::ToBoolean(bool condition) { 706 Object* Heap::ToBoolean(bool condition) {
707 return condition ? true_value() : false_value(); 707 return condition ? true_value() : false_value();
708 } 708 }
709 709
710 710
711 void Heap::CompletelyClearInstanceofCache() { 711 void Heap::CompletelyClearInstanceofCache() {
712 set_instanceof_cache_map(the_hole_value()); 712 set_instanceof_cache_map(Smi::FromInt(0));
713 set_instanceof_cache_function(the_hole_value()); 713 set_instanceof_cache_function(Smi::FromInt(0));
714 } 714 }
715 715
716 716
717 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) 717 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate)
718 : heap_(isolate->heap()), daf_(isolate) { 718 : heap_(isolate->heap()), daf_(isolate) {
719 // We shouldn't hit any nested scopes, because that requires 719 // We shouldn't hit any nested scopes, because that requires
720 // non-handle code to call handle code. The code still works but 720 // non-handle code to call handle code. The code still works but
721 // performance will degrade, so we want to catch this situation 721 // performance will degrade, so we want to catch this situation
722 // in debug mode. 722 // in debug mode.
723 DCHECK(heap_->always_allocate_scope_depth_ == 0); 723 DCHECK(heap_->always_allocate_scope_depth_ == 0);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 772 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
773 for (Object** current = start; current < end; current++) { 773 for (Object** current = start; current < end; current++) {
774 CHECK((*current)->IsSmi()); 774 CHECK((*current)->IsSmi());
775 } 775 }
776 } 776 }
777 } 777 }
778 } // namespace v8::internal 778 } // namespace v8::internal
779 779
780 #endif // V8_HEAP_HEAP_INL_H_ 780 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | src/serialize.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698