Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: runtime/vm/parser.h

Issue 1242343002: Remove more uses of Isolate::current_zone. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Access isolate via thread. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698