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

Unified Diff: lib/html/scripts/systemhtml.py

Issue 10941047: Don't generate FooList if it behaves like List<Foo> exactly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/html/scripts/systemhtml.py
===================================================================
--- lib/html/scripts/systemhtml.py (revision 12656)
+++ lib/html/scripts/systemhtml.py (working copy)
@@ -217,8 +217,6 @@
'writestart': 'writeStart'
}
-
-
# Information for generating element constructors.
#
# TODO(sra): maybe remove all the argument complexity and use cascades.
@@ -478,7 +476,8 @@
self._backend = system._backend.ImplementationGenerator(self._interface)
def StartInterface(self):
- if not self._interface.id in _merged_html_interfaces:
+ if (not self._interface.id in _merged_html_interfaces and
vsm 2012/09/24 19:31:10 Can you add a comment here?
Emily Fortuna 2012/09/24 19:42:58 Done.
+ self._html_interface_name not in nativified_classes.values()):
path = '%s.dart' % self._html_interface_name
self._interface_emitter = self._system._CreateEmitter(path)
else:
@@ -562,7 +561,10 @@
if self._backend.HasImplementation():
if not self._interface.id in _merged_html_interfaces:
- filename = '%sImpl.dart' % self._html_interface_name
+ name = self._html_interface_name
+ if self._html_interface_name in nativified_classes:
+ name = nativified_classes[self._html_interface_name]
+ filename = '%sImpl.dart' % name
else:
filename = '%sImpl_Merged.dart' % self._html_interface_name
self._implementation_emitter = self._system._CreateEmitter(filename)
@@ -782,7 +784,10 @@
return True
def _ImplClassName(self, type_name):
- return '_%sImpl' % type_name
+ name = type_name
+ if type_name in nativified_classes:
+ name = nativified_classes[type_name]
+ return '_%sImpl' % name
def StartInterface(self):
interface = self._interface

Powered by Google App Engine
This is Rietveld 408576698