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

Unified Diff: runtime/vm/ast_test.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_printer_test.cc ('k') | runtime/vm/ast_transformer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast_test.cc
diff --git a/runtime/vm/ast_test.cc b/runtime/vm/ast_test.cc
index 88096e9961342d53453233eab2008a6e6bdc81c1..90513c2d2c3819516093f2b5ad9bfffd7ebc22a4 100644
--- a/runtime/vm/ast_test.cc
+++ b/runtime/vm/ast_test.cc
@@ -13,9 +13,10 @@
namespace dart {
TEST_CASE(Ast) {
- LocalVariable* v = new LocalVariable(TokenPosition::kNoSource,
- String::ZoneHandle(Symbols::New("v")),
- Type::ZoneHandle(Type::DynamicType()));
+ LocalVariable* v = new LocalVariable(
+ TokenPosition::kNoSource,
+ String::ZoneHandle(Symbols::New(thread, "v")),
+ Type::ZoneHandle(Type::DynamicType()));
AstNode* ll = new LoadLocalNode(TokenPosition::kNoSource, v);
EXPECT(ll->IsLoadLocalNode());
EXPECT(!ll->IsLiteralNode());
@@ -24,9 +25,10 @@ TEST_CASE(Ast) {
v->set_index(1);
EXPECT_EQ(1, v->index());
- LocalVariable* p = new LocalVariable(TokenPosition::kNoSource,
- String::ZoneHandle(Symbols::New("p")),
- Type::ZoneHandle(Type::DynamicType()));
+ LocalVariable* p = new LocalVariable(
+ TokenPosition::kNoSource,
+ String::ZoneHandle(Symbols::New(thread, "p")),
+ Type::ZoneHandle(Type::DynamicType()));
EXPECT(!p->HasIndex());
p->set_index(-1);
EXPECT(p->HasIndex());
« no previous file with comments | « runtime/vm/ast_printer_test.cc ('k') | runtime/vm/ast_transformer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698