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

Side by Side Diff: vm/heap.h

Issue 9022025: - Return 0 in the unreachable case. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years 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 | « no previous file | 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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define VM_HEAP_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assert.h" 9 #include "vm/assert.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 switch (space) { 60 switch (space) {
61 case kNew: 61 case kNew:
62 return new_space_->TryAllocate(size); 62 return new_space_->TryAllocate(size);
63 case kOld: 63 case kOld:
64 return old_space_->TryAllocate(size); 64 return old_space_->TryAllocate(size);
65 case kExecutable: 65 case kExecutable:
66 return code_space_->TryAllocate(size); 66 return code_space_->TryAllocate(size);
67 default: 67 default:
68 UNREACHABLE(); 68 UNREACHABLE();
69 } 69 }
70 return 0;
70 } 71 }
71 72
72 // Heap contains the specified address. 73 // Heap contains the specified address.
73 bool Contains(uword addr) const; 74 bool Contains(uword addr) const;
74 bool CodeContains(uword addr) const; 75 bool CodeContains(uword addr) const;
75 76
76 // Visit all pointers in the space. 77 // Visit all pointers in the space.
77 void IterateNewPointers(ObjectPointerVisitor* visitor); 78 void IterateNewPointers(ObjectPointerVisitor* visitor);
78 void IterateOldPointers(ObjectPointerVisitor* visitor); 79 void IterateOldPointers(ObjectPointerVisitor* visitor);
79 void IterateCodePointers(ObjectPointerVisitor* visitor); 80 void IterateCodePointers(ObjectPointerVisitor* visitor);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 public: 122 public:
122 NoGCScope() {} 123 NoGCScope() {}
123 private: 124 private:
124 DISALLOW_COPY_AND_ASSIGN(NoGCScope); 125 DISALLOW_COPY_AND_ASSIGN(NoGCScope);
125 }; 126 };
126 #endif // defined(DEBUG) 127 #endif // defined(DEBUG)
127 128
128 } // namespace dart 129 } // namespace dart
129 130
130 #endif // VM_HEAP_H_ 131 #endif // VM_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698