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

Unified Diff: lib/html/scripts/systemhtml.py

Issue 11030027: Remove global DartType function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/html/scripts/generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/systemhtml.py
diff --git a/lib/html/scripts/systemhtml.py b/lib/html/scripts/systemhtml.py
index 0fa664ca5c42b9708c1e195706849407352bfc5a..3e7f19d1f1cc18088edc10e1914afd5fa3cf65fd 100644
--- a/lib/html/scripts/systemhtml.py
+++ b/lib/html/scripts/systemhtml.py
@@ -164,7 +164,8 @@ def HtmlElementConstructorInfos(typename):
infos = [infos]
return infos
-def EmitHtmlElementFactoryConstructors(emitter, infos, typename, class_name):
+def EmitHtmlElementFactoryConstructors(emitter, infos, typename, class_name,
+ dart_type):
for info in infos:
constructor_info = info.ConstructorInfo(typename)
@@ -176,10 +177,10 @@ def EmitHtmlElementFactoryConstructors(emitter, infos, typename, class_name):
' return _e;\n'
' }\n',
RETURN_TYPE=constructor_info.type_name,
- CONSTRUCTOR=constructor_info.ConstructorFactoryName(DartType),
+ CONSTRUCTOR=constructor_info.ConstructorFactoryName(dart_type),
CLASS=class_name,
TAG=info.tag,
- PARAMS=constructor_info.ParametersInterfaceDeclaration(DartType))
+ PARAMS=constructor_info.ParametersInterfaceDeclaration(dart_type))
for param in constructor_info.param_infos:
inits.Emit(' if ($E != null) _e.$E = $E;\n', E=param.name)
@@ -215,8 +216,8 @@ class HtmlDartInterfaceGenerator(object):
code.Emit(self._template_loader.Load('callback.darttemplate'))
code.Emit('typedef $TYPE $NAME($PARAMS);\n',
NAME=self._interface.id,
- TYPE=DartType(info.type_name),
- PARAMS=info.ParametersImplementationDeclaration(DartType))
+ TYPE=self._DartType(info.type_name),
+ PARAMS=info.ParametersImplementationDeclaration(self._DartType))
self._backend.GenerateCallback(info)
def GenerateInterface(self):
@@ -281,7 +282,8 @@ class HtmlDartInterfaceGenerator(object):
self._library_emitter.FileEmitter('_Elements', template),
infos,
self._html_interface_name,
- self._backend.ImplementationClassName())
+ self._backend.ImplementationClassName(),
+ self._DartType)
for info in infos:
constructors.append(info.ConstructorInfo(typename))
@@ -918,7 +920,7 @@ class Dart2JSBackend(object):
verified_type = temp_type # verified by assignment in checked mode.
else:
arguments.append(parameter_names[position])
- param_type = self._NarrowInputType(DartType(arg.type.id))
+ param_type = self._NarrowInputType(arg.type.id)
# Verified by argument checking on entry to the dispatcher.
verified_type = InputType(info.param_infos[position].dart_type)
« no previous file with comments | « lib/html/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698