| Index: runtime/vm/parser.h
|
| ===================================================================
|
| --- runtime/vm/parser.h (revision 44851)
|
| +++ runtime/vm/parser.h (working copy)
|
| @@ -41,7 +41,7 @@
|
| class ParsedFunction : public ZoneAllocated {
|
| public:
|
| ParsedFunction(Thread* thread, const Function& function)
|
| - : thread_(thread),
|
| + : isolate_(thread->isolate()),
|
| function_(function),
|
| code_(Code::Handle(zone(), function.unoptimized_code())),
|
| node_sequence_(NULL),
|
| @@ -150,12 +150,11 @@
|
| void record_await() { have_seen_await_expr_ = true; }
|
| bool have_seen_await() const { return have_seen_await_expr_; }
|
|
|
| - Thread* thread() const { return thread_; }
|
| - Isolate* isolate() const { return thread()->isolate(); }
|
| - Zone* zone() const { return thread()->zone(); }
|
| + Isolate* isolate() const { return isolate_; }
|
| + Zone* zone() const { return isolate()->current_zone(); }
|
|
|
| private:
|
| - Thread* thread_;
|
| + Isolate* isolate_;
|
| const Function& function_;
|
| Code& code_;
|
| SequenceNode* node_sequence_;
|
| @@ -797,11 +796,10 @@
|
|
|
| RawInstance* TryCanonicalize(const Instance& instance, intptr_t token_pos);
|
|
|
| - Thread* thread() const { return thread_; }
|
| - Isolate* isolate() const { return thread()->isolate(); }
|
| - Zone* zone() const { return thread()->zone(); }
|
| + Isolate* isolate() const { return isolate_; }
|
| + Zone* zone() const { return isolate()->current_zone(); }
|
|
|
| - Thread* thread_; // Cached current thread.
|
| + Isolate* isolate_; // Cached current isolate.
|
|
|
| Script& script_;
|
| TokenStream::Iterator tokens_iterator_;
|
|
|