angular-cn/packages/compiler-cli/test/transformers
JoostK 27d0e54705 fix(compiler-cli): prevent stack overflow in decorator transform for large number of files (#40374)
The decorator downleveling transform patches `ts.EmitResolver.isReferencedAliasDeclaration`
to prevent elision of value imports that occur only in a type-position, which would
inadvertently install the patch repeatedly for each source file in the program.
This could potentially result in a stack overflow when a very large number of files is
present in the program.

This commit fixes the issue by ensuring that the patch is only applied once.
This is also a slight performance improvement, as `isReferencedAliasDeclaration`
is no longer repeatedly calling into all prior installed patch functions.

Fixes #40276

PR Close #40374
2021-01-11 10:39:10 -08:00
..
BUILD.bazel fix(compiler-cli): downlevel angular decorators to static properties (#37382) 2020-06-10 09:24:11 -07:00
compiler_host_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
downlevel_decorators_transform_spec.ts fix(compiler-cli): prevent stack overflow in decorator transform for large number of files (#40374) 2021-01-11 10:39:10 -08:00
inline_resources_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
lower_expressions_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_reader_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
node_emitter_spec.ts refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
program_spec.ts build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
r3_metadata_transform_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
r3_transform_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00