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

Side by Side Diff: src/heap.h

Issue 30023003: Remove specialized raw Cell and Map allocators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed offline comments. Created 7 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 | « no previous file | src/heap.cc » ('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 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 // size, pretenuring decision, and preferred old-space. 2084 // size, pretenuring decision, and preferred old-space.
2085 static AllocationSpace SelectSpace(int object_size, 2085 static AllocationSpace SelectSpace(int object_size,
2086 AllocationSpace preferred_old_space, 2086 AllocationSpace preferred_old_space,
2087 PretenureFlag pretenure) { 2087 PretenureFlag pretenure) {
2088 ASSERT(preferred_old_space == OLD_POINTER_SPACE || 2088 ASSERT(preferred_old_space == OLD_POINTER_SPACE ||
2089 preferred_old_space == OLD_DATA_SPACE); 2089 preferred_old_space == OLD_DATA_SPACE);
2090 if (object_size > Page::kMaxNonCodeHeapObjectSize) return LO_SPACE; 2090 if (object_size > Page::kMaxNonCodeHeapObjectSize) return LO_SPACE;
2091 return (pretenure == TENURED) ? preferred_old_space : NEW_SPACE; 2091 return (pretenure == TENURED) ? preferred_old_space : NEW_SPACE;
2092 } 2092 }
2093 2093
2094 // Allocate an uninitialized object in map space. The behavior is identical
2095 // to Heap::AllocateRaw(size_in_bytes, MAP_SPACE), except that (a) it doesn't
2096 // have to test the allocation space argument and (b) can reduce code size
2097 // (since both AllocateRaw and AllocateRawMap are inlined).
2098 MUST_USE_RESULT inline MaybeObject* AllocateRawMap();
2099
2100 // Allocate an uninitialized object in the simple cell space.
2101 MUST_USE_RESULT inline MaybeObject* AllocateRawCell();
2102
2103 // Allocate an uninitialized object in the global property cell space.
2104 MUST_USE_RESULT inline MaybeObject* AllocateRawPropertyCell();
2105
2106 // Allocate an uninitialized fixed array. 2094 // Allocate an uninitialized fixed array.
2107 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray( 2095 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(
2108 int length, PretenureFlag pretenure); 2096 int length, PretenureFlag pretenure);
2109 2097
2110 // Allocate an uninitialized fixed double array. 2098 // Allocate an uninitialized fixed double array.
2111 MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray( 2099 MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray(
2112 int length, PretenureFlag pretenure); 2100 int length, PretenureFlag pretenure);
2113 2101
2114 // Allocate an initialized fixed array with the given filler value. 2102 // Allocate an initialized fixed array with the given filler value.
2115 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithFiller( 2103 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithFiller(
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3070 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3083 3071
3084 private: 3072 private:
3085 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3073 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3086 }; 3074 };
3087 #endif // DEBUG 3075 #endif // DEBUG
3088 3076
3089 } } // namespace v8::internal 3077 } } // namespace v8::internal
3090 3078
3091 #endif // V8_HEAP_H_ 3079 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698