| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 14 matching lines...) Expand all Loading... |
| 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 | 28 |
| 29 #ifndef V8_BYTECODES_RE2K_H_ | 29 #ifndef V8_BYTECODES_RE2K_H_ |
| 30 #define V8_BYTECODES_RE2K_H_ | 30 #define V8_BYTECODES_RE2K_H_ |
| 31 | 31 |
| 32 namespace v8 { namespace internal { | 32 namespace v8 { namespace internal { |
| 33 | 33 |
| 34 #define BYTECODE_ITERATOR(V) \ | 34 #define BYTECODE_ITERATOR(V) \ |
| 35 V(BREAK, 0, 1) /* break offset32 */ \ | 35 V(BREAK, 0, 1) /* break */ \ |
| 36 V(PUSH_CP, 1, 5) /* push_cp offset32 */ \ | 36 V(PUSH_CP, 1, 5) /* push_cp offset32 */ \ |
| 37 V(PUSH_BT, 2, 5) /* push_bt address32 */ \ | 37 V(PUSH_BT, 2, 5) /* push_bt addr32 */ \ |
| 38 V(PUSH_CAPTURE, 3, 2) /* push_capture capture_index */ \ | 38 V(PUSH_REGISTER, 3, 2) /* push_register register_index */ \ |
| 39 V(SET_CAPTURE, 4, 6) /* set_capture capture_index offset32 */ \ | 39 V(SET_REGISTER, 4, 6) /* set_register register_index offset32 */ \ |
| 40 V(POP_CP, 5, 1) /* pop_cp */ \ | 40 V(POP_CP, 5, 1) /* pop_cp */ \ |
| 41 V(POP_BT, 6, 1) /* pop_bt */ \ | 41 V(POP_BT, 6, 1) /* pop_bt */ \ |
| 42 V(POP_CAPTURE, 7, 2) /* pop_capture capture_index */ \ | 42 V(POP_REGISTER, 7, 2) /* pop_register register_index */ \ |
| 43 V(FAIL, 8, 1) /* fail */ \ | 43 V(FAIL, 8, 1) /* fail */ \ |
| 44 V(FAIL_IF_WITHIN, 9, 5) /* fail distance32 */ \ | 44 V(FAIL_IF_WITHIN, 9, 5) /* fail distance32 */ \ |
| 45 V(SUCCEED, 10, 1) /* succeed */ \ | 45 V(SUCCEED, 10, 1) /* succeed */ \ |
| 46 V(ADVANCE_CP, 11, 5) /* advance_cp offset32 */ \ | 46 V(ADVANCE_CP, 11, 5) /* advance_cp offset32 */ \ |
| 47 V(GOTO, 12, 5) /* goto address32 */ \ | 47 V(GOTO, 12, 5) /* goto addr32 */ \ |
| 48 V(LOAD_CURRENT_CHAR, 13, 5) /* load offset32 */ \ | 48 V(LOAD_CURRENT_CHAR, 13, 5) /* load offset32 */ \ |
| 49 V(CHECK_CHAR, 14, 7) /* check_char uc16 address32 */ \ | 49 V(CHECK_CHAR, 14, 7) /* check_char uc16 addr32 */ \ |
| 50 V(CHECK_NOT_CHAR, 15, 7) /* check_not_char uc16 address32 */ \ | 50 V(CHECK_NOT_CHAR, 15, 7) /* check_not_char uc16 addr32 */ \ |
| 51 V(CHECK_RANGE, 16, 9) /* check_range uc16 uc16 address32 */ \ | 51 V(CHECK_RANGE, 16, 9) /* check_range uc16 uc16 addr32 */ \ |
| 52 V(CHECK_NOT_RANGE, 17, 9) /* check_not_range uc16 uc16 address32 */ \ | 52 V(CHECK_NOT_RANGE, 17, 9) /* check_not_range uc16 uc16 addr32 */ \ |
| 53 V(CHECK_BACKREF, 18, 9) /* check_backref offset32 capture_idx ad...*/ \ | 53 V(CHECK_BACKREF, 18, 9) /* check_backref offset32 capture_idx addr32 */ \ |
| 54 V(CHECK_NOT_BACKREF, 19, 9) /* check_not_backref offset32 capture_id...*/ \ | 54 V(CHECK_NOT_BACKREF, 19, 9) /* check_not_backref offset32 capture_idx addr32*/ \ |
| 55 V(CHECK_BITMAP, 20,13) /* check_bitmap uc16 uc16 addr32 */ \ | 55 V(CHECK_BITMAP, 20, 13) /* check_bitmap uc16 uc16 addr32 */ \ |
| 56 V(CHECK_NOT_BITMAP, 21,13) /* check_not_bitmap uc16 uc16 addr32 */ | 56 V(CHECK_NOT_BITMAP, 21, 13) /* check_not_bitmap uc16 uc16 addr32 */ \ |
| 57 V(CHECK_REGISTER_EQ, 22, 8) /* check_reg_eq register_index value16 addr32 */ \ |
| 58 V(CHECK_REGISTER_LE, 23, 8) /* check_reg_le register_index value16 addr32 */ \ |
| 59 V(CHECK_REGISTER_LT, 24, 8) /* check_reg_lt register_index value16 addr32 */ \ |
| 60 V(CHECK_REGISTER_GE, 25, 8) /* check_reg_ge register_index value16 addr32 */ \ |
| 61 V(CHECK_REGISTER_GT, 26, 8) /* check_reg_gt register_index value16 addr32 */ \ |
| 62 V(CHECK_REGISTER_NE, 27, 8) /* check_reg_ne register_index value16 addr32 */ |
| 57 | 63 |
| 58 #define DECLARE_BYTECODES(name, code, length) \ | 64 #define DECLARE_BYTECODES(name, code, length) \ |
| 59 static const int BC_##name = code; | 65 static const int BC_##name = code; |
| 60 BYTECODE_ITERATOR(DECLARE_BYTECODES) | 66 BYTECODE_ITERATOR(DECLARE_BYTECODES) |
| 61 #undef DECLARE_BYTECODES | 67 #undef DECLARE_BYTECODES |
| 62 | |
| 63 | |
| 64 } } | 68 } } |
| 65 | 69 |
| 66 #endif // V8_BYTECODES_IA32_H_ | 70 #endif // V8_BYTECODES_IA32_H_ |
| OLD | NEW |