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

Unified Diff: lib/compiler/implementation/namer.dart

Issue 10310060: Generate getters and setters dynamically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify by using a bool. Created 8 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
Index: lib/compiler/implementation/namer.dart
diff --git a/lib/compiler/implementation/namer.dart b/lib/compiler/implementation/namer.dart
index 2864e6435ed176216b0d8c79d3d792716e955a40..e28958b886ca876eb8ed4d3ae8a68e281cfceb7c 100644
--- a/lib/compiler/implementation/namer.dart
+++ b/lib/compiler/implementation/namer.dart
@@ -69,11 +69,15 @@ class Namer {
}
String setterName(LibraryElement lib, SourceString name) {
- return 'set\$${privateName(lib, name)}';
+ // We dynamically create setters from the field-name. The setter name must
+ // therefore be derived from the instance field-name.
+ return 'set\$${instanceFieldName(lib, name)}';
}
String getterName(LibraryElement lib, SourceString name) {
- return 'get\$${privateName(lib, name)}';
+ // We dynamically create getters from the field-name. The getter name must
+ // therefore be derived from the instance field-name.
+ return 'get\$${instanceFieldName(lib, name)}';
}
String getFreshGlobalName(String proposedName) {

Powered by Google App Engine
This is Rietveld 408576698