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

Unified Diff: lib/dom/scripts/dartgenerator.py

Issue 10388084: Better support for the case of typed arrays inheriting from other typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: better comment 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
« no previous file with comments | « lib/dom/idl/dart/dart.idl ('k') | lib/dom/scripts/generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/dartgenerator.py
diff --git a/lib/dom/scripts/dartgenerator.py b/lib/dom/scripts/dartgenerator.py
index 261318cc48b41e29962c2d02c99862edf15f2561..f8bfd7c9ed28a94261f072e45fedee9413d76b30 100755
--- a/lib/dom/scripts/dartgenerator.py
+++ b/lib/dom/scripts/dartgenerator.py
@@ -396,10 +396,14 @@ class DartGenerator(object):
# The implementation should define an indexer if the interface directly
# extends List.
- element_type = MaybeListElementType(interface)
+ (element_type, requires_indexer) = ListImplementationInfo(
+ interface, self._database)
if element_type:
for generator in generators:
- generator.AddIndexer(element_type)
+ if requires_indexer:
+ generator.AddIndexer(element_type)
+ else:
+ generator.AmendIndexer(element_type)
# Group overloaded operations by id
operationsById = {}
for operation in interface.operations:
@@ -624,6 +628,9 @@ class DummyInterfaceGenerator(object):
def AddIndexer(self, element_type):
pass
+ def AmendIndexer(sefl, element_type):
+ pass
+
def AddTypedArrayConstructors(self, element_type):
pass
« no previous file with comments | « lib/dom/idl/dart/dart.idl ('k') | lib/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698