Index: runtime/vm/regexp_interpreter.h |
diff --git a/runtime/vm/regexp_interpreter.h b/runtime/vm/regexp_interpreter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..eab89cb58864bad46e5d15a8305e57a683ed9bd2 |
--- /dev/null |
+++ b/runtime/vm/regexp_interpreter.h |
@@ -0,0 +1,33 @@ |
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// A simple interpreter for the Irregexp byte code. |
+ |
+#ifndef VM_REGEXP_INTERPRETER_H_ |
+#define VM_REGEXP_INTERPRETER_H_ |
+ |
+#include "vm/allocation.h" |
+#include "vm/object.h" |
+#include "vm/zone.h" |
+ |
+namespace dart { |
+ |
+class IrregexpInterpreter : public AllStatic { |
+ public: |
+ enum IrregexpResult { |
+ RE_FAILURE = 0, |
+ RE_SUCCESS = 1, |
+ RE_EXCEPTION = -1 |
+ }; |
+ |
+ static IrregexpResult Match(const TypedData& bytecode, |
+ const String& subject, |
+ int32_t* captures, |
+ intptr_t start_position, |
+ Zone* zone); |
+}; |
+ |
+} // namespace dart |
+ |
+#endif // VM_REGEXP_INTERPRETER_H_ |