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

Unified Diff: runtime/vm/object.cc

Issue 1868783002: Minor cleanup. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 44e9d23312d593d64b356ef300bad1de9e43d571..33989c00a2e8c0e4783c9cb52f9855a0be52617c 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10896,15 +10896,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& cname = String::Handle(zone);
hausner 2016/04/06 22:27:19 cname looks very much like name. How about acc_nam
siva 2016/04/06 23:02:49 Done, used accessor_name
+ cname ^= Field::LookupGetterSymbol(name);
+ if (!cname.IsNull()) {
+ obj = lib.LookupEntry(cname, &ignore);
}
if (obj.IsNull()) {
- const String& setter_name =
- String::Handle(Field::LookupSetterSymbol(name));
- if (!setter_name.IsNull()) {
- obj = lib.LookupEntry(setter_name, &ignore);
+ cname ^= Field::LookupSetterSymbol(name);
+ if (!cname.IsNull()) {
+ obj = lib.LookupEntry(cname, &ignore);
}
}
}
@@ -10917,7 +10917,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