Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | |
| 2 // Redistribution and use in source and binary forms, with or without | |
| 3 // modification, are permitted provided that the following conditions are | |
| 4 // met: | |
| 5 // | |
| 6 // * Redistributions of source code must retain the above copyright | |
| 7 // notice, this list of conditions and the following disclaimer. | |
| 8 // * Redistributions in binary form must reproduce the above | |
| 9 // copyright notice, this list of conditions and the following | |
| 10 // disclaimer in the documentation and/or other materials provided | |
| 11 // with the distribution. | |
| 12 // * Neither the name of Google Inc. nor the names of its | |
| 13 // contributors may be used to endorse or promote products derived | |
| 14 // from this software without specific prior written permission. | |
| 15 // | |
| 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 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. | |
| 27 | |
| 28 | |
| 29 #ifndef V8_BYTECODES_IRREGEXP_H_ | |
| 30 #define V8_BYTECODES_IRREGEXP_H_ | |
| 31 | |
| 32 namespace v8 { namespace internal { | |
| 33 | |
| 34 #define BYTECODE_ITERATOR(V) \ | |
|
Mads Ager (chromium)
2008/11/25 21:09:41
Put the \ at the far right with the rest of them?
Erik Corry
2008/11/26 12:18:36
Fixed.
| |
| 35 V(BREAK, 0, 1) /* break */ \ | |
| 36 V(PUSH_CP, 1, 5) /* push_cp offset32 */ \ | |
| 37 V(PUSH_BT, 2, 5) /* push_bt addr32 */ \ | |
| 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 */ \ | |
| 40 V(SET_CP_TO_REGISTER, 5, 2) /* set_cp_to_registger register_index */ \ | |
| 41 V(SET_REGISTER_TO_SP, 6, 2) /* set_register_to_sp register_index */ \ | |
| 42 V(SET_SP_TO_REGISTER, 7, 2) /* set_sp_to_registger register_index */ \ | |
| 43 V(SET_REGISTER, 8, 6) /* set_register register_index value32 */ \ | |
| 44 V(ADVANCE_REGISTER, 9, 6) /* advance_register register_index value32 */ \ | |
| 45 V(POP_CP, 10, 1) /* pop_cp */ \ | |
| 46 V(POP_BT, 11, 1) /* pop_bt */ \ | |
| 47 V(POP_REGISTER, 12, 2) /* pop_register register_index */ \ | |
| 48 V(FAIL, 13, 1) /* fail */ \ | |
| 49 V(SUCCEED, 14, 1) /* succeed */ \ | |
| 50 V(ADVANCE_CP, 15, 5) /* advance_cp offset32 */ \ | |
| 51 V(GOTO, 16, 5) /* goto addr32 */ \ | |
| 52 V(LOAD_CURRENT_CHAR, 17, 9) /* load offset32 addr32 */ \ | |
| 53 V(CHECK_CHAR, 18, 7) /* check_char uc16 addr32 */ \ | |
| 54 V(CHECK_NOT_CHAR, 19, 7) /* check_not_char uc16 addr32 */ \ | |
| 55 V(OR_CHECK_NOT_CHAR, 20, 9) /* or_check_not_char uc16 uc16 addr32 */ \ | |
| 56 V(MINUS_OR_CHECK_NOT_CHAR, 21, 9) /* minus_or_check_not_char uc16 uc16 ad...*/ \ | |
| 57 V(CHECK_LT, 22, 7) /* check_lt uc16 addr32 */ \ | |
| 58 V(CHECK_GT, 23, 7) /* check_gr uc16 addr32 */ \ | |
| 59 V(CHECK_NOT_BACK_REF, 24, 6) /* check_not_back_ref capture_idx addr32 */ \ | |
| 60 V(LOOKUP_MAP1, 25, 11) /* l_map1 start16 bit_map_addr32 addr32 */ \ | |
| 61 V(LOOKUP_MAP2, 26, 99) /* l_map2 start16 half_nibble_map_addr32* */ \ | |
| 62 V(LOOKUP_MAP8, 27, 99) /* l_map8 start16 byte_map addr32* */ \ | |
| 63 V(LOOKUP_HI_MAP8, 28, 99) /* l_himap8 start8 byte_map_addr32 addr32* */ \ | |
| 64 V(CHECK_REGISTER_LT, 29, 8) /* check_reg_lt register_index value16 addr32 */ \ | |
| 65 V(CHECK_REGISTER_GE, 30, 8) /* check_reg_ge register_index value16 addr32 */ \ | |
| 66 | |
| 67 #define DECLARE_BYTECODES(name, code, length) \ | |
| 68 static const int BC_##name = code; | |
| 69 BYTECODE_ITERATOR(DECLARE_BYTECODES) | |
| 70 #undef DECLARE_BYTECODES | |
| 71 | |
| 72 #define DECLARE_BYTECODE_LENGTH(name, code, length) \ | |
| 73 static const int BC_##name##_LENGTH = length; | |
| 74 BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH) | |
| 75 #undef DECLARE_BYTECODE_LENGTH | |
| 76 } } | |
| 77 | |
| 78 #endif // V8_BYTECODES_IRREGEXP_H_ | |
| OLD | NEW |