refactor(compiler): make all commands const

Closes #5135
This commit is contained in:
Tobias Bosch
2015-11-02 08:39:14 -08:00
parent fb8b8157ff
commit e667ad3e6b
35 changed files with 1002 additions and 868 deletions

View File

@ -35,6 +35,5 @@ TemplateCompiler createTemplateCompiler(AssetReader reader,
templateParser,
new StyleCompiler(_xhr, _urlResolver),
new CommandCompiler(),
cdCompiler,
null /* appId */);
cdCompiler);
}

View File

@ -176,12 +176,9 @@ class _CodegenState {
${_genDirectiveIndices()};
static ${_genPrefix}ProtoChangeDetector
$PROTO_CHANGE_DETECTOR_FACTORY_METHOD(
${_genPrefix}ChangeDetectorDefinition def) {
return new ${_genPrefix}PregenProtoChangeDetector(
(a) => new $_changeDetectorTypeName(a),
def);
static ${_genPrefix}ChangeDetector
$CHANGE_DETECTOR_FACTORY_METHOD(a) {
return new $_changeDetectorTypeName(a);
}
}
''');
@ -575,7 +572,7 @@ class _CodegenState {
}
}
const PROTO_CHANGE_DETECTOR_FACTORY_METHOD = 'newProtoChangeDetector';
const CHANGE_DETECTOR_FACTORY_METHOD = 'newChangeDetector';
const _BASE_CLASS = 'AbstractChangeDetector';
const _CHANGES_LOCAL = 'changes';