angular-cn/packages/compiler-cli/src
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
..
diagnostics refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
metadata fix(compiler-cli): allow declaration-only template type check members (#34296) 2019-12-10 16:31:23 -08:00
ngtsc perf(ivy): eagerly parse the template twice during analysis (#34334) 2019-12-12 14:13:16 -08:00
transformers refactor(compiler): i18n - render legacy i18n message ids (#34135) 2019-12-03 10:15:53 -08:00
extract_i18n.ts refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
language_services.ts refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
main.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
perform_compile.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
perform_watch.ts fix(ivy): recompile component when template changes in ngc watch mode (#33551) 2019-11-12 13:55:09 -08:00
tooling.ts fix(ivy): retain JIT metadata unless JIT mode is explicitly disabled (#33671) 2019-11-20 12:55:43 -08:00
typescript_support.ts feat(ivy): verify whether TypeScript version is supported (#33377) 2019-10-24 15:46:23 -07:00
version.ts style: remove empty comments (#23404) 2018-05-10 15:48:13 -07:00