Commit Graph

54 Commits

Author SHA1 Message Date
Victor Berchet 7e73287676 Revert "feat(ivy): added new namespace and element instructions to JIT environment (#23899)"
This reverts commit acf270d724.
2018-06-06 13:38:00 -07:00
Ben Lesh acf270d724 feat(ivy): added new namespace and element instructions to JIT environment (#23899)
PR Close #23899
2018-06-06 10:22:28 -07:00
Kara Erickson 57eacf4b5a refactor(ivy): move LView.template and component templates to TView (#24300)
PR Close #24300
2018-06-05 15:13:36 -07:00
Kara Erickson 5794506c64 refactor(ivy): move id to TView (#24264)
PR Close #24264
2018-06-03 20:46:12 -07:00
Pawel Kozlowski 90bf5d8961 feat(ivy): separate attributes for directive matching purposes (#23991)
In ngIvy directives matching (determining which directives are active based
on a CSS seletor) happens at runtime. This means that runtime needs to have
enough context to match directives. This PR takes care of cases where a directive's
selector should match bindings (ex. [foo]="exp") and event handlers (ex. (out)="do()").
In the mentioned cases we need to have binding / output "attributes" for directive's
CSS selector matching purposes. At the same time those are not regular attributes and
as such should not  be reflected in the DOM.

Closes #23706

PR Close #23991
2018-05-30 09:56:34 -07:00
Kara Erickson e53179ef8c refactor(ivy): move parent from LNode to TNode (#24189)
PR Close #24189
2018-05-30 01:42:20 -04:00
Kara Erickson 68bf8c36c6 refactor(ivy): move type from LNode to TNode (#24113)
PR Close #24113
2018-05-25 13:40:59 -04:00
Kara Erickson 6e7d071c6b fix(ivy): move next property to TNode (#23869)
PR Close #23869
2018-05-21 16:09:12 -04:00
Kara Erickson db77d8dc92 feat(ivy): support injection flags at runtime (#23518)
PR Close #23518
2018-04-25 13:26:58 -07:00
Misko Hevery da31db757b feat(ivy): support injection even if no injector present (#23345)
- Remove default injection value from `inject` / `directiveInject` since
  it is not possible to set using annotations.
- Module `Injector` is stored on `LView` instead of `LInjector` data
  structure because it can change only at `LView` level. (More efficient)
- Add `ngInjectableDef` to `IterableDiffers` so that existing tests can
  pass as well as enable `IterableDiffers` to be injectable without
  `Injector`

PR Close #23345
2018-04-13 14:29:52 -07:00
Misko Hevery 6f213a74f2 feat(ivy): support generation of flags for directive injection (#23345)
This change changes:
- compiler uses `directiveInject` instead of `inject` for `Directive`s
- unifies the flags in `di` as well as `render3`
- changes the signature of `directiveInject` to match `inject` In prep for #23330
- compiler now generates flags for injection.

Compiler portion of #23342
Prep for #23330

PR Close #23345
2018-04-13 14:29:52 -07:00
Victor Berchet d5e7f60f04 refactor(ivy): misc (#23351)
PR Close #23351
2018-04-13 13:19:17 -07:00
Kara Erickson de3ca56769 fix(ivy): support separate creation mode and update mode execution in runtime (#23292)
PR Close #23292
2018-04-11 15:30:39 -07:00
Kara Erickson 628303d2cb fix(ivy): instantiate dirs in correct order (#23178)
PR Close #23178
2018-04-05 14:50:00 -07:00
Miško Hevery 60065935be refactor(ivy): align compiler with runtime (#22921)
Remove `containerRefreshStart` and `containerRefreshEnd` instruction
from the output.

Generate directives as a list in `componentDef` rather than inline into
instructions. This is consistent in making selector resolution runtime
so that translation of templates can follow locality.

PR Close #22921
2018-04-02 15:49:48 -07:00
Kara Erickson 6e5fb99304 refactor(ivy): flatten css selectors (#23074)
PR Close #23074
2018-03-30 15:27:50 -07:00
Kara Erickson e2e80ec61c refactor(ivy): remove pipe references from the template (#23032)
PR Close #23032
2018-03-28 09:17:27 -07:00
Kara Erickson 5a86f7144f fix(ivy): store local variables in data instead of calling loadDirective (#23029)
PR Close #23029
2018-03-28 09:17:05 -07:00
Kara Erickson 910a16a1ff refactor(ivy): remove directive references from template (#22986)
PR Close #22986
2018-03-26 22:33:23 -04:00
Kara Erickson 49396ca2ae refactor(ivy): move directives into separate array (#22918)
PR Close #22918
2018-03-22 21:23:02 -04:00
Kara Erickson e44f69c387 refactor(ivy): move dir flags to tnode (#22901)
PR Close #22901
2018-03-22 19:19:40 -04:00
Kara Erickson 4f21d373b7 refactor(ivy): move hostBindings calls out of template (#22833)
PR Close #22833
2018-03-18 11:41:39 -07:00
Kara Erickson 4e6ac185e5 refactor(ivy): double size of DI bloom filter (#22775)
PR Close #22775
2018-03-15 14:49:39 -07:00
Kara Erickson b1365d1fa8 refactor(ivy): remove directiveRefresh instruction (#22745)
PR Close #22745
2018-03-13 23:29:21 -07:00
Kara Erickson bd9d4df735 refactor(ivy): remove inputsPropertyName (#22716)
Closes #22591

PR Close #22716
2018-03-13 13:26:15 -07:00
Misko Hevery 2fee5cc095 test(ivy): add injection canonical specs (#22595)
PR Close #22595
2018-03-08 12:09:39 -08:00
Misko Hevery 51ca643c27 test(ivy): add injectAttribute spec (#22510)
PR Close #22510
2018-03-05 10:10:32 -08:00
Kara Erickson 9eaf1bbe67 feat(ivy): support injecting ChangeDetectorRef (#22469)
PR Close #22469
2018-02-28 13:35:48 -08:00
Kara Erickson 8c358844dd feat(ivy): support OnPush change detection (#22417)
PR Close #22417
2018-02-28 10:42:11 -08:00
Victor Berchet 5a14e2238f refactor(ivy): split the `memory` instruction into `store` and `load` (#22268)
PR Close #22268
2018-02-18 18:48:41 -08:00
Misko Hevery ac2b04a5ab test(ivy): Add small_app spec for sprint #3 (#22018)
PR Close #22018
2018-02-18 13:18:54 -08:00
Victor Berchet 5dd2b5135d refactor(ivy): rename `bindX()` functions to `interpolationX()` (#22229)
rationale: remove the confusion with `bind()` and `bind0()`

PR Close #22229
2018-02-15 14:20:53 -08:00
Victor Berchet 10a014d89e refactor(ivy): prefix viewStart & viewEnd with embedded (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
Victor Berchet 8feb8e5408 refactor(ivy): use long instruction format in tests (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
Kara Erickson 33b338120c refactor(ivy): move onDestroys out of cleanup (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
Kara Erickson 9c99e6a838 refactor(ivy): move init hooks into TView (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Kara Erickson 98174758ad refactor(ivy): add type and hooks to directive def (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
Alex Rickabaugh 0ad02de47e feat(ivy): support for the ngForOf directive, with tests (#21430)
Implement NgOnChangesFeature, ViewContainerRef, TemplateRef,
and the renderEmbeddedTemplate instruction, and wire together the
pieces required for the ngForOf directive to work.

PR Close #21430
2018-01-23 12:54:39 -08:00
Alex Rickabaugh 6472661ae8 refactor(ivy): avoid circular dep with query/di/instructions (#21430)
To prepare for pending ngForOf work, the dep from instructions -> query
should be broken. This will enable a dep from di -> instructions while
avoiding a di -> instructions -> query -> di cycle.

Analyzing this cycle also uncovered another problem: the implementation
of query() breaks tree-shaking through a hard dependency on DI concepts
of TemplateRef, ElementRef, ViewContainerRef. This is fundamentally due
to how query() can query for those values without any configuration.

Instead, this fix introduces the concept by employing the strategy
pattern, and redefining QueryReadType to pass a function which will
return one of the above values. This strategy is then used for 'read'
instead of an enum in cases where special values should be read from
the DI system.

PR Close #21430
2018-01-23 12:54:39 -08:00
Kara Erickson e18f1de003 refactor(ivy): remove unnecessary D instruction (#21484)
PR Close #21484
2018-01-19 15:23:17 -08:00
Kara Erickson efe545a878 refactor(ivy): add TView and TContainer (#21463)
PR Close #21463
2018-01-16 10:51:55 -08:00
Miško Hevery 5eaaac35a8 refactor(ivy): remove `type` from `DirectiveDef` (#21374)
This change makes the code cleaner for the user. It does mean
a little bit more work for us since we have to patch the `type` back
into the `DirectiveDef`. However since the patching happens only once
on startup it should not be significant.

PR Close #21374
2018-01-11 07:02:18 -08:00
Miško Hevery 16232f000f refactor(ivy): merged containerStart/containerEnd (#21374)
This separation is no longer needed since directives are now passed into the `container` as an array rather than as child functions of the `containerStart`

PR Close #21374
2018-01-11 07:02:18 -08:00
Misko Hevery a6d41c47a9 refactor(ivy): move directive into elementStart (#21374)
We used to have a separate `directive` instruction for instantiating
directives. However, such an instruction requires that directives
are created in the correct order, which would require that template
compiler would have knowledge of all dependent directives. This
would break template compilation locality principle.

This change only changes the APIs to expected form but does
not change the semantics. The semantics will need to be corrected
in subsequent commits. The semantic change needed is to
resolve the directive instantiation error at runtime based on
injection dependencies.

PR Close #21374
2018-01-11 07:02:17 -08:00
Kara Erickson 6be9c0466c refactor(core): split up interface files in render3 (#21433)
PR Close #21433
2018-01-10 16:13:44 -08:00
Kara Erickson fc3e7e0381 refactor(core): create consistent naming scheme across classes (#21403)
PR Close #21403
2018-01-10 11:15:48 -08:00
Miško Hevery 5a7bf36723 build: fix circular dep between interface and l_node by merging (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Pawel Kozlowski bbdea96a66 refactor: remove import circular dependencies (#20855)
This PR fixes a circular dependency among those files in Renderer3:
`query` -> `di` -> `instructions` -> `query` -> ...

Looking at the above dependencies the `di` -> `instructions` import is
a problematic one. Previously `di` had an import from `instructions`
since we can known about "current node" only in `instructions`
(and we need "current node" to create node injector instances).

This commit refactors the code in the way that functions in the
`di` file don't depend on any info stored module-global variables
in `instructions`.

PR Close #20855
2017-12-21 21:40:58 -08:00
Miško Hevery 1f5049f30c style: fix formatting errors (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00
Kara Erickson 19eeba2281 refactor(core): rename instructions for consistency (#20855)
PR Close #20855
2017-12-21 21:40:58 -08:00