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

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

Issue 10918067: Refactoring of snapshots. This simplifies and improves (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 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.cc ('k') | src/isolate.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 // 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 HEAP->always_allocate_scope_depth_++; 734 HEAP->always_allocate_scope_depth_++;
735 } 735 }
736 736
737 737
738 AlwaysAllocateScope::~AlwaysAllocateScope() { 738 AlwaysAllocateScope::~AlwaysAllocateScope() {
739 HEAP->always_allocate_scope_depth_--; 739 HEAP->always_allocate_scope_depth_--;
740 ASSERT(HEAP->always_allocate_scope_depth_ == 0); 740 ASSERT(HEAP->always_allocate_scope_depth_ == 0);
741 } 741 }
742 742
743 743
744 LinearAllocationScope::LinearAllocationScope() {
745 HEAP->linear_allocation_scope_depth_++;
746 }
747
748
749 LinearAllocationScope::~LinearAllocationScope() {
750 HEAP->linear_allocation_scope_depth_--;
751 ASSERT(HEAP->linear_allocation_scope_depth_ >= 0);
752 }
753
754
755 #ifdef DEBUG 744 #ifdef DEBUG
756 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { 745 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) {
757 for (Object** current = start; current < end; current++) { 746 for (Object** current = start; current < end; current++) {
758 if ((*current)->IsHeapObject()) { 747 if ((*current)->IsHeapObject()) {
759 HeapObject* object = HeapObject::cast(*current); 748 HeapObject* object = HeapObject::cast(*current);
760 ASSERT(HEAP->Contains(object)); 749 ASSERT(HEAP->Contains(object));
761 ASSERT(object->map()->IsMap()); 750 ASSERT(object->map()->IsMap());
762 } 751 }
763 } 752 }
764 } 753 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 AssertNoAllocation::~AssertNoAllocation() { } 808 AssertNoAllocation::~AssertNoAllocation() { }
820 DisableAssertNoAllocation::DisableAssertNoAllocation() { } 809 DisableAssertNoAllocation::DisableAssertNoAllocation() { }
821 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } 810 DisableAssertNoAllocation::~DisableAssertNoAllocation() { }
822 811
823 #endif 812 #endif
824 813
825 814
826 } } // namespace v8::internal 815 } } // namespace v8::internal
827 816
828 #endif // V8_HEAP_INL_H_ 817 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698