angular-cn/packages/compiler-cli
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
..
integrationtest fix(core): support `ngInjectableDef` on types with inherited `ɵprov` (#33732) 2019-11-12 11:54:15 -08:00
ngcc fix(ngcc): support minified ES5 scenarios (#33777) 2019-11-13 11:11:48 -08:00
src fix(ivy): ensure module scope is rebuild on dependent change (#33522) 2019-11-12 13:56:30 -08:00
test fix(ivy): constant object literals shared across element and component instances (#33705) 2019-11-13 13:36:41 -08:00
BUILD.bazel build: fix build failures with worker mode cache and @types/events (#31325) 2019-07-01 14:16:43 -07:00
index.ts fix(compiler-cli): remove unused CLI private exports (#33242) 2019-11-01 17:43:47 +00:00
package.json build: set up all packages to publish via wombot proxy (#33747) 2019-11-13 11:34:33 -08:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00