OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 // cache state, and arguments count. | 2662 // cache state, and arguments count. |
2663 enum Flags { }; | 2663 enum Flags { }; |
2664 | 2664 |
2665 enum Kind { | 2665 enum Kind { |
2666 FUNCTION, | 2666 FUNCTION, |
2667 STUB, | 2667 STUB, |
2668 BUILTIN, | 2668 BUILTIN, |
2669 LOAD_IC, | 2669 LOAD_IC, |
2670 KEYED_LOAD_IC, | 2670 KEYED_LOAD_IC, |
2671 CALL_IC, | 2671 CALL_IC, |
| 2672 KEYED_CALL_IC, |
2672 STORE_IC, | 2673 STORE_IC, |
2673 KEYED_STORE_IC, | 2674 KEYED_STORE_IC, |
2674 BINARY_OP_IC, | 2675 BINARY_OP_IC, |
2675 // No more than 16 kinds. The value currently encoded in four bits in | 2676 // No more than 16 kinds. The value currently encoded in four bits in |
2676 // Flags. | 2677 // Flags. |
2677 | 2678 |
2678 // Pseudo-kinds. | 2679 // Pseudo-kinds. |
2679 REGEXP = BUILTIN, | 2680 REGEXP = BUILTIN, |
2680 FIRST_IC_KIND = LOAD_IC, | 2681 FIRST_IC_KIND = LOAD_IC, |
2681 LAST_IC_KIND = BINARY_OP_IC | 2682 LAST_IC_KIND = BINARY_OP_IC |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2716 inline PropertyType type(); // Only valid for monomorphic IC stubs. | 2717 inline PropertyType type(); // Only valid for monomorphic IC stubs. |
2717 inline int arguments_count(); // Only valid for call IC stubs. | 2718 inline int arguments_count(); // Only valid for call IC stubs. |
2718 | 2719 |
2719 // Testers for IC stub kinds. | 2720 // Testers for IC stub kinds. |
2720 inline bool is_inline_cache_stub(); | 2721 inline bool is_inline_cache_stub(); |
2721 inline bool is_load_stub() { return kind() == LOAD_IC; } | 2722 inline bool is_load_stub() { return kind() == LOAD_IC; } |
2722 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } | 2723 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } |
2723 inline bool is_store_stub() { return kind() == STORE_IC; } | 2724 inline bool is_store_stub() { return kind() == STORE_IC; } |
2724 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 2725 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
2725 inline bool is_call_stub() { return kind() == CALL_IC; } | 2726 inline bool is_call_stub() { return kind() == CALL_IC; } |
| 2727 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } |
2726 | 2728 |
2727 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. | 2729 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. |
2728 inline CodeStub::Major major_key(); | 2730 inline CodeStub::Major major_key(); |
2729 inline void set_major_key(CodeStub::Major major); | 2731 inline void set_major_key(CodeStub::Major major); |
2730 | 2732 |
2731 // Flags operations. | 2733 // Flags operations. |
2732 static inline Flags ComputeFlags(Kind kind, | 2734 static inline Flags ComputeFlags(Kind kind, |
2733 InLoopFlag in_loop = NOT_IN_LOOP, | 2735 InLoopFlag in_loop = NOT_IN_LOOP, |
2734 InlineCacheState ic_state = UNINITIALIZED, | 2736 InlineCacheState ic_state = UNINITIALIZED, |
2735 PropertyType type = NORMAL, | 2737 PropertyType type = NORMAL, |
(...skipping 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5252 } else { | 5254 } else { |
5253 value &= ~(1 << bit_position); | 5255 value &= ~(1 << bit_position); |
5254 } | 5256 } |
5255 return value; | 5257 return value; |
5256 } | 5258 } |
5257 }; | 5259 }; |
5258 | 5260 |
5259 } } // namespace v8::internal | 5261 } } // namespace v8::internal |
5260 | 5262 |
5261 #endif // V8_OBJECTS_H_ | 5263 #endif // V8_OBJECTS_H_ |
OLD | NEW |