OLD | NEW |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 V(Map, external_symbol_map, ExternalSymbolMap) \ | 73 V(Map, external_symbol_map, ExternalSymbolMap) \ |
74 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ | 74 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ |
75 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ | 75 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ |
76 V(Map, cons_string_map, ConsStringMap) \ | 76 V(Map, cons_string_map, ConsStringMap) \ |
77 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ | 77 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ |
78 V(Map, external_string_map, ExternalStringMap) \ | 78 V(Map, external_string_map, ExternalStringMap) \ |
79 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ | 79 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ |
80 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ | 80 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ |
81 V(Map, undetectable_string_map, UndetectableStringMap) \ | 81 V(Map, undetectable_string_map, UndetectableStringMap) \ |
82 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \ | 82 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \ |
83 V(Map, pixel_array_map, PixelArrayMap) \ | 83 V(Map, external_pixel_array_map, ExternalPixelArrayMap) \ |
84 V(Map, external_byte_array_map, ExternalByteArrayMap) \ | 84 V(Map, external_byte_array_map, ExternalByteArrayMap) \ |
85 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ | 85 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ |
86 V(Map, external_short_array_map, ExternalShortArrayMap) \ | 86 V(Map, external_short_array_map, ExternalShortArrayMap) \ |
87 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ | 87 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ |
88 V(Map, external_int_array_map, ExternalIntArrayMap) \ | 88 V(Map, external_int_array_map, ExternalIntArrayMap) \ |
89 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ | 89 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ |
90 V(Map, external_float_array_map, ExternalFloatArrayMap) \ | 90 V(Map, external_float_array_map, ExternalFloatArrayMap) \ |
91 V(Map, context_map, ContextMap) \ | 91 V(Map, context_map, ContextMap) \ |
92 V(Map, catch_context_map, CatchContextMap) \ | 92 V(Map, catch_context_map, CatchContextMap) \ |
93 V(Map, code_map, CodeMap) \ | 93 V(Map, code_map, CodeMap) \ |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 V(Date_symbol, "Date") \ | 176 V(Date_symbol, "Date") \ |
177 V(this_symbol, "this") \ | 177 V(this_symbol, "this") \ |
178 V(to_string_symbol, "toString") \ | 178 V(to_string_symbol, "toString") \ |
179 V(char_at_symbol, "CharAt") \ | 179 V(char_at_symbol, "CharAt") \ |
180 V(undefined_symbol, "undefined") \ | 180 V(undefined_symbol, "undefined") \ |
181 V(value_of_symbol, "valueOf") \ | 181 V(value_of_symbol, "valueOf") \ |
182 V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \ | 182 V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \ |
183 V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \ | 183 V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \ |
184 V(KeyedLoadSpecialized_symbol, "KeyedLoadSpecialized") \ | 184 V(KeyedLoadSpecialized_symbol, "KeyedLoadSpecialized") \ |
185 V(KeyedStoreSpecialized_symbol, "KeyedStoreSpecialized") \ | 185 V(KeyedStoreSpecialized_symbol, "KeyedStoreSpecialized") \ |
186 V(KeyedLoadPixelArray_symbol, "KeyedLoadPixelArray") \ | |
187 V(KeyedStorePixelArray_symbol, "KeyedStorePixelArray") \ | |
188 V(stack_overflow_symbol, "kStackOverflowBoilerplate") \ | 186 V(stack_overflow_symbol, "kStackOverflowBoilerplate") \ |
189 V(illegal_access_symbol, "illegal access") \ | 187 V(illegal_access_symbol, "illegal access") \ |
190 V(out_of_memory_symbol, "out-of-memory") \ | 188 V(out_of_memory_symbol, "out-of-memory") \ |
191 V(illegal_execution_state_symbol, "illegal execution state") \ | 189 V(illegal_execution_state_symbol, "illegal execution state") \ |
192 V(get_symbol, "get") \ | 190 V(get_symbol, "get") \ |
193 V(set_symbol, "set") \ | 191 V(set_symbol, "set") \ |
194 V(function_class_symbol, "Function") \ | 192 V(function_class_symbol, "Function") \ |
195 V(illegal_argument_symbol, "illegal argument") \ | 193 V(illegal_argument_symbol, "illegal argument") \ |
196 V(MakeReferenceError_symbol, "MakeReferenceError") \ | 194 V(MakeReferenceError_symbol, "MakeReferenceError") \ |
197 V(MakeSyntaxError_symbol, "MakeSyntaxError") \ | 195 V(MakeSyntaxError_symbol, "MakeSyntaxError") \ |
198 V(MakeTypeError_symbol, "MakeTypeError") \ | 196 V(MakeTypeError_symbol, "MakeTypeError") \ |
199 V(invalid_lhs_in_assignment_symbol, "invalid_lhs_in_assignment") \ | 197 V(invalid_lhs_in_assignment_symbol, "invalid_lhs_in_assignment") \ |
200 V(invalid_lhs_in_for_in_symbol, "invalid_lhs_in_for_in") \ | 198 V(invalid_lhs_in_for_in_symbol, "invalid_lhs_in_for_in") \ |
201 V(invalid_lhs_in_postfix_op_symbol, "invalid_lhs_in_postfix_op") \ | 199 V(invalid_lhs_in_postfix_op_symbol, "invalid_lhs_in_postfix_op") \ |
202 V(invalid_lhs_in_prefix_op_symbol, "invalid_lhs_in_prefix_op") \ | 200 V(invalid_lhs_in_prefix_op_symbol, "invalid_lhs_in_prefix_op") \ |
203 V(illegal_return_symbol, "illegal_return") \ | 201 V(illegal_return_symbol, "illegal_return") \ |
204 V(illegal_break_symbol, "illegal_break") \ | 202 V(illegal_break_symbol, "illegal_break") \ |
205 V(illegal_continue_symbol, "illegal_continue") \ | 203 V(illegal_continue_symbol, "illegal_continue") \ |
206 V(unknown_label_symbol, "unknown_label") \ | 204 V(unknown_label_symbol, "unknown_label") \ |
207 V(redeclaration_symbol, "redeclaration") \ | 205 V(redeclaration_symbol, "redeclaration") \ |
208 V(failure_symbol, "<failure>") \ | 206 V(failure_symbol, "<failure>") \ |
209 V(space_symbol, " ") \ | 207 V(space_symbol, " ") \ |
210 V(exec_symbol, "exec") \ | 208 V(exec_symbol, "exec") \ |
211 V(zero_symbol, "0") \ | 209 V(zero_symbol, "0") \ |
212 V(global_eval_symbol, "GlobalEval") \ | 210 V(global_eval_symbol, "GlobalEval") \ |
213 V(identity_hash_symbol, "v8::IdentityHash") \ | 211 V(identity_hash_symbol, "v8::IdentityHash") \ |
214 V(closure_symbol, "(closure)") \ | 212 V(closure_symbol, "(closure)") \ |
215 V(use_strict, "use strict") \ | 213 V(use_strict, "use strict") \ |
216 V(KeyedLoadExternalArray_symbol, "KeyedLoadExternalArray") \ | 214 V(KeyedLoadExternalByteArray_symbol, "KeyedLoadExternalByteArray") \ |
217 V(KeyedStoreExternalArray_symbol, "KeyedStoreExternalArray") | 215 V(KeyedLoadExternalUnsignedByteArray_symbol, \ |
| 216 "KeyedLoadExternalUnsignedByteArray") \ |
| 217 V(KeyedLoadExternalShortArray_symbol, \ |
| 218 "KeyedLoadExternalShortArray") \ |
| 219 V(KeyedLoadExternalUnsignedShortArray_symbol, \ |
| 220 "KeyedLoadExternalUnsignedShortArray") \ |
| 221 V(KeyedLoadExternalIntArray_symbol, "KeyedLoadExternalIntArray") \ |
| 222 V(KeyedLoadExternalUnsignedIntArray_symbol, \ |
| 223 "KeyedLoadExternalUnsignedIntArray") \ |
| 224 V(KeyedLoadExternalFloatArray_symbol, "KeyedLoadExternalFloatArray") \ |
| 225 V(KeyedLoadExternalPixelArray_symbol, "KeyedLoadExternalPixelArray") \ |
| 226 V(KeyedStoreExternalByteArray_symbol, "KeyedStoreExternalByteArray") \ |
| 227 V(KeyedStoreExternalUnsignedByteArray_symbol, \ |
| 228 "KeyedStoreExternalUnsignedByteArray") \ |
| 229 V(KeyedStoreExternalShortArray_symbol, "KeyedStoreExternalShortArray") \ |
| 230 V(KeyedStoreExternalUnsignedShortArray_symbol, \ |
| 231 "KeyedStoreExternalUnsignedShortArray") \ |
| 232 V(KeyedStoreExternalIntArray_symbol, "KeyedStoreExternalIntArray") \ |
| 233 V(KeyedStoreExternalUnsignedIntArray_symbol, \ |
| 234 "KeyedStoreExternalUnsignedIntArray") \ |
| 235 V(KeyedStoreExternalFloatArray_symbol, "KeyedStoreExternalFloatArray") \ |
| 236 V(KeyedStoreExternalPixelArray_symbol, "KeyedStoreExternalPixelArray") |
218 | 237 |
219 | 238 |
220 // Forward declarations. | 239 // Forward declarations. |
221 class GCTracer; | 240 class GCTracer; |
222 class HeapStats; | 241 class HeapStats; |
223 class WeakObjectRetainer; | 242 class WeakObjectRetainer; |
224 | 243 |
225 | 244 |
226 typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer); | 245 typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer); |
227 | 246 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 // Allocate a non-tenured byte array of the specified length | 509 // Allocate a non-tenured byte array of the specified length |
491 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 510 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
492 // failed. | 511 // failed. |
493 // Please note this does not perform a garbage collection. | 512 // Please note this does not perform a garbage collection. |
494 MUST_USE_RESULT static MaybeObject* AllocateByteArray(int length); | 513 MUST_USE_RESULT static MaybeObject* AllocateByteArray(int length); |
495 | 514 |
496 // Allocate a pixel array of the specified length | 515 // Allocate a pixel array of the specified length |
497 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 516 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
498 // failed. | 517 // failed. |
499 // Please note this does not perform a garbage collection. | 518 // Please note this does not perform a garbage collection. |
500 MUST_USE_RESULT static MaybeObject* AllocatePixelArray(int length, | 519 MUST_USE_RESULT static MaybeObject* AllocateExternalPixelArray( |
501 uint8_t* external_pointer, | 520 int length, |
502 PretenureFlag pretenure); | 521 uint8_t* external_pointer, |
| 522 PretenureFlag pretenure); |
503 | 523 |
504 // Allocates an external array of the specified length and type. | 524 // Allocates an external array of the specified length and type. |
505 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 525 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
506 // failed. | 526 // failed. |
507 // Please note this does not perform a garbage collection. | 527 // Please note this does not perform a garbage collection. |
508 MUST_USE_RESULT static MaybeObject* AllocateExternalArray( | 528 MUST_USE_RESULT static MaybeObject* AllocateExternalArray( |
509 int length, | 529 int length, |
510 ExternalArrayType array_type, | 530 ExternalArrayType array_type, |
511 void* external_pointer, | 531 void* external_pointer, |
512 PretenureFlag pretenure); | 532 PretenureFlag pretenure); |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 // Return whether this object should be retained. If NULL is returned the | 2168 // Return whether this object should be retained. If NULL is returned the |
2149 // object has no references. Otherwise the address of the retained object | 2169 // object has no references. Otherwise the address of the retained object |
2150 // should be returned as in some GC situations the object has been moved. | 2170 // should be returned as in some GC situations the object has been moved. |
2151 virtual Object* RetainAs(Object* object) = 0; | 2171 virtual Object* RetainAs(Object* object) = 0; |
2152 }; | 2172 }; |
2153 | 2173 |
2154 | 2174 |
2155 } } // namespace v8::internal | 2175 } } // namespace v8::internal |
2156 | 2176 |
2157 #endif // V8_HEAP_H_ | 2177 #endif // V8_HEAP_H_ |
OLD | NEW |