angular-cn/packages/compiler-cli/test
crisbeto fcdada53f1 fix(ivy): constant object literals shared across element and component instances (#33705)
Currently if a consumer does something like the following, the object literal will be shared across the two elements and any instances of the component template. The same applies to array literals:

```
<div [someDirective]="{}"></div>
<div [someDirective]="{}"></div>
```

These changes make it so that we generate a pure function even if an object is constant so that each instance gets its own object.

Note that the original design for this fix included moving the pure function factories into the `consts` array. In the process of doing so I realized that pure function are also used inside of directive host bindings which means that we don't have access to the `consts`.

These changes also:
* Fix an issue that meant that the `pureFunction0` instruction could only be run during creation mode.
* Make the `getConstant` utility slightly more convenient to use. This isn't strictly required for these changes to work, but I had made it as a part of a larger refactor that I ended up reverting.

PR Close #33705
2019-11-13 13:36:41 -08:00
..
compliance fix(ivy): constant object literals shared across element and component instances (#33705) 2019-11-13 13:36:41 -08:00
diagnostics feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
helpers fix(ivy): handle namespaced imports correctly (#31367) 2019-07-09 09:40:30 -07:00
metadata refactor(core): rename ngInjectableDef to ɵprov (#33151) 2019-10-16 16:36:19 -04:00
ngtsc fix(ivy): ensure module scope is rebuild on dependent change (#33522) 2019-11-12 13:56:30 -08:00
transformers feat(ivy): verify whether TypeScript version is supported (#33377) 2019-10-24 15:46:23 -07:00
BUILD.bazel fix(ivy): recompile component when template changes in ngc watch mode (#33551) 2019-11-12 13:55:09 -08:00
extract_i18n_spec.ts feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts fix(compiler): do not throw when using abstract directive from other compilation unit (#33347) 2019-10-23 11:59:24 -07:00
perform_compile_spec.ts fix(compiler): return enableIvy true when using `readConfiguration` (#32234) 2019-08-21 10:06:25 -07:00
perform_watch_spec.ts fix(ivy): recompile component when template changes in ngc watch mode (#33551) 2019-11-12 13:55:09 -08:00
test_support.ts feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
typescript_support_spec.ts feat(ivy): verify whether TypeScript version is supported (#33377) 2019-10-24 15:46:23 -07:00