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

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

Issue 558016: Strengthen a few assertions and add zapping of allocated... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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 | « no previous file | src/objects.h » ('j') | src/spaces.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 Counters::objs_since_last_full.Increment(); 145 Counters::objs_since_last_full.Increment();
146 Counters::objs_since_last_young.Increment(); 146 Counters::objs_since_last_young.Increment();
147 #endif 147 #endif
148 Object* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); 148 Object* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize);
149 if (result->IsFailure()) old_gen_exhausted_ = true; 149 if (result->IsFailure()) old_gen_exhausted_ = true;
150 return result; 150 return result;
151 } 151 }
152 152
153 153
154 bool Heap::InNewSpace(Object* object) { 154 bool Heap::InNewSpace(Object* object) {
155 return new_space_.Contains(object); 155 bool result = new_space_.Contains(object);
156 ASSERT(!result || // Either not in new space
157 gc_state_ != NOT_IN_GC || // ... or in the middle of GC
158 InToSpace(object)); // ... or in to-space (where we allocate).
159 return result;
156 } 160 }
157 161
158 162
159 bool Heap::InFromSpace(Object* object) { 163 bool Heap::InFromSpace(Object* object) {
160 return new_space_.FromSpaceContains(object); 164 return new_space_.FromSpaceContains(object);
161 } 165 }
162 166
163 167
164 bool Heap::InToSpace(Object* object) { 168 bool Heap::InToSpace(Object* object) {
165 return new_space_.ToSpaceContains(object); 169 return new_space_.ToSpaceContains(object);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 402
399 403
400 void ExternalStringTable::ShrinkNewStrings(int position) { 404 void ExternalStringTable::ShrinkNewStrings(int position) {
401 new_space_strings_.Rewind(position); 405 new_space_strings_.Rewind(position);
402 Verify(); 406 Verify();
403 } 407 }
404 408
405 } } // namespace v8::internal 409 } } // namespace v8::internal
406 410
407 #endif // V8_HEAP_INL_H_ 411 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698