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

Unified Diff: client/dom/scripts/systemfrog.py

Issue 9432024: Do not rename idl types to dart types at top level - this info is needed for native bindings genera… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update html frog system. Created 8 years, 10 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 | « client/dom/scripts/generator.py ('k') | client/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/systemfrog.py
diff --git a/client/dom/scripts/systemfrog.py b/client/dom/scripts/systemfrog.py
index f148bbfb0c2c6ef72802f3daff42071f6f1d735b..1caf85001ee5757973e80e6e4684b985fc7b7f16 100644
--- a/client/dom/scripts/systemfrog.py
+++ b/client/dom/scripts/systemfrog.py
@@ -104,7 +104,7 @@ class FrogInterfaceGenerator(object):
implements = [interface_name]
element_type = MaybeTypedArrayElementType(self._interface)
if element_type:
- implements.append('List<' + element_type + '>')
+ implements.append('List<%s>' % DartType(element_type))
self._members_emitter = self._dart_code.Emit(
self._template,
@@ -164,10 +164,10 @@ class FrogInterfaceGenerator(object):
return type_name
def _NarrowInputType(self, type_name):
- return self._NarrowToImplementationType(type_name)
+ return self._NarrowToImplementationType(DartType(type_name))
def _NarrowOutputType(self, type_name):
- return self._NarrowToImplementationType(type_name)
+ return self._NarrowToImplementationType(DartType(type_name))
def AddConstant(self, constant):
# Since we are currently generating native classes without interfaces,
@@ -175,7 +175,7 @@ class FrogInterfaceGenerator(object):
# if we revert back to generating interfaces.
self._members_emitter.Emit('\n static final $TYPE $NAME = $VALUE;\n',
NAME=constant.id,
- TYPE=constant.type.id,
+ TYPE=DartType(constant.type.id),
VALUE=constant.value)
pass
@@ -190,7 +190,7 @@ class FrogInterfaceGenerator(object):
(super_setter, super_setter_interface) = self._FindShadowedAttribute(setter)
if super_getter or super_setter:
if getter and not setter and super_getter and not super_setter:
- if getter.type.id == super_getter.type.id:
+ if DartType(getter.type.id) == DartType(super_getter.type.id):
# Compatible getter, use the superclass property. This works because
# JavaScript will do its own dynamic dispatch.
self._members_emitter.Emit(
@@ -311,7 +311,7 @@ class FrogInterfaceGenerator(object):
# TODO(sra): Use separate mixins for typed array implementations of List<T>.
template_file = 'immutable_list_mixin.darttemplate'
template = self._system._templates.Load(template_file)
- self._members_emitter.Emit(template, E=element_type)
+ self._members_emitter.Emit(template, E=DartType(element_type))
def AddTypedArrayConstructors(self, element_type):
@@ -325,7 +325,7 @@ class FrogInterfaceGenerator(object):
'\n'
' static _construct_$CTOR(arg) native \'return new $CTOR(arg);\';\n',
CTOR=self._interface.id,
- TYPE=element_type)
+ TYPE=DartType(element_type))
def AddOperation(self, info):
« no previous file with comments | « client/dom/scripts/generator.py ('k') | client/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698