| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index fee4b89553a3717ade51339da924ae6c515c8232..2548c354bc785c4029a32337b05ff3ac7ea0b67c 100644
|
| --- a/runtime/vm/compiler.cc
|
| +++ b/runtime/vm/compiler.cc
|
| @@ -549,6 +549,30 @@ void CompileParsedFunctionHelper::FinalizeCompilation(
|
| function.set_usage_counter(INT_MIN);
|
| }
|
|
|
| +#if !defined(PRODUCT)
|
| + ZoneGrowableArray<TokenPosition>* await_token_positions =
|
| + flow_graph->await_token_positions();
|
| + if (await_token_positions != NULL) {
|
| + Smi& token_pos_value = Smi::Handle(zone);
|
| + if (await_token_positions->length() > 0) {
|
| + const Array& await_to_token_map = Array::Handle(
|
| + zone, Array::New(await_token_positions->length(), Heap::kOld));
|
| + ASSERT(!await_to_token_map.IsNull());
|
| + for (intptr_t i = 0; i < await_token_positions->length(); i++) {
|
| + TokenPosition token_pos = await_token_positions->At(i).FromSynthetic();
|
| + if (!token_pos.IsReal()) {
|
| + // Some async machinary uses kNoSourcePos. Skip these.
|
| + continue;
|
| + }
|
| + ASSERT(token_pos.IsReal());
|
| + token_pos_value = Smi::New(token_pos.value());
|
| + await_to_token_map.SetAt(i, token_pos_value);
|
| + }
|
| + code.SetAwaitTokenPositions(await_to_token_map);
|
| + }
|
| + }
|
| +#endif // !defined(PRODUCT)
|
| +
|
| const Array& intervals = graph_compiler->inlined_code_intervals();
|
| INC_STAT(thread(), total_code_size, intervals.Length() * sizeof(uword));
|
| code.SetInlinedIntervals(intervals);
|
|
|