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

Unified Diff: runtime/vm/compiler.cc

Issue 2960413002: Omit JIT compiler from precompiled runtime on ARM, ARM64 and IA32. (Closed)
Patch Set: Moved trace_irregexp flag to flag_list.h Created 3 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/lib/regexp.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 4b9533e3e1d53ee94f4fcf131b16c2abdb39a5e4..96d2fa8b48190da1869f9b760c93134c93365eb0 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -107,7 +107,6 @@ DEFINE_FLAG(bool,
DECLARE_FLAG(bool, huge_method_cutoff_in_code_size);
DECLARE_FLAG(bool, trace_failed_optimization_attempts);
-DECLARE_FLAG(bool, trace_irregexp);
#ifndef DART_PRECOMPILED_RUNTIME
@@ -157,7 +156,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.
}
« no previous file with comments | « runtime/lib/regexp.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698