Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index fee4b89553a3717ade51339da924ae6c515c8232..fae6a677ded1d9d3f0458006dd78f5b924861b16 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -549,28 +549,6 @@ void CompileParsedFunctionHelper::FinalizeCompilation( |
function.set_usage_counter(INT_MIN); |
} |
- const Array& intervals = graph_compiler->inlined_code_intervals(); |
- INC_STAT(thread(), total_code_size, intervals.Length() * sizeof(uword)); |
- code.SetInlinedIntervals(intervals); |
- |
- const Array& inlined_id_array = |
- Array::Handle(zone, graph_compiler->InliningIdToFunction()); |
- INC_STAT(thread(), total_code_size, |
- inlined_id_array.Length() * sizeof(uword)); |
- code.SetInlinedIdToFunction(inlined_id_array); |
- |
- const Array& caller_inlining_id_map_array = |
- Array::Handle(zone, graph_compiler->CallerInliningIdMap()); |
- INC_STAT(thread(), total_code_size, |
- caller_inlining_id_map_array.Length() * sizeof(uword)); |
- code.SetInlinedCallerIdMap(caller_inlining_id_map_array); |
- |
- const Array& inlined_id_to_token_pos = |
- Array::Handle(zone, graph_compiler->InliningIdToTokenPos()); |
- INC_STAT(thread(), total_code_size, |
- inlined_id_to_token_pos.Length() * sizeof(uword)); |
- code.SetInlinedIdToTokenPos(inlined_id_to_token_pos); |
- |
graph_compiler->FinalizePcDescriptors(code); |
code.set_deopt_info_array(deopt_info_array); |
@@ -578,17 +556,7 @@ void CompileParsedFunctionHelper::FinalizeCompilation( |
graph_compiler->FinalizeVarDescriptors(code); |
graph_compiler->FinalizeExceptionHandlers(code); |
graph_compiler->FinalizeStaticCallTargetsTable(code); |
- |
-#if !defined(PRODUCT) |
- // Set the code source map after setting the inlined information because |
- // we use the inlined information when printing. |
- const CodeSourceMap& code_source_map = CodeSourceMap::Handle( |
- zone, graph_compiler->code_source_map_builder()->Finalize()); |
- code.set_code_source_map(code_source_map); |
- if (FLAG_print_code_source_map) { |
- CodeSourceMap::Dump(code_source_map, code, function); |
- } |
-#endif // !defined(PRODUCT) |
+ graph_compiler->FinalizeCodeSourceMap(code); |
if (optimized()) { |
bool code_was_installed = false; |
@@ -1203,26 +1171,6 @@ bool CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { |
} |
-#if defined(DEBUG) |
-// Verifies that the inliner is always in the list of inlined functions. |
-// If this fails run with --trace-inlining-intervals to get more information. |
-static void CheckInliningIntervals(const Function& function) { |
- const Code& code = Code::Handle(function.CurrentCode()); |
- const Array& intervals = Array::Handle(code.GetInlinedIntervals()); |
- if (intervals.IsNull() || (intervals.Length() == 0)) return; |
- Smi& start = Smi::Handle(); |
- GrowableArray<Function*> inlined_functions; |
- for (intptr_t i = 0; i < intervals.Length(); i += Code::kInlIntNumEntries) { |
- start ^= intervals.At(i + Code::kInlIntStart); |
- ASSERT(!start.IsNull()); |
- if (start.IsNull()) continue; |
- code.GetInlinedFunctionsAt(start.Value(), &inlined_functions); |
- ASSERT(inlined_functions[inlined_functions.length() - 1]->raw() == |
- function.raw()); |
- } |
-} |
-#endif // defined(DEBUG) |
- |
static RawError* CompileFunctionHelper(CompilationPipeline* pipeline, |
const Function& function, |
bool optimized, |
@@ -1361,7 +1309,6 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline, |
Disassembler::DisassembleCode(function, true); |
} |
- DEBUG_ONLY(CheckInliningIntervals(function)); |
return Error::null(); |
} else { |
Thread* const thread = Thread::Current(); |