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

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

Issue 300923003: Modify blink type map to finalize lazily (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerate / merge Created 6 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
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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 for path in sorted(self._paths): 1249 for path in sorted(self._paths):
1250 relpath = os.path.relpath(path, library_file_dir) 1250 relpath = os.path.relpath(path, library_file_dir)
1251 imports_emitter.Emit( 1251 imports_emitter.Emit(
1252 "part '$PATH';\n", PATH=massage_path(relpath)) 1252 "part '$PATH';\n", PATH=massage_path(relpath))
1253 1253
1254 if map_emitter: 1254 if map_emitter:
1255 items = self._typeMap.items() 1255 items = self._typeMap.items()
1256 items.sort() 1256 items.sort()
1257 for (idl_name, dart_name) in items: 1257 for (idl_name, dart_name) in items:
1258 map_emitter.Emit( 1258 map_emitter.Emit(
1259 " '$IDL_NAME': $DART_NAME,\n", 1259 " '$IDL_NAME': () => $DART_NAME,\n",
1260 IDL_NAME=idl_name, 1260 IDL_NAME=idl_name,
1261 DART_NAME=dart_name) 1261 DART_NAME=dart_name)
1262 1262
1263 1263
1264 # ------------------------------------------------------------------------------ 1264 # ------------------------------------------------------------------------------
1265 1265
1266 class DartLibraries(): 1266 class DartLibraries():
1267 def __init__(self, libraries, template_loader, library_type, output_dir): 1267 def __init__(self, libraries, template_loader, library_type, output_dir):
1268 self._libraries = {} 1268 self._libraries = {}
1269 for library_name in libraries: 1269 for library_name in libraries:
1270 self._libraries[library_name] = DartLibrary( 1270 self._libraries[library_name] = DartLibrary(
1271 library_name, template_loader, library_type, output_dir) 1271 library_name, template_loader, library_type, output_dir)
1272 1272
1273 def AddFile(self, basename, library_name, path): 1273 def AddFile(self, basename, library_name, path):
1274 self._libraries[library_name].AddFile(path) 1274 self._libraries[library_name].AddFile(path)
1275 1275
1276 def AddTypeEntry(self, library_name, idl_name, dart_name): 1276 def AddTypeEntry(self, library_name, idl_name, dart_name):
1277 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) 1277 self._libraries[library_name].AddTypeEntry(idl_name, dart_name)
1278 1278
1279 def Emit(self, emitter, auxiliary_dir): 1279 def Emit(self, emitter, auxiliary_dir):
1280 for lib in self._libraries.values(): 1280 for lib in self._libraries.values():
1281 lib.Emit(emitter, auxiliary_dir) 1281 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | tools/dom/templates/html/dartium/_blink_dartium.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698