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

Unified Diff: frog/gen.dart

Issue 10354005: Fix for Issue 2878 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | frog/member.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/gen.dart
diff --git a/frog/gen.dart b/frog/gen.dart
index 4205d01f3b62ec619d219bc1e21b059d1646ed0f..7ee24a3b4e1e52002ab29f045a6450538ca6bf64 100644
--- a/frog/gen.dart
+++ b/frog/gen.dart
@@ -540,12 +540,12 @@ class WorldGenerator {
// generate code for instance fields
if (field._provideGetter &&
!field.declaringType.isConcreteGeneric) {
- _writePrototypePatch(field.declaringType, 'get\$${field.jsname}',
+ _writePrototypePatch(field.declaringType, field.jsnameOfGetter,
'function() { return this.${field.jsname}; }', writer);
}
if (field._provideSetter &&
!field.declaringType.isConcreteGeneric) {
- _writePrototypePatch(field.declaringType, 'set\$${field.jsname}',
+ _writePrototypePatch(field.declaringType, field.jsnameOfSetter,
'function(value) { return this.${field.jsname} = value; }', writer);
}
@@ -974,7 +974,7 @@ class MethodGenerator implements TreeVisitor, CallingContext {
static bool _maybeGenerateBoundGetter(MethodMember m, CodeWriter defWriter) {
if (m._provideGetter) {
String suffix = world.gen._writePrototypePatch(m.declaringType,
- 'get\$${m.jsname}', 'function() {', defWriter, false);
+ m.jsnameOfGetter, 'function() {', defWriter, false);
if (m.parameters.some((p) => p.isOptional)) {
defWriter.writeln('var f = this.${m.jsname}.bind(this);');
defWriter.writeln('f.\$optional = this.${m.jsname}.\$optional;');
« no previous file with comments | « no previous file | frog/member.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698