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

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

Issue 518007: Simplify checking during allocation when Heap::always_allocate() is... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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') | 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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return AllocateInternalSymbol(&buffer, chars, hash_field); 47 return AllocateInternalSymbol(&buffer, chars, hash_field);
48 } 48 }
49 49
50 50
51 Object* Heap::AllocateRaw(int size_in_bytes, 51 Object* Heap::AllocateRaw(int size_in_bytes,
52 AllocationSpace space, 52 AllocationSpace space,
53 AllocationSpace retry_space) { 53 AllocationSpace retry_space) {
54 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); 54 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC);
55 ASSERT(space != NEW_SPACE || 55 ASSERT(space != NEW_SPACE ||
56 retry_space == OLD_POINTER_SPACE || 56 retry_space == OLD_POINTER_SPACE ||
57 retry_space == OLD_DATA_SPACE); 57 retry_space == OLD_DATA_SPACE ||
58 retry_space == LO_SPACE);
58 #ifdef DEBUG 59 #ifdef DEBUG
59 if (FLAG_gc_interval >= 0 && 60 if (FLAG_gc_interval >= 0 &&
60 !disallow_allocation_failure_ && 61 !disallow_allocation_failure_ &&
61 Heap::allocation_timeout_-- <= 0) { 62 Heap::allocation_timeout_-- <= 0) {
62 return Failure::RetryAfterGC(size_in_bytes, space); 63 return Failure::RetryAfterGC(size_in_bytes, space);
63 } 64 }
64 Counters::objs_since_last_full.Increment(); 65 Counters::objs_since_last_full.Increment();
65 Counters::objs_since_last_young.Increment(); 66 Counters::objs_since_last_young.Increment();
66 #endif 67 #endif
67 Object* result; 68 Object* result;
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 398
398 399
399 void ExternalStringTable::ShrinkNewStrings(int position) { 400 void ExternalStringTable::ShrinkNewStrings(int position) {
400 new_space_strings_.Rewind(position); 401 new_space_strings_.Rewind(position);
401 Verify(); 402 Verify();
402 } 403 }
403 404
404 } } // namespace v8::internal 405 } } // namespace v8::internal
405 406
406 #endif // V8_HEAP_INL_H_ 407 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698