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

Unified Diff: tools/dom/scripts/htmldartgenerator.py

Issue 14863011: Deleted code that wasn't actually doing anything. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/htmldartgenerator.py
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index d493060aa083aefa7e21a411b31096f3bcbb5437..a12f3f3fbcadd5b09cafff71ea85c3dd2104146d 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -384,46 +384,23 @@ class HtmlDartGenerator(object):
CTOR_FACTORY_NAME=factory_constructor_name,
FACTORY_PARAMS=factory_parameters)
else:
- if has_factory_provider:
- dispatcher_emitter = self._members_emitter.Emit(
- '\n $(METADATA)'
- 'factory $CTOR($PARAMS) {\n'
- '$!DISPATCHER'
- ' return $FACTORY._create($FACTORY_PARAMS);\n'
- ' }\n',
- CTOR=constructor_info._ConstructorFullName(self._DartType),
- PARAMS=constructor_info.ParametersDeclaration(self._DartType),
- FACTORY=factory_name,
- METADATA=metadata,
- FACTORY_PARAMS=constructor_info.ParametersAsArgumentList())
-
- for index, param_info in enumerate(constructor_info.param_infos):
- if param_info.is_optional:
- dispatcher_emitter.Emit(
- ' if ($OPT_PARAM_NAME == null) {\n'
- ' return $FACTORY._create($FACTORY_PARAMS);\n'
- ' }\n',
- OPT_PARAM_NAME=param_info.name,
- FACTORY=factory_name,
- FACTORY_PARAMS=constructor_info.ParametersAsArgumentList(index))
- else:
- inits = self._members_emitter.Emit(
- '\n $(METADATA)'
- 'factory $CONSTRUCTOR($PARAMS) {\n'
- ' var e = $FACTORY.$CTOR_FACTORY_NAME($FACTORY_PARAMS);\n'
- '$!INITS'
- ' return e;\n'
- ' }\n',
- CONSTRUCTOR=constructor_info._ConstructorFullName(self._DartType),
- METADATA=metadata,
- FACTORY=factory_name,
- CTOR_FACTORY_NAME=factory_constructor_name,
- PARAMS=constructor_info.ParametersDeclaration(self._DartType),
- FACTORY_PARAMS=factory_parameters)
-
- for index, param_info in enumerate(constructor_info.param_infos):
- if param_info.is_optional:
- inits.Emit(' if ($E != null) e.$E = $E;\n', E=param_info.name)
+ inits = self._members_emitter.Emit(
+ '\n $(METADATA)'
+ 'factory $CONSTRUCTOR($PARAMS) {\n'
+ ' var e = $FACTORY.$CTOR_FACTORY_NAME($FACTORY_PARAMS);\n'
+ '$!INITS'
+ ' return e;\n'
+ ' }\n',
+ CONSTRUCTOR=constructor_info._ConstructorFullName(self._DartType),
+ METADATA=metadata,
+ FACTORY=factory_name,
+ CTOR_FACTORY_NAME=factory_constructor_name,
+ PARAMS=constructor_info.ParametersDeclaration(self._DartType),
+ FACTORY_PARAMS=factory_parameters)
+
+ for index, param_info in enumerate(constructor_info.param_infos):
+ if param_info.is_optional:
+ inits.Emit(' if ($E != null) e.$E = $E;\n', E=param_info.name)
else:
def GenerateCall(
stmts_emitter, call_emitter,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698