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

Side by Side Diff: lib/html/scripts/systemdart2js.py

Issue 10981005: Revert r12808. (Closed) Base URL: http://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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/html/scripts/htmlrenamer.py ('k') | lib/html/scripts/systemhtml.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 systems to generate 6 """This module provides shared functionality for the systems to generate
7 dart2js binding from the IDL database.""" 7 dart2js binding from the IDL database."""
8 8
9 import os 9 import os
10 from generator import * 10 from generator import *
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 constructor_info = AnalyzeConstructor(interface) 127 constructor_info = AnalyzeConstructor(interface)
128 if constructor_info: 128 if constructor_info:
129 self._EmitFactoryProvider(interface_name, constructor_info) 129 self._EmitFactoryProvider(interface_name, constructor_info)
130 130
131 131
132 def FinishInterface(self): 132 def FinishInterface(self):
133 """.""" 133 """."""
134 pass 134 pass
135 135
136 def _ImplClassName(self, type_name): 136 def _ImplClassName(self, type_name):
137 name = type_name
138 if type_name in nativified_classes:
139 name = nativified_classes[type_name]
140 return '_' + type_name + 'Js' 137 return '_' + type_name + 'Js'
141 138
142 def _EmitFactoryProvider(self, interface_name, constructor_info): 139 def _EmitFactoryProvider(self, interface_name, constructor_info):
143 template_file = 'factoryprovider_%s.darttemplate' % interface_name 140 template_file = 'factoryprovider_%s.darttemplate' % interface_name
144 template = self._system._templates.TryLoad(template_file) 141 template = self._system._templates.TryLoad(template_file)
145 if not template: 142 if not template:
146 template = self._system._templates.Load('factoryprovider.darttemplate') 143 template = self._system._templates.Load('factoryprovider.darttemplate')
147 144
148 factory_provider = '_' + interface_name + 'FactoryProvider' 145 factory_provider = '_' + interface_name + 'FactoryProvider'
149 emitter = self._system._ImplFileEmitter(factory_provider) 146 emitter = self._system._ImplFileEmitter(factory_provider)
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 if info.declared_name != info.name: 377 if info.declared_name != info.name:
381 native_string = " '%s'" % info.declared_name 378 native_string = " '%s'" % info.declared_name
382 379
383 self._members_emitter.Emit( 380 self._members_emitter.Emit(
384 '\n' 381 '\n'
385 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n', 382 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n',
386 TYPE=self._NarrowOutputType(info.type_name), 383 TYPE=self._NarrowOutputType(info.type_name),
387 NAME=info.name, 384 NAME=info.name,
388 PARAMS=params, 385 PARAMS=params,
389 NATIVESTRING=native_string) 386 NATIVESTRING=native_string)
OLDNEW
« no previous file with comments | « lib/html/scripts/htmlrenamer.py ('k') | lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698