| 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 3252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3263 FLAGS_MAX_VALUE = kMaxInt | 3263 FLAGS_MAX_VALUE = kMaxInt |
| 3264 }; | 3264 }; |
| 3265 | 3265 |
| 3266 enum Kind { | 3266 enum Kind { |
| 3267 FUNCTION, | 3267 FUNCTION, |
| 3268 OPTIMIZED_FUNCTION, | 3268 OPTIMIZED_FUNCTION, |
| 3269 STUB, | 3269 STUB, |
| 3270 BUILTIN, | 3270 BUILTIN, |
| 3271 LOAD_IC, | 3271 LOAD_IC, |
| 3272 KEYED_LOAD_IC, | 3272 KEYED_LOAD_IC, |
| 3273 KEYED_EXTERNAL_ARRAY_LOAD_IC, | |
| 3274 CALL_IC, | 3273 CALL_IC, |
| 3275 KEYED_CALL_IC, | 3274 KEYED_CALL_IC, |
| 3276 STORE_IC, | 3275 STORE_IC, |
| 3277 KEYED_STORE_IC, | 3276 KEYED_STORE_IC, |
| 3278 KEYED_EXTERNAL_ARRAY_STORE_IC, | |
| 3279 TYPE_RECORDING_BINARY_OP_IC, | 3277 TYPE_RECORDING_BINARY_OP_IC, |
| 3280 COMPARE_IC, | 3278 COMPARE_IC, |
| 3281 // 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 |
| 3282 // Flags. | 3280 // Flags. |
| 3283 | 3281 |
| 3284 // Pseudo-kinds. | 3282 // Pseudo-kinds. |
| 3285 REGEXP = BUILTIN, | 3283 REGEXP = BUILTIN, |
| 3286 FIRST_IC_KIND = LOAD_IC, | 3284 FIRST_IC_KIND = LOAD_IC, |
| 3287 LAST_IC_KIND = COMPARE_IC | 3285 LAST_IC_KIND = COMPARE_IC |
| 3288 }; | 3286 }; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3341 inline bool is_load_stub() { return kind() == LOAD_IC; } | 3339 inline bool is_load_stub() { return kind() == LOAD_IC; } |
| 3342 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } | 3340 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } |
| 3343 inline bool is_store_stub() { return kind() == STORE_IC; } | 3341 inline bool is_store_stub() { return kind() == STORE_IC; } |
| 3344 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 3342 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
| 3345 inline bool is_call_stub() { return kind() == CALL_IC; } | 3343 inline bool is_call_stub() { return kind() == CALL_IC; } |
| 3346 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } | 3344 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } |
| 3347 inline bool is_type_recording_binary_op_stub() { | 3345 inline bool is_type_recording_binary_op_stub() { |
| 3348 return kind() == TYPE_RECORDING_BINARY_OP_IC; | 3346 return kind() == TYPE_RECORDING_BINARY_OP_IC; |
| 3349 } | 3347 } |
| 3350 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } | 3348 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } |
| 3351 inline bool is_external_array_load_stub() { | |
| 3352 return kind() == KEYED_EXTERNAL_ARRAY_LOAD_IC; | |
| 3353 } | |
| 3354 inline bool is_external_array_store_stub() { | |
| 3355 return kind() == KEYED_EXTERNAL_ARRAY_STORE_IC; | |
| 3356 } | |
| 3357 | 3349 |
| 3358 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. | 3350 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. |
| 3359 inline int major_key(); | 3351 inline int major_key(); |
| 3360 inline void set_major_key(int value); | 3352 inline void set_major_key(int value); |
| 3361 | 3353 |
| 3362 // [optimizable]: For FUNCTION kind, tells if it is optimizable. | 3354 // [optimizable]: For FUNCTION kind, tells if it is optimizable. |
| 3363 inline bool optimizable(); | 3355 inline bool optimizable(); |
| 3364 inline void set_optimizable(bool value); | 3356 inline void set_optimizable(bool value); |
| 3365 | 3357 |
| 3366 // [has_deoptimization_support]: For FUNCTION kind, tells if it has | 3358 // [has_deoptimization_support]: For FUNCTION kind, tells if it has |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3415 // Get the safepoint entry for the given pc. | 3407 // Get the safepoint entry for the given pc. |
| 3416 SafepointEntry GetSafepointEntry(Address pc); | 3408 SafepointEntry GetSafepointEntry(Address pc); |
| 3417 | 3409 |
| 3418 // Mark this code object as not having a stack check table. Assumes kind | 3410 // Mark this code object as not having a stack check table. Assumes kind |
| 3419 // is FUNCTION. | 3411 // is FUNCTION. |
| 3420 void SetNoStackCheckTable(); | 3412 void SetNoStackCheckTable(); |
| 3421 | 3413 |
| 3422 // Find the first map in an IC stub. | 3414 // Find the first map in an IC stub. |
| 3423 Map* FindFirstMap(); | 3415 Map* FindFirstMap(); |
| 3424 | 3416 |
| 3417 // Return the number of maps |
| 3418 int GetMapCount(); |
| 3419 |
| 3425 // Flags operations. | 3420 // Flags operations. |
| 3426 static inline Flags ComputeFlags( | 3421 static inline Flags ComputeFlags( |
| 3427 Kind kind, | 3422 Kind kind, |
| 3428 InLoopFlag in_loop = NOT_IN_LOOP, | 3423 InLoopFlag in_loop = NOT_IN_LOOP, |
| 3429 InlineCacheState ic_state = UNINITIALIZED, | 3424 InlineCacheState ic_state = UNINITIALIZED, |
| 3430 ExtraICState extra_ic_state = kNoExtraICState, | 3425 ExtraICState extra_ic_state = kNoExtraICState, |
| 3431 PropertyType type = NORMAL, | 3426 PropertyType type = NORMAL, |
| 3432 int argc = -1, | 3427 int argc = -1, |
| 3433 InlineCacheHolderFlag holder = OWN_MAP); | 3428 InlineCacheHolderFlag holder = OWN_MAP); |
| 3434 | 3429 |
| (...skipping 3270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6705 } else { | 6700 } else { |
| 6706 value &= ~(1 << bit_position); | 6701 value &= ~(1 << bit_position); |
| 6707 } | 6702 } |
| 6708 return value; | 6703 return value; |
| 6709 } | 6704 } |
| 6710 }; | 6705 }; |
| 6711 | 6706 |
| 6712 } } // namespace v8::internal | 6707 } } // namespace v8::internal |
| 6713 | 6708 |
| 6714 #endif // V8_OBJECTS_H_ | 6709 #endif // V8_OBJECTS_H_ |
| OLD | NEW |