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

Unified Diff: runtime/vm/object.cc

Issue 1868783002: Minor cleanup. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments 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/flow_graph_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 63389b6a446460fbc94232abd70b83b507bb23a1..29f1cd2af5423b7814bace183f1e22a3efa214ce 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10911,15 +10911,15 @@ RawObject* Namespace::Lookup(const String& name) const {
if (!Field::IsGetterName(name) &&
!Field::IsSetterName(name) &&
(obj.IsNull() || obj.IsLibraryPrefix())) {
- const String& getter_name = String::Handle(Field::LookupGetterSymbol(name));
- if (!getter_name.IsNull()) {
- obj = lib.LookupEntry(getter_name, &ignore);
+ String& accessor_name = String::Handle(zone);
+ accessor_name ^= Field::LookupGetterSymbol(name);
+ if (!accessor_name.IsNull()) {
+ obj = lib.LookupEntry(accessor_name, &ignore);
}
if (obj.IsNull()) {
- const String& setter_name =
- String::Handle(Field::LookupSetterSymbol(name));
- if (!setter_name.IsNull()) {
- obj = lib.LookupEntry(setter_name, &ignore);
+ accessor_name ^= Field::LookupSetterSymbol(name);
+ if (!accessor_name.IsNull()) {
+ obj = lib.LookupEntry(accessor_name, &ignore);
}
}
}
@@ -10932,7 +10932,7 @@ RawObject* Namespace::Lookup(const String& name) const {
// LookupReExport() only returns objects that match the given name.
// If there is no field/func/getter, try finding a setter.
const String& setter_name =
- String::Handle(Field::LookupSetterSymbol(name));
+ String::Handle(zone, Field::LookupSetterSymbol(name));
if (!setter_name.IsNull()) {
obj = lib.LookupReExport(setter_name);
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698