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.h

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 9 years, 9 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/handles.cc ('k') | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 V(Map, cons_symbol_map, ConsSymbolMap) \ 82 V(Map, cons_symbol_map, ConsSymbolMap) \
83 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \ 83 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \
84 V(Map, external_symbol_map, ExternalSymbolMap) \ 84 V(Map, external_symbol_map, ExternalSymbolMap) \
85 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ 85 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \
86 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ 86 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \
87 V(Map, external_string_map, ExternalStringMap) \ 87 V(Map, external_string_map, ExternalStringMap) \
88 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ 88 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \
89 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ 89 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \
90 V(Map, undetectable_string_map, UndetectableStringMap) \ 90 V(Map, undetectable_string_map, UndetectableStringMap) \
91 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \ 91 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \
92 V(Map, pixel_array_map, PixelArrayMap) \ 92 V(Map, external_pixel_array_map, ExternalPixelArrayMap) \
93 V(Map, external_byte_array_map, ExternalByteArrayMap) \ 93 V(Map, external_byte_array_map, ExternalByteArrayMap) \
94 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ 94 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \
95 V(Map, external_short_array_map, ExternalShortArrayMap) \ 95 V(Map, external_short_array_map, ExternalShortArrayMap) \
96 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ 96 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \
97 V(Map, external_int_array_map, ExternalIntArrayMap) \ 97 V(Map, external_int_array_map, ExternalIntArrayMap) \
98 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ 98 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \
99 V(Map, external_float_array_map, ExternalFloatArrayMap) \ 99 V(Map, external_float_array_map, ExternalFloatArrayMap) \
100 V(Map, context_map, ContextMap) \ 100 V(Map, context_map, ContextMap) \
101 V(Map, catch_context_map, CatchContextMap) \ 101 V(Map, catch_context_map, CatchContextMap) \
102 V(Map, code_map, CodeMap) \ 102 V(Map, code_map, CodeMap) \
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 V(Date_symbol, "Date") \ 164 V(Date_symbol, "Date") \
165 V(this_symbol, "this") \ 165 V(this_symbol, "this") \
166 V(to_string_symbol, "toString") \ 166 V(to_string_symbol, "toString") \
167 V(char_at_symbol, "CharAt") \ 167 V(char_at_symbol, "CharAt") \
168 V(undefined_symbol, "undefined") \ 168 V(undefined_symbol, "undefined") \
169 V(value_of_symbol, "valueOf") \ 169 V(value_of_symbol, "valueOf") \
170 V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \ 170 V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \
171 V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \ 171 V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \
172 V(KeyedLoadSpecialized_symbol, "KeyedLoadSpecialized") \ 172 V(KeyedLoadSpecialized_symbol, "KeyedLoadSpecialized") \
173 V(KeyedStoreSpecialized_symbol, "KeyedStoreSpecialized") \ 173 V(KeyedStoreSpecialized_symbol, "KeyedStoreSpecialized") \
174 V(KeyedLoadPixelArray_symbol, "KeyedLoadPixelArray") \
175 V(KeyedStorePixelArray_symbol, "KeyedStorePixelArray") \
176 V(stack_overflow_symbol, "kStackOverflowBoilerplate") \ 174 V(stack_overflow_symbol, "kStackOverflowBoilerplate") \
177 V(illegal_access_symbol, "illegal access") \ 175 V(illegal_access_symbol, "illegal access") \
178 V(out_of_memory_symbol, "out-of-memory") \ 176 V(out_of_memory_symbol, "out-of-memory") \
179 V(illegal_execution_state_symbol, "illegal execution state") \ 177 V(illegal_execution_state_symbol, "illegal execution state") \
180 V(get_symbol, "get") \ 178 V(get_symbol, "get") \
181 V(set_symbol, "set") \ 179 V(set_symbol, "set") \
182 V(function_class_symbol, "Function") \ 180 V(function_class_symbol, "Function") \
183 V(illegal_argument_symbol, "illegal argument") \ 181 V(illegal_argument_symbol, "illegal argument") \
184 V(MakeReferenceError_symbol, "MakeReferenceError") \ 182 V(MakeReferenceError_symbol, "MakeReferenceError") \
185 V(MakeSyntaxError_symbol, "MakeSyntaxError") \ 183 V(MakeSyntaxError_symbol, "MakeSyntaxError") \
186 V(MakeTypeError_symbol, "MakeTypeError") \ 184 V(MakeTypeError_symbol, "MakeTypeError") \
187 V(invalid_lhs_in_assignment_symbol, "invalid_lhs_in_assignment") \ 185 V(invalid_lhs_in_assignment_symbol, "invalid_lhs_in_assignment") \
188 V(invalid_lhs_in_for_in_symbol, "invalid_lhs_in_for_in") \ 186 V(invalid_lhs_in_for_in_symbol, "invalid_lhs_in_for_in") \
189 V(invalid_lhs_in_postfix_op_symbol, "invalid_lhs_in_postfix_op") \ 187 V(invalid_lhs_in_postfix_op_symbol, "invalid_lhs_in_postfix_op") \
190 V(invalid_lhs_in_prefix_op_symbol, "invalid_lhs_in_prefix_op") \ 188 V(invalid_lhs_in_prefix_op_symbol, "invalid_lhs_in_prefix_op") \
191 V(illegal_return_symbol, "illegal_return") \ 189 V(illegal_return_symbol, "illegal_return") \
192 V(illegal_break_symbol, "illegal_break") \ 190 V(illegal_break_symbol, "illegal_break") \
193 V(illegal_continue_symbol, "illegal_continue") \ 191 V(illegal_continue_symbol, "illegal_continue") \
194 V(unknown_label_symbol, "unknown_label") \ 192 V(unknown_label_symbol, "unknown_label") \
195 V(redeclaration_symbol, "redeclaration") \ 193 V(redeclaration_symbol, "redeclaration") \
196 V(failure_symbol, "<failure>") \ 194 V(failure_symbol, "<failure>") \
197 V(space_symbol, " ") \ 195 V(space_symbol, " ") \
198 V(exec_symbol, "exec") \ 196 V(exec_symbol, "exec") \
199 V(zero_symbol, "0") \ 197 V(zero_symbol, "0") \
200 V(global_eval_symbol, "GlobalEval") \ 198 V(global_eval_symbol, "GlobalEval") \
201 V(identity_hash_symbol, "v8::IdentityHash") \ 199 V(identity_hash_symbol, "v8::IdentityHash") \
202 V(closure_symbol, "(closure)") \ 200 V(closure_symbol, "(closure)") \
203 V(use_strict, "use strict") \ 201 V(use_strict, "use strict") \
204 V(KeyedLoadExternalArray_symbol, "KeyedLoadExternalArray") \ 202 V(KeyedLoadExternalByteArray_symbol, "KeyedLoadExternalByteArray") \
205 V(KeyedStoreExternalArray_symbol, "KeyedStoreExternalArray") 203 V(KeyedLoadExternalUnsignedByteArray_symbol, \
204 "KeyedLoadExternalUnsignedByteArray") \
205 V(KeyedLoadExternalShortArray_symbol, \
206 "KeyedLoadExternalShortArray") \
207 V(KeyedLoadExternalUnsignedShortArray_symbol, \
208 "KeyedLoadExternalUnsignedShortArray") \
209 V(KeyedLoadExternalIntArray_symbol, "KeyedLoadExternalIntArray") \
210 V(KeyedLoadExternalUnsignedIntArray_symbol, \
211 "KeyedLoadExternalUnsignedIntArray") \
212 V(KeyedLoadExternalFloatArray_symbol, "KeyedLoadExternalFloatArray") \
213 V(KeyedLoadExternalPixelArray_symbol, "KeyedLoadExternalPixelArray") \
214 V(KeyedStoreExternalByteArray_symbol, "KeyedStoreExternalByteArray") \
215 V(KeyedStoreExternalUnsignedByteArray_symbol, \
216 "KeyedStoreExternalUnsignedByteArray") \
217 V(KeyedStoreExternalShortArray_symbol, "KeyedStoreExternalShortArray") \
218 V(KeyedStoreExternalUnsignedShortArray_symbol, \
219 "KeyedStoreExternalUnsignedShortArray") \
220 V(KeyedStoreExternalIntArray_symbol, "KeyedStoreExternalIntArray") \
221 V(KeyedStoreExternalUnsignedIntArray_symbol, \
222 "KeyedStoreExternalUnsignedIntArray") \
223 V(KeyedStoreExternalFloatArray_symbol, "KeyedStoreExternalFloatArray") \
224 V(KeyedStoreExternalPixelArray_symbol, "KeyedStoreExternalPixelArray")
206 225
207 // Forward declarations. 226 // Forward declarations.
208 class GCTracer; 227 class GCTracer;
209 class HeapStats; 228 class HeapStats;
210 class WeakObjectRetainer; 229 class WeakObjectRetainer;
211 230
212 231
213 typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer); 232 typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer);
214 233
215 typedef bool (*DirtyRegionCallback)(Address start, 234 typedef bool (*DirtyRegionCallback)(Address start,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // Please note this does not perform a garbage collection. 492 // Please note this does not perform a garbage collection.
474 MUST_USE_RESULT static MaybeObject* AllocateByteArray(int length, 493 MUST_USE_RESULT static MaybeObject* AllocateByteArray(int length,
475 PretenureFlag pretenure); 494 PretenureFlag pretenure);
476 495
477 // Allocate a non-tenured byte array of the specified length 496 // Allocate a non-tenured byte array of the specified length
478 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 497 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
479 // failed. 498 // failed.
480 // Please note this does not perform a garbage collection. 499 // Please note this does not perform a garbage collection.
481 MUST_USE_RESULT static MaybeObject* AllocateByteArray(int length); 500 MUST_USE_RESULT static MaybeObject* AllocateByteArray(int length);
482 501
483 // Allocate a pixel array of the specified length
484 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
485 // failed.
486 // Please note this does not perform a garbage collection.
487 MUST_USE_RESULT static MaybeObject* AllocatePixelArray(int length,
488 uint8_t* external_pointer,
489 PretenureFlag pretenure);
490
491 // Allocates an external array of the specified length and type. 502 // Allocates an external array of the specified length and type.
492 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 503 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
493 // failed. 504 // failed.
494 // Please note this does not perform a garbage collection. 505 // Please note this does not perform a garbage collection.
495 MUST_USE_RESULT static MaybeObject* AllocateExternalArray( 506 MUST_USE_RESULT static MaybeObject* AllocateExternalArray(
496 int length, 507 int length,
497 ExternalArrayType array_type, 508 ExternalArrayType array_type,
498 void* external_pointer, 509 void* external_pointer,
499 PretenureFlag pretenure); 510 PretenureFlag pretenure);
500 511
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2203 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2193 2204
2194 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2205 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2195 }; 2206 };
2196 #endif // DEBUG || LIVE_OBJECT_LIST 2207 #endif // DEBUG || LIVE_OBJECT_LIST
2197 2208
2198 2209
2199 } } // namespace v8::internal 2210 } } // namespace v8::internal
2200 2211
2201 #endif // V8_HEAP_H_ 2212 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698