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

Unified Diff: src/bytecodes-re2k.h

Issue 9415: Add bytecodes and an interpreter for executing regular expressions. Very... (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler-re2k-inl.h ('k') | src/interpreter-re2k.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bytecodes-re2k.h
===================================================================
--- src/bytecodes-re2k.h (revision 0)
+++ src/bytecodes-re2k.h (revision 0)
@@ -0,0 +1,46 @@
+// Copyright 2008 the V8 project authors. All rights reserved.
+
+#ifndef V8_BYTECODES_RE2K_H_
+#define V8_BYTECODES_RE2K_H_
+
+namespace v8 { namespace internal {
+
+#define BYTECODE_ITERATOR(V) \
+V(PUSH_CP, 0, 2) /* push_cp offset8 */ \
+V(PUSH_CP_WIDE, 1, 5) /* push_cp offset32 */ \
+V(PUSH_BT, 2, 5) /* push_bt address32 */ \
+V(PUSH_CAPTURE, 3, 2) /* push_capture capture_index */ \
+V(SET_CAPTURE, 4, 3) /* set_capture capture_index offset8 */ \
+V(SET_CAPTURE_WIDE, 5, 6) /* set_capture capture_index offset32 */ \
+V(POP_CP, 6, 1) /* pop_cp */ \
+V(POP_BT, 7, 1) /* pop_bt */ \
+V(POP_CAPTURE, 8, 2) /* pop_capture capture_index */ \
+V(FAIL, 9, 1) /* fail */ \
+V(FAIL_IF_WITHIN, 10, 2) /* fail distance8 */ \
+V(FAIL_IF_WITHIN_WIDE, 11, 5) /* fail distance32 */ \
+V(SUCCEED, 12, 1) /* succeed */ \
+V(ADVANCE_CP, 13, 2) /* advance_cp offset8 */ \
+V(ADVANCE_CP_WIDE, 14, 5) /* advance_cp offset32 */ \
+V(GOTO, 15, 5) /* goto address32 */ \
+V(LOAD_CURRENT_CHAR, 16, 2) /* load offset8 */ \
+V(LOAD_CURRENT_CHAR_WIDE, 17, 5) /* load offset32 */ \
+V(CHECK_CHAR, 18, 7) /* check_char uc16 address32 */ \
+V(CHECK_NOT_CHAR, 19, 7) /* check_not_char uc16 address32 */ \
+V(CHECK_RANGE, 20, 9) /* check_range uc16 uc16 address32 */ \
+V(CHECK_NOT_RANGE, 21, 9) /* check_not_range uc16 uc16 address32 */ \
+V(CHECK_BACKREF, 22, 6) /* check_backref offset8 capture_idx add...*/ \
+V(CHECK_BACKREF_WIDE, 23, 9) /* check_backref offset32 capture_idx ad...*/ \
+V(CHECK_NOT_BACKREF, 24, 6) /* check_not_backref offset8 capture_idx...*/ \
+V(CHECK_NOT_BACKREF_WIDE, 25, 9) /* check_not_backref offset32 capture_id...*/ \
+V(CHECK_BITMAP, 26,13) /* check_bitmap uc16 uc16 addr32 */ \
+V(CHECK_NOT_BITMAP, 27,13) /* check_not_bitmap uc16 uc16 addr32 */
+
+#define DECLARE_BYTECODES(name, code, length) \
+ static const int BC_##name = code;
+BYTECODE_ITERATOR(DECLARE_BYTECODES)
+#undef DECLARE_BYTECODES
+
+
+} }
+
+#endif // V8_BYTECODES_IA32_H_
« no previous file with comments | « src/assembler-re2k-inl.h ('k') | src/interpreter-re2k.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698