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

Unified Diff: runtime/vm/compiler.cc

Issue 2960413002: Omit JIT compiler from precompiled runtime on ARM, ARM64 and IA32. (Closed)
Patch Set: Use NOT_IN_PRECOMPILED macro for oneliners Created 3 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/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 4b9533e3e1d53ee94f4fcf131b16c2abdb39a5e4..cd53da78299b8b57b10b279cd63cd308d6c56e64 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -157,7 +157,29 @@ void DartCompilationPipeline::FinalizeCompilation(FlowGraph* flow_graph) {}
void IrregexpCompilationPipeline::ParseFunction(
ParsedFunction* parsed_function) {
- RegExpParser::ParseFunction(parsed_function);
+ VMTagScope tagScope(parsed_function->thread(),
+ VMTag::kCompileParseRegExpTagId);
+ Zone* zone = parsed_function->zone();
+ RegExp& regexp = RegExp::Handle(parsed_function->function().regexp());
+
+ const String& pattern = String::Handle(regexp.pattern());
+ const bool multiline = regexp.is_multi_line();
+
+ RegExpCompileData* compile_data = new (zone) RegExpCompileData();
+ if (!RegExpParser::ParseRegExp(pattern, multiline, compile_data)) {
+ // Parsing failures are handled in the RegExp factory constructor.
+ UNREACHABLE();
+ }
+
+ regexp.set_num_bracket_expressions(compile_data->capture_count);
+ if (compile_data->simple) {
+ regexp.set_is_simple();
+ } else {
+ regexp.set_is_complex();
+ }
+
+ parsed_function->SetRegExpCompileData(compile_data);
+
// Variables are allocated after compilation.
}

Powered by Google App Engine
This is Rietveld 408576698