angular-docs-cn/packages/compiler
crisbeto 22786c8e88 fix(ivy): incorrectly generating shared pure function between null and object literal (#35481)
In #33705 we made it so that we generate pure functions for object/array literals in order to avoid having them be shared across elements/views. The problem this introduced is that further down the line the `ContantPool` uses the generated literal in order to figure out whether to share an existing factory or to create a new one. `ConstantPool` determines whether to share a factory by creating a key from the AST node and using it to look it up in the factory cache, however the key generation function didn't handle function invocations and replaced them with `null`. This means that the key for `{foo: pureFunction0(...)}` and `{foo: null}` are the same.

These changes rework the logic so that instead of generating a `null` key
for function invocations, we generate a variable called `<unknown>` which
shouldn't be able to collide with anything.

Fixes #35298.

PR Close #35481
2020-02-20 15:23:58 -08:00
..
design docs: changes AoT to AOT for consistency (#35112) 2020-02-04 10:43:33 -08:00
src fix(ivy): incorrectly generating shared pure function between null and object literal (#35481) 2020-02-20 15:23:58 -08:00
test fix(compiler): report errors for missing binding names (#34595) 2020-02-10 16:29:32 -08:00
testing build: remove unreferenced tsconfig-build.json files (#30858) 2019-06-05 09:03:36 -07:00
BUILD.bazel build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
compiler.ts
index.ts
package.json build: set up all packages to publish via wombot proxy (#33747) 2019-11-13 11:34:33 -08:00
public_api.ts