OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4866 inline ByteArray* unchecked_relocation_info(); | 4866 inline ByteArray* unchecked_relocation_info(); |
4867 | 4867 |
4868 inline int relocation_size(); | 4868 inline int relocation_size(); |
4869 | 4869 |
4870 // [flags]: Various code flags. | 4870 // [flags]: Various code flags. |
4871 inline Flags flags(); | 4871 inline Flags flags(); |
4872 inline void set_flags(Flags flags); | 4872 inline void set_flags(Flags flags); |
4873 | 4873 |
4874 // [flags]: Access to specific code flags. | 4874 // [flags]: Access to specific code flags. |
4875 inline Kind kind(); | 4875 inline Kind kind(); |
4876 inline Kind handler_kind() { | |
4877 return static_cast<Kind>(arguments_count()); | |
ulan
2013/09/30 14:06:46
I didn't get this part. Why are we using arguments
Toon Verwaest
2013/09/30 14:09:09
This is something that still needs to be cleaned u
| |
4878 } | |
4876 inline InlineCacheState ic_state(); // Only valid for IC stubs. | 4879 inline InlineCacheState ic_state(); // Only valid for IC stubs. |
4877 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. | 4880 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. |
4878 | 4881 |
4879 inline ExtraICState extended_extra_ic_state(); // Only valid for | 4882 inline ExtraICState extended_extra_ic_state(); // Only valid for |
4880 // non-call IC stubs. | 4883 // non-call IC stubs. |
4881 static bool needs_extended_extra_ic_state(Kind kind) { | 4884 static bool needs_extended_extra_ic_state(Kind kind) { |
4882 // TODO(danno): This is a bit of a hack right now since there are still | 4885 // TODO(danno): This is a bit of a hack right now since there are still |
4883 // clients of this API that pass "extra" values in for argc. These clients | 4886 // clients of this API that pass "extra" values in for argc. These clients |
4884 // should be retrofitted to used ExtendedExtraICState. | 4887 // should be retrofitted to used ExtendedExtraICState. |
4885 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC; | 4888 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC; |
4886 } | 4889 } |
4887 | 4890 |
4888 inline StubType type(); // Only valid for monomorphic IC stubs. | 4891 inline StubType type(); // Only valid for monomorphic IC stubs. |
4889 inline int arguments_count(); // Only valid for call IC stubs. | 4892 inline int arguments_count(); // Only valid for call IC stubs. |
4890 | 4893 |
4891 // Testers for IC stub kinds. | 4894 // Testers for IC stub kinds. |
4892 inline bool is_inline_cache_stub(); | 4895 inline bool is_inline_cache_stub(); |
4893 inline bool is_debug_stub(); | 4896 inline bool is_debug_stub(); |
4897 inline bool is_handler() { return kind() == HANDLER; } | |
4894 inline bool is_load_stub() { return kind() == LOAD_IC; } | 4898 inline bool is_load_stub() { return kind() == LOAD_IC; } |
4895 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } | 4899 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } |
4896 inline bool is_store_stub() { return kind() == STORE_IC; } | 4900 inline bool is_store_stub() { return kind() == STORE_IC; } |
4897 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 4901 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
4898 inline bool is_call_stub() { return kind() == CALL_IC; } | 4902 inline bool is_call_stub() { return kind() == CALL_IC; } |
4899 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } | 4903 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } |
4900 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } | 4904 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } |
4901 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } | 4905 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } |
4902 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } | 4906 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } |
4903 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } | 4907 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } |
(...skipping 5333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10237 } else { | 10241 } else { |
10238 value &= ~(1 << bit_position); | 10242 value &= ~(1 << bit_position); |
10239 } | 10243 } |
10240 return value; | 10244 return value; |
10241 } | 10245 } |
10242 }; | 10246 }; |
10243 | 10247 |
10244 } } // namespace v8::internal | 10248 } } // namespace v8::internal |
10245 | 10249 |
10246 #endif // V8_OBJECTS_H_ | 10250 #endif // V8_OBJECTS_H_ |
OLD | NEW |