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

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

Issue 667983002: Arity indexing in dart:blink entry points (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('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 import emitter 9 import emitter
10 import logging 10 import logging
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 self._Metadata(info.type_name, info.declared_name, return_type), 1078 self._Metadata(info.type_name, info.declared_name, return_type),
1079 'static ' if info.IsStatic() else '', 1079 'static ' if info.IsStatic() else '',
1080 return_type, 1080 return_type,
1081 html_name, 1081 html_name,
1082 info.ParametersAsDeclaration(InputType)) 1082 info.ParametersAsDeclaration(InputType))
1083 self._GenerateDispatcherBody( 1083 self._GenerateDispatcherBody(
1084 info, 1084 info,
1085 operations, 1085 operations,
1086 declaration, 1086 declaration,
1087 GenerateCall, 1087 GenerateCall,
1088 lambda _, argument: IsOptional(argument), 1088 IsOptional,
1089 can_omit_type_check=lambda type, pos: type == parameter_types[pos]) 1089 can_omit_type_check=lambda type, pos: type == parameter_types[pos])
1090 1090
1091 def _AddInterfaceOperation(self, info, html_name): 1091 def _AddInterfaceOperation(self, info, html_name):
1092 self._members_emitter.Emit( 1092 self._members_emitter.Emit(
1093 '\n' 1093 '\n'
1094 ' $TYPE $NAME($PARAMS);\n', 1094 ' $TYPE $NAME($PARAMS);\n',
1095 TYPE=self.SecureOutputType(info.type_name, False, True), 1095 TYPE=self.SecureOutputType(info.type_name, False, True),
1096 NAME=html_name, 1096 NAME=html_name,
1097 PARAMS=info.ParametersAsDeclaration(self._NarrowInputType)) 1097 PARAMS=info.ParametersAsDeclaration(self._NarrowInputType))
1098 1098
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 1269
1270 def AddFile(self, basename, library_name, path): 1270 def AddFile(self, basename, library_name, path):
1271 self._libraries[library_name].AddFile(path) 1271 self._libraries[library_name].AddFile(path)
1272 1272
1273 def AddTypeEntry(self, library_name, idl_name, dart_name): 1273 def AddTypeEntry(self, library_name, idl_name, dart_name):
1274 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) 1274 self._libraries[library_name].AddTypeEntry(idl_name, dart_name)
1275 1275
1276 def Emit(self, emitter, auxiliary_dir): 1276 def Emit(self, emitter, auxiliary_dir):
1277 for lib in self._libraries.values(): 1277 for lib in self._libraries.values():
1278 lib.Emit(emitter, auxiliary_dir) 1278 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698