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

Unified Diff: runtime/vm/regexp.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/raw_object_snapshot.cc ('k') | runtime/vm/regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/regexp.h
diff --git a/runtime/vm/regexp.h b/runtime/vm/regexp.h
index e0808d6285871cf69ed064db84740d5533d482e4..394279debecda4b6ddfee2c859cf5292c205927d 100644
--- a/runtime/vm/regexp.h
+++ b/runtime/vm/regexp.h
@@ -1377,16 +1377,30 @@ class RegExpEngine: public AllStatic {
graph_entry(NULL),
num_blocks(-1),
num_stack_locals(-1),
- error_message(error_message) {}
+ error_message(error_message),
+ bytecode(NULL),
+ num_registers(-1) {}
+
+ CompilationResult(TypedData* bytecode, intptr_t num_registers)
+ : backtrack_goto(NULL),
+ graph_entry(NULL),
+ num_blocks(-1),
+ num_stack_locals(-1),
+ error_message(NULL),
+ bytecode(bytecode),
+ num_registers(num_registers) {}
+
CompilationResult(IndirectGotoInstr* backtrack_goto,
GraphEntryInstr* graph_entry,
intptr_t num_blocks,
- intptr_t num_stack_locals)
+ intptr_t num_stack_locals,
+ intptr_t num_registers)
: backtrack_goto(backtrack_goto),
graph_entry(graph_entry),
num_blocks(num_blocks),
num_stack_locals(num_stack_locals),
- error_message(NULL) {}
+ error_message(NULL),
+ bytecode(NULL) {}
IndirectGotoInstr* backtrack_goto;
GraphEntryInstr* graph_entry;
@@ -1394,13 +1408,22 @@ class RegExpEngine: public AllStatic {
const intptr_t num_stack_locals;
const char* error_message;
+
+ TypedData* bytecode;
+ intptr_t num_registers;
};
- static CompilationResult Compile(
+ static CompilationResult CompileIR(
RegExpCompileData* input,
const ParsedFunction* parsed_function,
const ZoneGrowableArray<const ICData*>& ic_data_array);
+ static CompilationResult CompileBytecode(
+ RegExpCompileData* data,
+ const JSRegExp& regexp,
+ bool is_one_byte,
+ Zone* zone);
+
static RawJSRegExp* CreateJSRegExp(
Zone* zone,
const String& pattern,
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698