Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 12 matching lines...) Expand all Loading... | |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_OBJECTS_H_ | 28 #ifndef V8_OBJECTS_H_ |
| 29 #define V8_OBJECTS_H_ | 29 #define V8_OBJECTS_H_ |
| 30 | 30 |
| 31 #include "allocation.h" | 31 #include "allocation.h" |
| 32 #include "builtins.h" | 32 #include "builtins.h" |
| 33 #include "list.h" | |
| 33 #include "smart-pointer.h" | 34 #include "smart-pointer.h" |
| 34 #include "unicode-inl.h" | 35 #include "unicode-inl.h" |
| 35 #if V8_TARGET_ARCH_ARM | 36 #if V8_TARGET_ARCH_ARM |
| 36 #include "arm/constants-arm.h" | 37 #include "arm/constants-arm.h" |
| 37 #elif V8_TARGET_ARCH_MIPS | 38 #elif V8_TARGET_ARCH_MIPS |
| 38 #include "mips/constants-mips.h" | 39 #include "mips/constants-mips.h" |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 // | 42 // |
| 42 // Most object types in the V8 JavaScript are described in this file. | 43 // Most object types in the V8 JavaScript are described in this file. |
| (...skipping 3218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3261 FLAGS_MAX_VALUE = kMaxInt | 3262 FLAGS_MAX_VALUE = kMaxInt |
| 3262 }; | 3263 }; |
| 3263 | 3264 |
| 3264 enum Kind { | 3265 enum Kind { |
| 3265 FUNCTION, | 3266 FUNCTION, |
| 3266 OPTIMIZED_FUNCTION, | 3267 OPTIMIZED_FUNCTION, |
| 3267 STUB, | 3268 STUB, |
| 3268 BUILTIN, | 3269 BUILTIN, |
| 3269 LOAD_IC, | 3270 LOAD_IC, |
| 3270 KEYED_LOAD_IC, | 3271 KEYED_LOAD_IC, |
| 3271 KEYED_EXTERNAL_ARRAY_LOAD_IC, | |
| 3272 CALL_IC, | 3272 CALL_IC, |
| 3273 KEYED_CALL_IC, | 3273 KEYED_CALL_IC, |
| 3274 STORE_IC, | 3274 STORE_IC, |
| 3275 KEYED_STORE_IC, | 3275 KEYED_STORE_IC, |
| 3276 KEYED_EXTERNAL_ARRAY_STORE_IC, | |
| 3277 TYPE_RECORDING_UNARY_OP_IC, | 3276 TYPE_RECORDING_UNARY_OP_IC, |
| 3278 TYPE_RECORDING_BINARY_OP_IC, | 3277 TYPE_RECORDING_BINARY_OP_IC, |
| 3279 COMPARE_IC, | 3278 COMPARE_IC, |
| 3280 // No more than 16 kinds. The value currently encoded in four bits in | 3279 // No more than 16 kinds. The value currently encoded in four bits in |
| 3281 // Flags. | 3280 // Flags. |
| 3282 | 3281 |
| 3283 // Pseudo-kinds. | 3282 // Pseudo-kinds. |
| 3284 REGEXP = BUILTIN, | 3283 REGEXP = BUILTIN, |
| 3285 FIRST_IC_KIND = LOAD_IC, | 3284 FIRST_IC_KIND = LOAD_IC, |
| 3286 LAST_IC_KIND = COMPARE_IC | 3285 LAST_IC_KIND = COMPARE_IC |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3343 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 3342 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
| 3344 inline bool is_call_stub() { return kind() == CALL_IC; } | 3343 inline bool is_call_stub() { return kind() == CALL_IC; } |
| 3345 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } | 3344 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } |
| 3346 inline bool is_type_recording_unary_op_stub() { | 3345 inline bool is_type_recording_unary_op_stub() { |
| 3347 return kind() == TYPE_RECORDING_UNARY_OP_IC; | 3346 return kind() == TYPE_RECORDING_UNARY_OP_IC; |
| 3348 } | 3347 } |
| 3349 inline bool is_type_recording_binary_op_stub() { | 3348 inline bool is_type_recording_binary_op_stub() { |
| 3350 return kind() == TYPE_RECORDING_BINARY_OP_IC; | 3349 return kind() == TYPE_RECORDING_BINARY_OP_IC; |
| 3351 } | 3350 } |
| 3352 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } | 3351 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } |
| 3353 inline bool is_external_array_load_stub() { | |
| 3354 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC; | |
| 3355 } | |
| 3356 inline bool is_external_array_store_stub() { | |
| 3357 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC; | |
| 3358 } | |
| 3359 | 3352 |
| 3360 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. | 3353 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. |
| 3361 inline int major_key(); | 3354 inline int major_key(); |
| 3362 inline void set_major_key(int value); | 3355 inline void set_major_key(int value); |
| 3363 | 3356 |
| 3364 // [optimizable]: For FUNCTION kind, tells if it is optimizable. | 3357 // [optimizable]: For FUNCTION kind, tells if it is optimizable. |
| 3365 inline bool optimizable(); | 3358 inline bool optimizable(); |
| 3366 inline void set_optimizable(bool value); | 3359 inline void set_optimizable(bool value); |
| 3367 | 3360 |
| 3368 // [has_deoptimization_support]: For FUNCTION kind, tells if it has | 3361 // [has_deoptimization_support]: For FUNCTION kind, tells if it has |
| (...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6709 static inline int set(int value, int bit_position, bool v) { | 6702 static inline int set(int value, int bit_position, bool v) { |
| 6710 if (v) { | 6703 if (v) { |
| 6711 value |= (1 << bit_position); | 6704 value |= (1 << bit_position); |
| 6712 } else { | 6705 } else { |
| 6713 value &= ~(1 << bit_position); | 6706 value &= ~(1 << bit_position); |
| 6714 } | 6707 } |
| 6715 return value; | 6708 return value; |
| 6716 } | 6709 } |
| 6717 }; | 6710 }; |
| 6718 | 6711 |
| 6712 class Map; | |
|
Mads Ager (chromium)
2011/05/12 09:42:47
Can we move these to list.h and avoid depending on
danno
2011/06/01 13:16:08
Done.
| |
| 6713 class Code; | |
| 6714 typedef List<Map*> MapList; | |
| 6715 typedef List<Code*> CodeList; | |
| 6716 | |
| 6719 } } // namespace v8::internal | 6717 } } // namespace v8::internal |
| 6720 | 6718 |
| 6721 #endif // V8_OBJECTS_H_ | 6719 #endif // V8_OBJECTS_H_ |
| OLD | NEW |