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

Unified Diff: runtime/vm/parser.cc

Issue 1120223003: Minor cleanup for getter/setter lookup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 45537)
+++ runtime/vm/parser.cc (working copy)
@@ -5279,8 +5279,7 @@
// or final field implies a setter which throws a NoSuchMethodError,
// thus we need to check for conflicts with existing setters and
// getters.
- String& accessor_name = String::Handle(Z,
- Field::GetterName(var_name));
+ String& accessor_name = String::Handle(Z, Field::GetterName(var_name));
if (library_.LookupLocalObject(accessor_name) != Object::null()) {
ReportError(name_pos, "getter for '%s' is already defined",
var_name.ToCString());
@@ -5302,8 +5301,7 @@
}
if (CurrentToken() == Token::kASSIGN) {
ConsumeToken();
- Instance& field_value = Instance::Handle(Z,
- Object::sentinel().raw());
+ Instance& field_value = Instance::Handle(Z, Object::sentinel().raw());
bool has_simple_literal = false;
if (LookaheadToken(1) == Token::kSEMICOLON) {
has_simple_literal = IsSimpleLiteral(type, &field_value);
@@ -5312,8 +5310,7 @@
field.set_value(field_value);
if (!has_simple_literal) {
// Create a static final getter.
- String& getter_name = String::Handle(Z,
- Field::GetterSymbol(var_name));
+ String& getter_name = String::Handle(Z, Field::GetterSymbol(var_name));
getter = Function::New(getter_name,
RawFunction::kImplicitStaticFinalGetter,
is_static,
@@ -5411,8 +5408,7 @@
ReportError(name_pos, "missing '%s' cannot be patched",
func_name.ToCString());
}
- String& accessor_name = String::Handle(Z,
- Field::GetterName(func_name));
+ String& accessor_name = String::Handle(Z, Field::GetterName(func_name));
if (library_.LookupLocalObject(accessor_name) != Object::null()) {
ReportError(name_pos, "'%s' is already defined as getter",
func_name.ToCString());
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698