Chromium Code Reviews| Index: runtime/vm/kernel_to_il.cc |
| diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc |
| index bcfe6043e52fdab0518f834ea08dafad24e9ffd2..910765a09ef9d053120f47110ba42bdc8b3c2a5b 100644 |
| --- a/runtime/vm/kernel_to_il.cc |
| +++ b/runtime/vm/kernel_to_il.cc |
| @@ -1319,7 +1319,7 @@ Object& ConstantEvaluator::EvaluateExpressionSafe(Expression* expression) { |
| if (setjmp(*jump.Set()) == 0) { |
| return EvaluateExpression(expression); |
| } else { |
| - Thread* thread = Thread::Current(); |
| + Thread* thread = translation_helper_.thread(); |
|
kustermann
2017/01/10 09:43:43
We have a macro for this, a "T.thread()" should be
kustermann
2017/01/10 09:45:15
Sorry "H.thread()" :-/
Kevin Millikin (Google)
2017/01/10 09:50:00
Done.
|
| Error& error = Error::Handle(Z); |
| error = thread->sticky_error(); |
| thread->clear_sticky_error(); |
| @@ -1850,10 +1850,8 @@ FlowGraphBuilder::FlowGraphBuilder( |
| InlineExitCollector* exit_collector, |
| intptr_t osr_id, |
| intptr_t first_block_id) |
| - : zone_(Thread::Current()->zone()), |
| - translation_helper_(Thread::Current(), |
| - zone_, |
| - Thread::Current()->isolate()), |
| + : translation_helper_(Thread::Current()), |
| + zone_(translation_helper_.zone()), |
| node_(node), |
| parsed_function_(parsed_function), |
| osr_id_(osr_id), |
| @@ -2192,7 +2190,8 @@ Fragment FlowGraphBuilder::CatchBlockEntry(const Array& handler_types, |
| CatchBlockEntryInstr* entry = new (Z) CatchBlockEntryInstr( |
| AllocateBlockId(), CurrentTryIndex(), graph_entry_, handler_types, |
| handler_index, *CurrentException(), *CurrentStackTrace(), |
| - /* needs_stacktrace = */ true, Thread::Current()->GetNextDeoptId(), |
| + /* needs_stacktrace = */ true, |
| + translation_helper_.thread()->GetNextDeoptId(), |
| should_restore_closure_context); |
| graph_entry_->AddCatchEntry(entry); |
| Fragment instructions(entry); |
| @@ -2562,11 +2561,11 @@ Fragment FlowGraphBuilder::StoreInstanceFieldGuarded(const dart::Field& field) { |
| if (FLAG_use_field_guards) { |
| LocalVariable* store_expression = MakeTemporary(); |
| instructions += LoadLocal(store_expression); |
| - instructions += |
| - GuardFieldClass(field_clone, Thread::Current()->GetNextDeoptId()); |
| + instructions += GuardFieldClass( |
| + field_clone, translation_helper_.thread()->GetNextDeoptId()); |
| instructions += LoadLocal(store_expression); |
| - instructions += |
| - GuardFieldLength(field_clone, Thread::Current()->GetNextDeoptId()); |
| + instructions += GuardFieldLength( |
| + field_clone, translation_helper_.thread()->GetNextDeoptId()); |
| } |
| instructions += StoreInstanceField(field_clone); |
| return instructions; |
| @@ -4911,13 +4910,6 @@ void FlowGraphBuilder::VisitRethrow(Rethrow* node) { |
| } |
| -void FlowGraphBuilder::VisitBlockExpression(BlockExpression* node) { |
| - Fragment instructions = TranslateStatement(node->body()); |
| - instructions += TranslateExpression(node->value()); |
| - fragment_ = instructions; |
| -} |
| - |
| - |
| Fragment FlowGraphBuilder::TranslateArguments(Arguments* node, |
| Array* argument_names) { |
| Fragment instructions; |