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

Unified Diff: runtime/vm/ast.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/lib/string.cc ('k') | runtime/vm/ast_printer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.cc
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index 7d7f3f4a145473e42ec56cf42c70a5ef25429400..8ac98c2afc477879fd3381aa930d21bf6805f22d 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -104,13 +104,15 @@ LetNode::LetNode(TokenPosition token_pos)
LocalVariable* LetNode::AddInitializer(AstNode* node) {
+ Thread* thread = Thread::Current();
+ Zone* zone = thread->zone();
initializers_.Add(node);
char name[64];
OS::SNPrint(name, sizeof(name), ":lt%s_%" Pd "",
token_pos().ToCString(), vars_.length());
LocalVariable* temp_var =
new LocalVariable(token_pos(),
- String::ZoneHandle(Symbols::New(name)),
+ String::ZoneHandle(zone, Symbols::New(thread, name)),
Object::dynamic_type());
vars_.Add(temp_var);
return temp_var;
@@ -635,7 +637,7 @@ AstNode* StaticGetterNode::MakeAssignmentNode(AstNode* rhs) {
String::ZoneHandle(zone, Field::LookupSetterSymbol(field_name_));
Function& setter = Function::ZoneHandle(zone);
if (!setter_name.IsNull()) {
- setter = Resolver::ResolveDynamicAnyArgs(cls(), setter_name);
+ setter = Resolver::ResolveDynamicAnyArgs(zone, cls(), setter_name);
}
if (setter.IsNull() || setter.is_abstract()) {
// No instance setter found in super class chain,
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/ast_printer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698