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 20 matching lines...) Expand all Loading... |
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 */ \ | 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 addr32 */ \ | 37 V(PUSH_BT, 2, 5) /* push_bt addr32 */ \ |
38 V(PUSH_REGISTER, 3, 2) /* push_register register_index */ \ | 38 V(PUSH_REGISTER, 3, 2) /* push_register register_index */ \ |
39 V(SET_REGISTER_TO_CP, 4, 6) /* set_register_to_cp register_index offset32 */ \ | 39 V(SET_REGISTER_TO_CP, 4, 6) /* set_register_to_cp register_index offset32 */ \ |
40 V(SET_REGISTER, 5, 6) /* set_register register_index value32 */ \ | 40 V(SET_REGISTER, 5, 6) /* set_register register_index value32 */ \ |
41 V(POP_CP, 6, 1) /* pop_cp */ \ | 41 V(ADVANCE_REGISTER, 6, 6) /* advance_register register_index value32 */ \ |
42 V(POP_BT, 7, 1) /* pop_bt */ \ | 42 V(POP_CP, 7, 1) /* pop_cp */ \ |
43 V(POP_REGISTER, 8, 2) /* pop_register register_index */ \ | 43 V(POP_BT, 8, 1) /* pop_bt */ \ |
44 V(FAIL, 9, 1) /* fail */ \ | 44 V(POP_REGISTER, 9, 2) /* pop_register register_index */ \ |
45 V(FAIL_IF_WITHIN, 10, 5) /* fail distance32 */ \ | 45 V(FAIL, 10, 1) /* fail */ \ |
46 V(SUCCEED, 11, 1) /* succeed */ \ | 46 V(SUCCEED, 11, 1) /* succeed */ \ |
47 V(ADVANCE_CP, 12, 5) /* advance_cp offset32 */ \ | 47 V(ADVANCE_CP, 12, 5) /* advance_cp offset32 */ \ |
48 V(GOTO, 13, 5) /* goto addr32 */ \ | 48 V(GOTO, 13, 5) /* goto addr32 */ \ |
49 V(LOAD_CURRENT_CHAR, 14, 5) /* load offset32 */ \ | 49 V(LOAD_CURRENT_CHAR, 14, 9) /* load offset32 addr32 */ \ |
50 V(CHECK_CHAR, 15, 7) /* check_char uc16 addr32 */ \ | 50 V(CHECK_CHAR, 15, 7) /* check_char uc16 addr32 */ \ |
51 V(CHECK_NOT_CHAR, 16, 7) /* check_not_char uc16 addr32 */ \ | 51 V(CHECK_NOT_CHAR, 16, 7) /* check_not_char uc16 addr32 */ \ |
52 V(CHECK_END, 17, 7) /* check_end addr32 */ \ | 52 V(CHECK_RANGE, 17, 9) /* check_range uc16 uc16 addr32 */ \ |
53 V(CHECK_NOT_END, 18, 7) /* check_not_end addr32 */ \ | 53 V(CHECK_NOT_RANGE, 18, 9) /* check_not_range uc16 uc16 addr32 */ \ |
54 V(CHECK_RANGE, 19, 9) /* check_range uc16 uc16 addr32 */ \ | 54 V(CHECK_BACKREF, 19, 9) /* check_backref offset32 capture_idx addr32 */ \ |
55 V(CHECK_NOT_RANGE, 20, 9) /* check_not_range uc16 uc16 addr32 */ \ | 55 V(CHECK_NOT_BACKREF, 20, 9) /* check_not_backref offset32 capture_idx addr32*/ \ |
56 V(CHECK_BACKREF, 21, 9) /* check_backref offset32 capture_idx addr32 */ \ | 56 V(LOOKUP_MAP1, 21, 11) /* l_map1 start16 bit_map_addr32 addr32 */ \ |
57 V(CHECK_NOT_BACKREF, 22, 9) /* check_not_backref offset32 capture_idx addr32*/ \ | 57 V(LOOKUP_MAP2, 22, 99) /* l_map2 start16 half_nibble_map_addr32* */ \ |
58 V(CHECK_BITMAP, 23, 13) /* check_bitmap uc16 uc16 addr32 */ \ | 58 V(LOOKUP_MAP8, 23, 99) /* l_map8 start16 byte_map addr32* */ \ |
59 V(CHECK_NOT_BITMAP, 24, 13) /* check_not_bitmap uc16 uc16 addr32 */ \ | 59 V(LOOKUP_HI_MAP8, 24, 99) /* l_himap8 start8 byte_map_addr32 addr32* */ \ |
60 V(CHECK_REGISTER_LT, 25, 8) /* check_reg_lt register_index value16 addr32 */ \ | 60 V(CHECK_REGISTER_LT, 25, 8) /* check_reg_lt register_index value16 addr32 */ \ |
61 V(CHECK_REGISTER_GE, 26, 8) /* check_reg_ge register_index value16 addr32 */ \ | 61 V(CHECK_REGISTER_GE, 26, 8) /* check_reg_ge register_index value16 addr32 */ \ |
62 | 62 |
63 #define DECLARE_BYTECODES(name, code, length) \ | 63 #define DECLARE_BYTECODES(name, code, length) \ |
64 static const int BC_##name = code; | 64 static const int BC_##name = code; |
65 BYTECODE_ITERATOR(DECLARE_BYTECODES) | 65 BYTECODE_ITERATOR(DECLARE_BYTECODES) |
66 #undef DECLARE_BYTECODES | 66 #undef DECLARE_BYTECODES |
67 } } | 67 } } |
68 | 68 |
69 #endif // V8_BYTECODES_IA32_H_ | 69 #endif // V8_BYTECODES_IA32_H_ |
OLD | NEW |