OLD | NEW |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 V(Object, true_value, TrueValue) \ | 52 V(Object, true_value, TrueValue) \ |
53 V(Object, false_value, FalseValue) \ | 53 V(Object, false_value, FalseValue) \ |
54 V(Map, heap_number_map, HeapNumberMap) \ | 54 V(Map, heap_number_map, HeapNumberMap) \ |
55 V(Map, global_context_map, GlobalContextMap) \ | 55 V(Map, global_context_map, GlobalContextMap) \ |
56 V(Map, fixed_array_map, FixedArrayMap) \ | 56 V(Map, fixed_array_map, FixedArrayMap) \ |
57 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ | 57 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ |
58 V(Map, meta_map, MetaMap) \ | 58 V(Map, meta_map, MetaMap) \ |
59 V(Object, termination_exception, TerminationException) \ | 59 V(Object, termination_exception, TerminationException) \ |
60 V(Map, hash_table_map, HashTableMap) \ | 60 V(Map, hash_table_map, HashTableMap) \ |
61 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ | 61 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ |
62 V(Map, short_string_map, ShortStringMap) \ | 62 V(Map, string_map, StringMap) \ |
63 V(Map, medium_string_map, MediumStringMap) \ | 63 V(Map, ascii_string_map, AsciiStringMap) \ |
64 V(Map, long_string_map, LongStringMap) \ | 64 V(Map, symbol_map, SymbolMap) \ |
65 V(Map, short_ascii_string_map, ShortAsciiStringMap) \ | 65 V(Map, ascii_symbol_map, AsciiSymbolMap) \ |
66 V(Map, medium_ascii_string_map, MediumAsciiStringMap) \ | 66 V(Map, cons_symbol_map, ConsSymbolMap) \ |
67 V(Map, long_ascii_string_map, LongAsciiStringMap) \ | 67 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \ |
68 V(Map, short_symbol_map, ShortSymbolMap) \ | 68 V(Map, external_symbol_map, ExternalSymbolMap) \ |
69 V(Map, medium_symbol_map, MediumSymbolMap) \ | 69 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ |
70 V(Map, long_symbol_map, LongSymbolMap) \ | 70 V(Map, cons_string_map, ConsStringMap) \ |
71 V(Map, short_ascii_symbol_map, ShortAsciiSymbolMap) \ | 71 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ |
72 V(Map, medium_ascii_symbol_map, MediumAsciiSymbolMap) \ | 72 V(Map, external_string_map, ExternalStringMap) \ |
73 V(Map, long_ascii_symbol_map, LongAsciiSymbolMap) \ | 73 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ |
74 V(Map, short_cons_symbol_map, ShortConsSymbolMap) \ | 74 V(Map, undetectable_string_map, UndetectableStringMap) \ |
75 V(Map, medium_cons_symbol_map, MediumConsSymbolMap) \ | 75 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \ |
76 V(Map, long_cons_symbol_map, LongConsSymbolMap) \ | |
77 V(Map, short_cons_ascii_symbol_map, ShortConsAsciiSymbolMap) \ | |
78 V(Map, medium_cons_ascii_symbol_map, MediumConsAsciiSymbolMap) \ | |
79 V(Map, long_cons_ascii_symbol_map, LongConsAsciiSymbolMap) \ | |
80 V(Map, short_external_symbol_map, ShortExternalSymbolMap) \ | |
81 V(Map, medium_external_symbol_map, MediumExternalSymbolMap) \ | |
82 V(Map, long_external_symbol_map, LongExternalSymbolMap) \ | |
83 V(Map, short_external_ascii_symbol_map, ShortExternalAsciiSymbolMap) \ | |
84 V(Map, medium_external_ascii_symbol_map, MediumExternalAsciiSymbolMap) \ | |
85 V(Map, long_external_ascii_symbol_map, LongExternalAsciiSymbolMap) \ | |
86 V(Map, short_cons_string_map, ShortConsStringMap) \ | |
87 V(Map, medium_cons_string_map, MediumConsStringMap) \ | |
88 V(Map, long_cons_string_map, LongConsStringMap) \ | |
89 V(Map, short_cons_ascii_string_map, ShortConsAsciiStringMap) \ | |
90 V(Map, medium_cons_ascii_string_map, MediumConsAsciiStringMap) \ | |
91 V(Map, long_cons_ascii_string_map, LongConsAsciiStringMap) \ | |
92 V(Map, short_external_string_map, ShortExternalStringMap) \ | |
93 V(Map, medium_external_string_map, MediumExternalStringMap) \ | |
94 V(Map, long_external_string_map, LongExternalStringMap) \ | |
95 V(Map, short_external_ascii_string_map, ShortExternalAsciiStringMap) \ | |
96 V(Map, medium_external_ascii_string_map, MediumExternalAsciiStringMap) \ | |
97 V(Map, long_external_ascii_string_map, LongExternalAsciiStringMap) \ | |
98 V(Map, undetectable_short_string_map, UndetectableShortStringMap) \ | |
99 V(Map, undetectable_medium_string_map, UndetectableMediumStringMap) \ | |
100 V(Map, undetectable_long_string_map, UndetectableLongStringMap) \ | |
101 V(Map, undetectable_short_ascii_string_map, UndetectableShortAsciiStringMap) \ | |
102 V(Map, \ | |
103 undetectable_medium_ascii_string_map, \ | |
104 UndetectableMediumAsciiStringMap) \ | |
105 V(Map, undetectable_long_ascii_string_map, UndetectableLongAsciiStringMap) \ | |
106 V(Map, pixel_array_map, PixelArrayMap) \ | 76 V(Map, pixel_array_map, PixelArrayMap) \ |
107 V(Map, external_byte_array_map, ExternalByteArrayMap) \ | 77 V(Map, external_byte_array_map, ExternalByteArrayMap) \ |
108 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ | 78 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ |
109 V(Map, external_short_array_map, ExternalShortArrayMap) \ | 79 V(Map, external_short_array_map, ExternalShortArrayMap) \ |
110 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ | 80 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ |
111 V(Map, external_int_array_map, ExternalIntArrayMap) \ | 81 V(Map, external_int_array_map, ExternalIntArrayMap) \ |
112 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ | 82 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ |
113 V(Map, external_float_array_map, ExternalFloatArrayMap) \ | 83 V(Map, external_float_array_map, ExternalFloatArrayMap) \ |
114 V(Map, context_map, ContextMap) \ | 84 V(Map, context_map, ContextMap) \ |
115 V(Map, catch_context_map, CatchContextMap) \ | 85 V(Map, catch_context_map, CatchContextMap) \ |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 static Object* AllocateStringFromTwoByte( | 372 static Object* AllocateStringFromTwoByte( |
403 Vector<const uc16> str, | 373 Vector<const uc16> str, |
404 PretenureFlag pretenure = NOT_TENURED); | 374 PretenureFlag pretenure = NOT_TENURED); |
405 | 375 |
406 // Allocates a symbol in old space based on the character stream. | 376 // Allocates a symbol in old space based on the character stream. |
407 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 377 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
408 // failed. | 378 // failed. |
409 // Please note this function does not perform a garbage collection. | 379 // Please note this function does not perform a garbage collection. |
410 static inline Object* AllocateSymbol(Vector<const char> str, | 380 static inline Object* AllocateSymbol(Vector<const char> str, |
411 int chars, | 381 int chars, |
412 uint32_t length_field); | 382 uint32_t hash_field); |
413 | 383 |
414 static Object* AllocateInternalSymbol(unibrow::CharacterStream* buffer, | 384 static Object* AllocateInternalSymbol(unibrow::CharacterStream* buffer, |
415 int chars, | 385 int chars, |
416 uint32_t length_field); | 386 uint32_t hash_field); |
417 | 387 |
418 static Object* AllocateExternalSymbol(Vector<const char> str, | 388 static Object* AllocateExternalSymbol(Vector<const char> str, |
419 int chars); | 389 int chars); |
420 | 390 |
421 | 391 |
422 // Allocates and partially initializes a String. There are two String | 392 // Allocates and partially initializes a String. There are two String |
423 // encodings: ASCII and two byte. These functions allocate a string of the | 393 // encodings: ASCII and two byte. These functions allocate a string of the |
424 // given length and set its map and length fields. The characters of the | 394 // given length and set its map and length fields. The characters of the |
425 // string are uninitialized. | 395 // string are uninitialized. |
426 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 396 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 } | 1588 } |
1619 static TranscendentalCache* caches_[kNumberOfCaches]; | 1589 static TranscendentalCache* caches_[kNumberOfCaches]; |
1620 Element elements_[kCacheSize]; | 1590 Element elements_[kCacheSize]; |
1621 Type type_; | 1591 Type type_; |
1622 }; | 1592 }; |
1623 | 1593 |
1624 | 1594 |
1625 } } // namespace v8::internal | 1595 } } // namespace v8::internal |
1626 | 1596 |
1627 #endif // V8_HEAP_H_ | 1597 #endif // V8_HEAP_H_ |
OLD | NEW |