Index: runtime/vm/parser.h |
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h |
index 9cab860ca46fa309c9d15980512bc09d7d499d97..92eb87d7ef6079a12f68b731bcd21d79edf1594b 100644 |
--- a/runtime/vm/parser.h |
+++ b/runtime/vm/parser.h |
@@ -41,7 +41,7 @@ struct TopLevel; |
class ParsedFunction : public ZoneAllocated { |
public: |
ParsedFunction(Thread* thread, const Function& function) |
- : isolate_(thread->isolate()), |
+ : thread_(thread), |
function_(function), |
code_(Code::Handle(zone(), function.unoptimized_code())), |
node_sequence_(NULL), |
@@ -150,11 +150,11 @@ class ParsedFunction : public ZoneAllocated { |
void record_await() { have_seen_await_expr_ = true; } |
bool have_seen_await() const { return have_seen_await_expr_; } |
- Isolate* isolate() const { return isolate_; } |
- Zone* zone() const { return isolate()->current_zone(); } |
+ Isolate* isolate() const { return thread_->isolate(); } |
+ Zone* zone() const { return thread_->zone(); } |
private: |
- Isolate* isolate_; |
+ Thread* thread_; |
const Function& function_; |
Code& code_; |
SequenceNode* node_sequence_; |
@@ -807,9 +807,10 @@ class Parser : public ValueObject { |
RawInstance* TryCanonicalize(const Instance& instance, intptr_t token_pos); |
Isolate* isolate() const { return isolate_; } |
- Zone* zone() const { return isolate()->current_zone(); } |
+ Zone* zone() const { return thread_->zone(); } |
Isolate* isolate_; // Cached current isolate. |
+ Thread* thread_; |
Script& script_; |
TokenStream::Iterator tokens_iterator_; |