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

Unified Diff: runtime/vm/ast_transformer.cc

Issue 1870343002: - Refactor Symbol allocation to expect a thread parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review feedback. Created 4 years, 8 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/ast_test.cc ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast_transformer.cc
diff --git a/runtime/vm/ast_transformer.cc b/runtime/vm/ast_transformer.cc
index 2137931d3acd75f4b2a66044a748573e861fa421..a81babbdaf2dd78b7809fb57e09bed2b385e678e 100644
--- a/runtime/vm/ast_transformer.cc
+++ b/runtime/vm/ast_transformer.cc
@@ -10,6 +10,9 @@
namespace dart {
+// Quick access to the current thread.
+#define T (thread())
+
// Quick access to the current zone.
#define Z (thread()->zone())
@@ -66,8 +69,8 @@ AstNode* AwaitTransformer::Transform(AstNode* expr) {
LocalVariable* AwaitTransformer::EnsureCurrentTempVar() {
String& symbol =
- String::ZoneHandle(Z, Symbols::NewFormatted("%d", temp_cnt_));
- symbol = Symbols::FromConcat(Symbols::AwaitTempVarPrefix(), symbol);
+ String::ZoneHandle(Z, Symbols::NewFormatted(T, "%d", temp_cnt_));
+ symbol = Symbols::FromConcat(T, Symbols::AwaitTempVarPrefix(), symbol);
ASSERT(!symbol.IsNull());
// Look up the variable in the scope used for async temp variables.
LocalVariable* await_tmp = async_temp_scope_->LocalLookupVariable(symbol);
« no previous file with comments | « runtime/vm/ast_test.cc ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698