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

Unified Diff: runtime/vm/parser.cc

Issue 1051713005: Avoid caching thread in parser. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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/parser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 44851)
+++ runtime/vm/parser.cc (working copy)
@@ -62,7 +62,7 @@
// Quick access to the current isolate and zone.
-#define I (thread()->isolate())
+#define I (isolate())
#define Z (zone())
@@ -318,7 +318,7 @@
// For parsing a compilation unit.
Parser::Parser(const Script& script, const Library& library, intptr_t token_pos)
- : thread_(Thread::Current()),
+ : isolate_(Thread::Current()->isolate()),
script_(Script::Handle(zone(), script.raw())),
tokens_iterator_(TokenStream::Handle(zone(), script.tokens()),
token_pos),
@@ -347,7 +347,7 @@
Parser::Parser(const Script& script,
ParsedFunction* parsed_function,
intptr_t token_position)
- : thread_(Thread::Current()),
+ : isolate_(Thread::Current()->isolate()),
script_(Script::Handle(zone(), script.raw())),
tokens_iterator_(TokenStream::Handle(zone(), script.tokens()),
token_position),
« no previous file with comments | « runtime/vm/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698