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

Unified Diff: runtime/vm/precompiler.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/parser_test.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 556bc486ce3997fd5b4021c4ccc39d70cfd2f974..2873ec0eb9e41b6c1fe5962b5220241629db3d6b 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -348,9 +348,9 @@ void Precompiler::AddEntryPoints(Dart_QualifiedFunctionName entry_points[]) {
String& function_name = String::Handle(Z);
for (intptr_t i = 0; entry_points[i].library_uri != NULL; i++) {
- library_uri = Symbols::New(entry_points[i].library_uri);
- class_name = Symbols::New(entry_points[i].class_name);
- function_name = Symbols::New(entry_points[i].function_name);
+ library_uri = Symbols::New(thread(), entry_points[i].library_uri);
+ class_name = Symbols::New(thread(), entry_points[i].class_name);
+ function_name = Symbols::New(thread(), entry_points[i].function_name);
lib = Library::LookupLibrary(library_uri);
if (lib.IsNull()) {
@@ -846,7 +846,7 @@ RawObject* Precompiler::ExecuteOnce(SequenceNode* fragment) {
// Function fits the bill.
const char* kEvalConst = "eval_const";
const Function& func = Function::ZoneHandle(Function::New(
- String::Handle(Symbols::New(kEvalConst)),
+ String::Handle(Symbols::New(thread, kEvalConst)),
RawFunction::kRegularFunction,
true, // static function
false, // not const function
@@ -989,14 +989,14 @@ void Precompiler::CheckForNewDynamicFunctions() {
// Handle the implicit call type conversions.
if (Field::IsGetterName(selector)) {
selector2 = Field::NameFromGetter(selector);
- selector3 = Symbols::Lookup(selector2);
+ selector3 = Symbols::Lookup(thread(), selector2);
if (IsSent(selector2)) {
// Call-through-getter.
// Function is get:foo and somewhere foo is called.
AddFunction(function);
}
- selector3 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
- selector2);
+ selector3 = Symbols::LookupFromConcat(thread(),
+ Symbols::ClosurizePrefix(), selector2);
if (IsSent(selector3)) {
// Hash-closurization.
// Function is get:foo and somewhere get:#foo is called.
@@ -1010,8 +1010,8 @@ void Precompiler::CheckForNewDynamicFunctions() {
AddFunction(function2);
}
} else if (Field::IsSetterName(selector)) {
- selector2 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
- selector);
+ selector2 = Symbols::LookupFromConcat(thread(),
+ Symbols::ClosurizePrefix(), selector);
if (IsSent(selector2)) {
// Hash-closurization.
// Function is set:foo and somewhere get:#set:foo is called.
@@ -1036,8 +1036,8 @@ void Precompiler::CheckForNewDynamicFunctions() {
function2 = function.GetMethodExtractor(selector2);
AddFunction(function2);
}
- selector2 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
- selector);
+ selector2 = Symbols::LookupFromConcat(thread(),
+ Symbols::ClosurizePrefix(), selector);
if (IsSent(selector2)) {
// Hash-closurization.
// Function is foo and somewhere get:#foo is called.
« no previous file with comments | « runtime/vm/parser_test.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698