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

Side by Side Diff: lib/dom/scripts/systemhtml.py

Issue 10560018: Use JavaScriptIndexingBehavior on typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 6 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
« no previous file with comments | « no previous file | lib/html/frog/html_frog.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from systemfrog import * 9 from systemfrog import *
10 from systeminterface import * 10 from systeminterface import *
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 1057
1058 native_spec = MakeNativeSpec(interface.javascript_binding_name) 1058 native_spec = MakeNativeSpec(interface.javascript_binding_name)
1059 1059
1060 extends = ' extends ' + base if base else '' 1060 extends = ' extends ' + base if base else ''
1061 1061
1062 # TODO: Include all implemented interfaces, including other Lists. 1062 # TODO: Include all implemented interfaces, including other Lists.
1063 implements = [self._html_interface_name] 1063 implements = [self._html_interface_name]
1064 element_type = MaybeTypedArrayElementType(self._interface) 1064 element_type = MaybeTypedArrayElementType(self._interface)
1065 if element_type: 1065 if element_type:
1066 implements.append('List<%s>' % self._shared.DartType(element_type)) 1066 implements.append('List<%s>' % self._shared.DartType(element_type))
1067 implements.append('JavaScriptIndexingBehavior')
1067 1068
1068 self._members_emitter = self._dart_code.Emit( 1069 self._members_emitter = self._dart_code.Emit(
1069 self._template, 1070 self._template,
1070 #class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 1071 #class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
1071 #$!MEMBERS 1072 #$!MEMBERS
1072 #} 1073 #}
1073 CLASSNAME=self._class_name, 1074 CLASSNAME=self._class_name,
1074 EXTENDS=extends, 1075 EXTENDS=extends,
1075 IMPLEMENTS=' implements ' + ', '.join(implements), 1076 IMPLEMENTS=' implements ' + ', '.join(implements),
1076 NATIVESPEC=' native "' + native_spec + '"') 1077 NATIVESPEC=' native "' + native_spec + '"')
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 Collect(database.GetInterface(parent.type.id), 1457 Collect(database.GetInterface(parent.type.id),
1457 seen, collected) 1458 seen, collected)
1458 1459
1459 inheritance_closure = {} 1460 inheritance_closure = {}
1460 for interface in database.GetInterfaces(): 1461 for interface in database.GetInterfaces():
1461 seen = set() 1462 seen = set()
1462 collected = [] 1463 collected = []
1463 Collect(interface, seen, collected) 1464 Collect(interface, seen, collected)
1464 inheritance_closure[interface.id] = collected 1465 inheritance_closure[interface.id] = collected
1465 return inheritance_closure 1466 return inheritance_closure
OLDNEW
« no previous file with comments | « no previous file | lib/html/frog/html_frog.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698