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

Side by Side Diff: tools/dom/scripts/htmldartgenerator.py

Issue 27227002: Untyping List types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 dart:html APIs from the IDL database.""" 7 dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 from generator import AnalyzeOperation, ConstantOutputOrder, \ 10 from generator import AnalyzeOperation, ConstantOutputOrder, \
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 GenerateCall, 433 GenerateCall,
434 IsOptional, 434 IsOptional,
435 can_omit_type_check) 435 can_omit_type_check)
436 436
437 def AdditionalImplementedInterfaces(self): 437 def AdditionalImplementedInterfaces(self):
438 # TODO: Include all implemented interfaces, including other Lists. 438 # TODO: Include all implemented interfaces, including other Lists.
439 implements = [] 439 implements = []
440 if self._interface_type_info.list_item_type(): 440 if self._interface_type_info.list_item_type():
441 item_type_info = self._type_registry.TypeInfo( 441 item_type_info = self._type_registry.TypeInfo(
442 self._interface_type_info.list_item_type()) 442 self._interface_type_info.list_item_type())
443 implements.append('List<%s>' % item_type_info.dart_type()) 443 implements.append('List')
444 return implements 444 return implements
445 445
446 def Mixins(self): 446 def Mixins(self):
447 mixins = [] 447 mixins = []
448 if self._interface_type_info.list_item_type(): 448 if self._interface_type_info.list_item_type():
449 item_type = self._type_registry.TypeInfo( 449 item_type = self._type_registry.TypeInfo(
450 self._interface_type_info.list_item_type()).dart_type() 450 self._interface_type_info.list_item_type()).dart_type()
451 mixins.append('ListMixin<%s>' % item_type) 451 mixins.append('ListMixin<%s>' % item_type)
452 mixins.append('ImmutableListMixin<%s>' % item_type) 452 mixins.append('ImmutableListMixin<%s>' % item_type)
453 453
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 695
696 def SecureBaseName(self, type_name): 696 def SecureBaseName(self, type_name):
697 if type_name in _secure_base_types: 697 if type_name in _secure_base_types:
698 return _secure_base_types[type_name] 698 return _secure_base_types[type_name]
699 699
700 def _DartType(self, type_name): 700 def _DartType(self, type_name):
701 return self._type_registry.DartType(type_name) 701 return self._type_registry.DartType(type_name)
702 702
703 def _TypeInfo(self, type_name): 703 def _TypeInfo(self, type_name):
704 return self._type_registry.TypeInfo(type_name) 704 return self._type_registry.TypeInfo(type_name)
OLDNEW
« sdk/lib/html/dart2js/html_dart2js.dart ('K') | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698