angular-cn/packages/core/src
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
..
change_detection refactor(core): rename ngInjectableDef to ɵprov (#33151) 2019-10-16 16:36:19 -04:00
compiler fix(ivy): ComponentFactory.create should clear host element content (#33487) 2019-11-12 21:34:06 -08:00
debug refactor(ivy): rename `getComponentViewByIndex` to `getComponentLViewByIndex` (#33074) 2019-10-22 12:00:20 -07:00
di fix(core): support `ngInjectableDef` on types with inherited `ɵprov` (#33732) 2019-11-12 11:54:15 -08:00
i18n feat(common): support loading locales from a global (#33523) 2019-11-05 17:27:00 +00:00
interface feat(core): Add "AbstractType<T>" interface (#29295) 2019-04-02 16:07:22 -07:00
linker revert: fix(ivy): R3TestBed should clean up registered modules after each test (#32872) (#33663) 2019-11-12 09:53:16 -08:00
metadata docs: add ModuleWithProviders deprecation (#33266) 2019-10-22 14:35:27 -07:00
profile feat(core): deprecate integration with the Web Tracing Framework (WTF) (#30642) 2019-05-23 15:09:48 -07:00
reflection perf: don't create holey arrays (#32155) 2019-08-21 08:27:43 -07:00
render refactor(core): remove deprecated Renderer (#33019) 2019-10-08 09:23:00 -07:00
render3 fix(ivy): constant object literals shared across element and component instances (#33705) 2019-11-13 13:36:41 -08:00
sanitization fix(ivy): ensure that the correct `document` is available (#33712) 2019-11-11 14:01:04 -08:00
testability build: update zone.js to 0.9.0 (#28219) 2019-03-26 12:50:38 -07:00
util test(ivy): Have more descriptive names for `LView` (#33449) 2019-11-07 15:33:50 +00:00
view refactor(core): remove deprecated Renderer (#33019) 2019-10-08 09:23:00 -07:00
zone feat: add a flag in bootstrap to enable coalesce event change detection to improve performance (#30533) 2019-11-05 18:58:25 +00:00
application_init.ts docs: update core to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
application_module.ts feat(ivy): allow the locale to be set via a global property (#33314) 2019-10-24 10:16:25 -07:00
application_ref.ts feat: add a flag in bootstrap to enable coalesce event change detection to improve performance (#30533) 2019-11-05 18:58:25 +00:00
application_tokens.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
change_detection.ts refactor(core): remove deprecated `TrackByFn` (#18757) 2017-08-18 13:23:46 -05:00
codegen_private_exports.ts fix(ivy): align NgModule registration timing with ViewEngine (#30244) 2019-05-13 11:13:25 -07:00
console.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
core.externs.js fix(ivy): add missing closure extern for \$localize (#32460) 2019-09-03 11:55:16 -07:00
core.ts fix(core): add CLI instructions when localize polyfill is missing (#33199) 2019-10-17 19:45:27 -04:00
core_private_export.ts feat(common): support loading locales from a global (#33523) 2019-11-05 17:27:00 +00:00
core_render3_private_export.ts fix(ivy): ensure that the correct `document` is available (#33712) 2019-11-11 14:01:04 -08:00
di.ts refactor(ivy): create Injector interface; remove dependency on Ivy (#28066) 2019-01-11 16:24:03 -08:00
error_handler.ts refactor(ivy): refactor more files in DI to prepare it for bazel packages (#28098) 2019-01-14 09:55:30 -08:00
errors.ts build: extract interface and util sub compilation from core (#28028) 2019-01-10 16:31:44 -08:00
event_emitter.ts docs(core): mark `EventEmitter#__isAsync` as internal to hide from API docs (#31378) 2019-10-03 10:24:34 -07:00
ivy_switch.ts refactor(ivy): obviate the Bazel component of the ivy_switch (#26550) 2018-10-19 09:23:05 -07:00
linker.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
metadata.ts docs: fix and add decorator api doc (#28986) 2019-03-04 11:47:30 -08:00
platform_core_providers.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
r3_symbols.ts refactor(ivy): generate ngFactoryDef for injectables (#32433) 2019-10-02 13:04:26 -07:00
render.ts refactor(core): remove deprecated Renderer (#33019) 2019-10-08 09:23:00 -07:00
version.ts docs: update core to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
zone.ts feat(router): warn if navigation triggered outside Angular zone (#24959) 2018-09-05 09:35:14 -07:00