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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 V(ADVANCE_REGISTER, 9, 6) /* advance_register register_index value32 */ \ | 44 V(ADVANCE_REGISTER, 9, 6) /* advance_register register_index value32 */ \ |
45 V(POP_CP, 10, 1) /* pop_cp */ \ | 45 V(POP_CP, 10, 1) /* pop_cp */ \ |
46 V(POP_BT, 11, 1) /* pop_bt */ \ | 46 V(POP_BT, 11, 1) /* pop_bt */ \ |
47 V(POP_REGISTER, 12, 2) /* pop_register register_index */ \ | 47 V(POP_REGISTER, 12, 2) /* pop_register register_index */ \ |
48 V(FAIL, 13, 1) /* fail */ \ | 48 V(FAIL, 13, 1) /* fail */ \ |
49 V(SUCCEED, 14, 1) /* succeed */ \ | 49 V(SUCCEED, 14, 1) /* succeed */ \ |
50 V(ADVANCE_CP, 15, 5) /* advance_cp offset32 */ \ | 50 V(ADVANCE_CP, 15, 5) /* advance_cp offset32 */ \ |
51 V(GOTO, 16, 5) /* goto addr32 */ \ | 51 V(GOTO, 16, 5) /* goto addr32 */ \ |
52 V(LOAD_CURRENT_CHAR, 17, 9) /* load offset32 addr32 */ \ | 52 V(LOAD_CURRENT_CHAR, 17, 9) /* load offset32 addr32 */ \ |
53 V(LOAD_CURRENT_CHAR_UNCHECKED, 18, 5) /* load offset32 */ \ | 53 V(LOAD_CURRENT_CHAR_UNCHECKED, 18, 5) /* load offset32 */ \ |
54 V(CHECK_CHAR, 19, 7) /* check_char uc16 addr32 */ \ | 54 V(LOAD_2_CURRENT_CHARS, 19, 9) /* load offset32 addr32 */ \ |
55 V(CHECK_NOT_CHAR, 20, 7) /* check_not_char uc16 addr32 */ \ | 55 V(LOAD_2_CURRENT_CHARS_UNCHECKED, 20, 5) /* load offset32 */ \ |
56 V(OR_CHECK_NOT_CHAR, 21, 9) /* or_check_not_char uc16 uc16 addr32 */ \ | 56 V(LOAD_4_CURRENT_CHARS, 21, 9) /* load offset32 addr32 */ \ |
57 V(MINUS_OR_CHECK_NOT_CHAR, 22, 9) /* minus_or_check_not_char uc16 uc16 ad...*/ \ | 57 V(LOAD_4_CURRENT_CHARS_UNCHECKED, 22, 5) /* load offset32 */ \ |
58 V(CHECK_LT, 23, 7) /* check_lt uc16 addr32 */ \ | 58 V(CHECK_CHAR, 23, 9) /* check_char uint32 addr32 */ \ |
59 V(CHECK_GT, 24, 7) /* check_gr uc16 addr32 */ \ | 59 V(CHECK_NOT_CHAR, 24, 9) /* check_not_char uint32 addr32 */ \ |
60 V(CHECK_NOT_BACK_REF, 25, 6) /* check_not_back_ref capture_idx addr32 */ \ | 60 V(AND_CHECK_CHAR, 25, 13) /* and_check_char uint32 uint32 addr32 */ \ |
61 V(CHECK_NOT_BACK_REF_NO_CASE, 26, 6) /* check_not_back_ref_no_case captu... */ \ | 61 V(AND_CHECK_NOT_CHAR, 26, 13) /* and_check_not_char uint32 uint32 addr32 */ \ |
62 V(CHECK_NOT_REGS_EQUAL, 27, 7) /* check_not_regs_equal reg1 reg2 addr32 */ \ | 62 V(MINUS_AND_CHECK_NOT_CHAR, 27, 11) /* minus_and_check_not_char uc16 uc16...*/ \ |
63 V(LOOKUP_MAP1, 28, 11) /* l_map1 start16 bit_map_addr32 addr32 */ \ | 63 V(CHECK_LT, 28, 7) /* check_lt uc16 addr32 */ \ |
64 V(LOOKUP_MAP2, 29, 99) /* l_map2 start16 half_nibble_map_addr32* */ \ | 64 V(CHECK_GT, 29, 7) /* check_gr uc16 addr32 */ \ |
65 V(LOOKUP_MAP8, 30, 99) /* l_map8 start16 byte_map addr32* */ \ | 65 V(CHECK_NOT_BACK_REF, 30, 6) /* check_not_back_ref capture_idx addr32 */ \ |
66 V(LOOKUP_HI_MAP8, 31, 99) /* l_himap8 start8 byte_map_addr32 addr32* */ \ | 66 V(CHECK_NOT_BACK_REF_NO_CASE, 31, 6) /* check_not_back_ref_no_case captu... */ \ |
67 V(CHECK_REGISTER_LT, 32, 8) /* check_reg_lt register_index value16 addr32 */ \ | 67 V(CHECK_NOT_REGS_EQUAL, 32, 7) /* check_not_regs_equal reg1 reg2 addr32 */ \ |
68 V(CHECK_REGISTER_GE, 33, 8) /* check_reg_ge register_index value16 addr32 */ \ | 68 V(LOOKUP_MAP1, 33, 11) /* l_map1 start16 bit_map_addr32 addr32 */ \ |
69 V(CHECK_NOT_AT_START, 34, 5) /* check_not_at_start addr32 */ \ | 69 V(LOOKUP_MAP2, 34, 99) /* l_map2 start16 half_nibble_map_addr32* */ \ |
70 V(CHECK_GREEDY, 35, 5) /* check_greedy addr32 */ | 70 V(LOOKUP_MAP8, 35, 99) /* l_map8 start16 byte_map addr32* */ \ |
| 71 V(LOOKUP_HI_MAP8, 36, 99) /* l_himap8 start8 byte_map_addr32 addr32* */ \ |
| 72 V(CHECK_REGISTER_LT, 37, 8) /* check_reg_lt register_index value16 addr32 */ \ |
| 73 V(CHECK_REGISTER_GE, 38, 8) /* check_reg_ge register_index value16 addr32 */ \ |
| 74 V(CHECK_NOT_AT_START, 39, 5) /* check_not_at_start addr32 */ \ |
| 75 V(CHECK_GREEDY, 40, 5) /* check_greedy addr32 */ |
71 | 76 |
72 #define DECLARE_BYTECODES(name, code, length) \ | 77 #define DECLARE_BYTECODES(name, code, length) \ |
73 static const int BC_##name = code; | 78 static const int BC_##name = code; |
74 BYTECODE_ITERATOR(DECLARE_BYTECODES) | 79 BYTECODE_ITERATOR(DECLARE_BYTECODES) |
75 #undef DECLARE_BYTECODES | 80 #undef DECLARE_BYTECODES |
76 | 81 |
77 #define DECLARE_BYTECODE_LENGTH(name, code, length) \ | 82 #define DECLARE_BYTECODE_LENGTH(name, code, length) \ |
78 static const int BC_##name##_LENGTH = length; | 83 static const int BC_##name##_LENGTH = length; |
79 BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH) | 84 BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH) |
80 #undef DECLARE_BYTECODE_LENGTH | 85 #undef DECLARE_BYTECODE_LENGTH |
81 } } | 86 } } |
82 | 87 |
83 #endif // V8_BYTECODES_IRREGEXP_H_ | 88 #endif // V8_BYTECODES_IRREGEXP_H_ |
OLD | NEW |