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

Unified Diff: runtime/vm/regexp_interpreter.h

Issue 1201383002: Port irregexp bytecode compiler and interpreter from V8 r24065. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months 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 | « runtime/vm/regexp_bytecodes.h ('k') | runtime/vm/regexp_interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « runtime/vm/regexp_bytecodes.h ('k') | runtime/vm/regexp_interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698