angular-cn/packages/compiler-cli/src/ngtsc
Alex Rickabaugh af95dddd7e perf(ivy): eagerly parse the template twice during analysis (#34334)
A quirk of the Angular template parser is that when parsing templates in the
"default" mode, with options specified by the user, the source mapping
information in the template AST may be inaccurate. As a result, the compiler
parses the template twice: once for "emit" and once to produce an AST with
accurate sourcemaps for diagnostic production.

Previously, only the first parse was performed during analysis. The second
parse occurred during the template type-checking phase, just in time to
produce the template type-checking file.

However, with the reuse of analysis results during incremental builds, it
makes more sense to do the diagnostic parse eagerly during analysis so that
the work isn't unnecessarily repeated in subsequent builds. This commit
refactors the `ComponentDecoratorHandler` to do both parses eagerly, which
actually cleans up some complexity around template parsing as well.

PR Close #34334
2019-12-12 14:13:16 -08:00
..
annotations perf(ivy): eagerly parse the template twice during analysis (#34334) 2019-12-12 14:13:16 -08:00
cycles perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
diagnostics fix(ivy): generate a better error for template var writes (#34339) 2019-12-12 13:13:32 -08:00
entry_point refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
file_system test(ivy): support chdir() on the compiler's filesystem abstraction (#33828) 2019-11-19 12:41:24 -08:00
imports perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
incremental perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
indexer fix(ivy): support abstract directives in template type checking (#33131) 2019-10-24 12:44:30 -07:00
metadata fix(ivy): inherit static coercion members from base classes (#34296) 2019-12-10 16:31:23 -08:00
modulewithproviders refactor(ivy): include generic type for `ModuleWithProviders` in .d.ts files (#34235) 2019-12-10 16:34:47 -08:00
partial_evaluator perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
perf refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
reflection fix(ngcc): handle new `__spreadArrays` tslib helper (#33617) 2019-11-06 19:43:07 +00:00
routing perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
scope perf(ivy): cache export scopes extracted from declaration files (#34332) 2019-12-12 14:06:36 -08:00
shims refactor(ivy): move analysis side effects into a register phase (#34288) 2019-12-12 13:11:45 -08:00
switch build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
testing refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
transform perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
translator fix(ivy): properly parenthesize ternary expressions when emitted (#34221) 2019-12-06 13:01:48 -08:00
typecheck perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
util perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
program.ts perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
resource_loader.ts fix(ivy): handle rooted resource paths correctly (#31511) 2019-07-11 11:42:33 -04:00
synthetic_files_compiler_host.ts feat: add support for TypeScript 3.3 (and drop older versions) (#29004) 2019-03-13 10:38:37 -07:00
tsc_plugin.ts refactor(ivy): use `ClassDeclaration` in more `ReflectionHost` methods (#29209) 2019-03-21 22:20:23 +00:00