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

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

Issue 9959048: Remove unused typed array factory constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/dom/scripts/generator.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemfrog.py
diff --git a/lib/dom/scripts/systemfrog.py b/lib/dom/scripts/systemfrog.py
index 0113a340b31d97f5c35573ab28606cec53f13a43..30d5efa4c803e2e9c4c0f10e9684e1f5783cf2f6 100644
--- a/lib/dom/scripts/systemfrog.py
+++ b/lib/dom/scripts/systemfrog.py
@@ -128,10 +128,6 @@ class FrogInterfaceGenerator(object):
IMPLEMENTS=' implements ' + ', '.join(implements),
NATIVESPEC=' native "' + native_spec + '"')
- element_type = MaybeTypedArrayElementType(interface)
- if element_type:
- self.AddTypedArrayConstructors(element_type)
-
# Emit a factory provider class for the constructor.
constructor_info = AnalyzeConstructor(interface)
if constructor_info:
@@ -345,20 +341,6 @@ class FrogInterfaceGenerator(object):
self._members_emitter.Emit(template, E=DartType(element_type))
- def AddTypedArrayConstructors(self, element_type):
- self._members_emitter.Emit(
- '\n'
- ' factory $CTOR(int length) => _construct_$CTOR(length);\n'
- '\n'
- ' factory $CTOR.fromList(List<$TYPE> list) => _construct_$CTOR(list);\n'
- '\n'
- ' factory $CTOR.fromBuffer(ArrayBuffer buffer) => _construct_$CTOR(buffer);\n'
- '\n'
- ' static _construct_$CTOR(arg) native \'return new $CTOR(arg);\';\n',
- CTOR=self._interface.id,
- TYPE=DartType(element_type))
-
-
def AddOperation(self, info):
"""
Arguments:
@@ -368,10 +350,14 @@ class FrogInterfaceGenerator(object):
params = info.ParametersImplementationDeclaration(
lambda type_name: self._NarrowInputType(type_name))
+ native_string = ''
+ if info.declared_name != info.name:
+ native_string = " '%s'" % info.declared_name
+
native_body = dom_frog_native_bodies.get(
self._interface.id + '.' + info.name, '')
if native_body:
- native_body = " '''" + native_body + "'''"
+ native_string = " '''" + native_body + "'''"
self._members_emitter.Emit(
'\n'
@@ -379,4 +365,4 @@ class FrogInterfaceGenerator(object):
TYPE=self._NarrowOutputType(info.type_name),
NAME=info.name,
PARAMS=params,
- NATIVESTRING=native_body)
+ NATIVESTRING=native_string)
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698