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

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, 6 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
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..7fae193cb5c97787e7f148a2e6162ef4d5e2eda3
--- /dev/null
+++ b/runtime/vm/regexp_interpreter.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2014, 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/object.h"
+
+namespace dart {
+
+class IrregexpInterpreter {
+ 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_

Powered by Google App Engine
This is Rietveld 408576698