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

Unified Diff: frog/gen.dart

Issue 8974005: Partial fix for Issue 709. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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/minfrog » ('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 6851840ef9e6a049996d6db9f9ed71a526099bd0..08acc18cc7283c1a5a13f40d468079accd031eec 100644
--- a/frog/gen.dart
+++ b/frog/gen.dart
@@ -219,7 +219,7 @@ class WorldGenerator {
return '${type.jsname}.$name';
} else if (type.isHiddenNativeType) {
corejs.ensureDynamicProto();
- return '\$dynamic("$name").${type.jsname}';
+ return '\$dynamic("$name").${type.definition.nativeType.name}';
} else {
return '${type.jsname}.prototype.$name';
}
@@ -274,7 +274,13 @@ class WorldGenerator {
if (nativeName == '') {
writer.writeln('function ${type.jsname}() {}');
} else if (type.jsname != nativeName) {
- writer.writeln('${type.jsname} = ${nativeName};');
+ if (type.isHiddenNativeType) {
+ // This is a holder for static methods.
+ // TODO(sra): Generate only if used.
+ writer.writeln('function ${type.jsname}() {}');
+ } else {
+ writer.writeln('${type.jsname} = ${nativeName};');
+ }
}
}
« no previous file with comments | « no previous file | frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698