Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Side by Side Diff: src/bytecodes-re2k.h

Issue 11319: * Add support for positive lookahead assertions and negative... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
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 */ \ 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_CP_TO_REGISTER, 5, 2) /* set_cp_to_registger register_index */ \
41 V(ADVANCE_REGISTER, 6, 6) /* advance_register register_index value32 */ \ 41 V(SET_REGISTER_TO_SP, 6, 2) /* set_register_to_sp register_index */ \
42 V(POP_CP, 7, 1) /* pop_cp */ \ 42 V(SET_SP_TO_REGISTER, 7, 2) /* set_sp_to_registger register_index */ \
43 V(POP_BT, 8, 1) /* pop_bt */ \ 43 V(SET_REGISTER, 8, 6) /* set_register register_index value32 */ \
44 V(POP_REGISTER, 9, 2) /* pop_register register_index */ \ 44 V(ADVANCE_REGISTER, 9, 6) /* advance_register register_index value32 */ \
45 V(FAIL, 10, 1) /* fail */ \ 45 V(POP_CP, 10, 1) /* pop_cp */ \
46 V(SUCCEED, 11, 1) /* succeed */ \ 46 V(POP_BT, 11, 1) /* pop_bt */ \
47 V(ADVANCE_CP, 12, 5) /* advance_cp offset32 */ \ 47 V(POP_REGISTER, 12, 2) /* pop_register register_index */ \
48 V(GOTO, 13, 5) /* goto addr32 */ \ 48 V(FAIL, 13, 1) /* fail */ \
49 V(LOAD_CURRENT_CHAR, 14, 9) /* load offset32 addr32 */ \ 49 V(SUCCEED, 14, 1) /* succeed */ \
50 V(CHECK_CHAR, 15, 7) /* check_char uc16 addr32 */ \ 50 V(ADVANCE_CP, 15, 5) /* advance_cp offset32 */ \
51 V(CHECK_NOT_CHAR, 16, 7) /* check_not_char uc16 addr32 */ \ 51 V(GOTO, 16, 5) /* goto addr32 */ \
52 V(CHECK_LT, 17, 7) /* check_lt uc16 addr32 */ \ 52 V(LOAD_CURRENT_CHAR, 17, 9) /* load offset32 addr32 */ \
53 V(CHECK_GT, 18, 7) /* check_gr uc16 addr32 */ \ 53 V(CHECK_CHAR, 18, 7) /* check_char uc16 addr32 */ \
54 V(CHECK_BACKREF, 19, 9) /* check_backref offset32 capture_idx addr32 */ \ 54 V(CHECK_NOT_CHAR, 19, 7) /* check_not_char uc16 addr32 */ \
55 V(CHECK_NOT_BACKREF, 20, 9) /* check_not_backref offset32 capture_idx addr32*/ \ 55 V(CHECK_LT, 20, 7) /* check_lt uc16 addr32 */ \
56 V(LOOKUP_MAP1, 21, 11) /* l_map1 start16 bit_map_addr32 addr32 */ \ 56 V(CHECK_GT, 21, 7) /* check_gr uc16 addr32 */ \
57 V(LOOKUP_MAP2, 22, 99) /* l_map2 start16 half_nibble_map_addr32* */ \ 57 V(CHECK_BACKREF, 22, 9) /* check_backref offset32 capture_idx addr32 */ \
58 V(LOOKUP_MAP8, 23, 99) /* l_map8 start16 byte_map addr32* */ \ 58 V(CHECK_NOT_BACKREF, 23, 9) /* check_not_backref offset32 capture_idx addr32*/ \
59 V(LOOKUP_HI_MAP8, 24, 99) /* l_himap8 start8 byte_map_addr32 addr32* */ \ 59 V(LOOKUP_MAP1, 24, 11) /* l_map1 start16 bit_map_addr32 addr32 */ \
60 V(CHECK_REGISTER_LT, 25, 8) /* check_reg_lt register_index value16 addr32 */ \ 60 V(LOOKUP_MAP2, 25, 99) /* l_map2 start16 half_nibble_map_addr32* */ \
61 V(CHECK_REGISTER_GE, 26, 8) /* check_reg_ge register_index value16 addr32 */ \ 61 V(LOOKUP_MAP8, 26, 99) /* l_map8 start16 byte_map addr32* */ \
62 V(LOOKUP_HI_MAP8, 27, 99) /* l_himap8 start8 byte_map_addr32 addr32* */ \
63 V(CHECK_REGISTER_LT, 28, 8) /* check_reg_lt register_index value16 addr32 */ \
64 V(CHECK_REGISTER_GE, 29, 8) /* check_reg_ge register_index value16 addr32 */ \
62 65
63 #define DECLARE_BYTECODES(name, code, length) \ 66 #define DECLARE_BYTECODES(name, code, length) \
64 static const int BC_##name = code; 67 static const int BC_##name = code;
65 BYTECODE_ITERATOR(DECLARE_BYTECODES) 68 BYTECODE_ITERATOR(DECLARE_BYTECODES)
66 #undef DECLARE_BYTECODES 69 #undef DECLARE_BYTECODES
67 70
68 #define DECLARE_BYTECODE_LENGTH(name, code, length) \ 71 #define DECLARE_BYTECODE_LENGTH(name, code, length) \
69 static const int BC_##name##_LENGTH = length; 72 static const int BC_##name##_LENGTH = length;
70 BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH) 73 BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH)
71 #undef DECLARE_BYTECODE_LENGTH 74 #undef DECLARE_BYTECODE_LENGTH
72 } } 75 } }
73 76
74 #endif // V8_BYTECODES_IA32_H_ 77 #endif // V8_BYTECODES_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698