Commit Graph

15 Commits

Author SHA1 Message Date
Alex Rickabaugh b0eca85e51 refactor(compiler): compile{Component,Directive} take only local information (#23545)
Previously, the compileComponent() and compileDirective() APIs still required
the output of global analysis, even though they only read local information
from that output.

With this refactor, compileComponent() and compileDirective() now define
their inputs explicitly, with the new interfaces R3ComponentMetadata and
R3DirectiveMetadata. compileComponentGlobal() and compileDirectiveGlobal()
are introduced and convert from global analysis output into the new metadata
format.

This refactor also splits out the view compiler into separate files as
r3_view_compiler_local.ts was getting unwieldy.

Finally, this refactor also splits out generation of DI factory functions
into a separate r3_factory utility as the logic is utilized between different
compilers.

PR Close #23545
2018-05-08 13:57:20 -07:00
Victor Berchet 9757347e71 feat(ivy): add an IVY local the compiler which avoids analyzeModule (#23441)
closes #23289

Based on a spike by @chukjaz

PR Close #23441
2018-04-19 16:32:09 -07:00
Kara Erickson 7f612fc828 fix(ivy): generate bind calls for property bindings (#23403)
PR Close #23403
2018-04-17 13:44:48 -07:00
Victor Berchet 80e483ceac fix(ivy): add unparsed selectors to the `projectionDef` instruction (#23375)
PR Close #23375
2018-04-13 21:46:19 -07:00
Kara Erickson 0d516f1658 fix(ivy): update compiler to generate separate creation mode and update mode blocks (#23292)
PR Close #23292
2018-04-11 15:30:39 -07:00
Miško Hevery 3fb4e190a8 fix(ivy): correctly bind to component context (#23168)
When compiling templates the compiler would often bind to
closest context rather than the component context.

The only time one should be binding to the cont component is
in explicit cases where the inner template declares local variable.

PR Close #23168
2018-04-10 13:14:20 -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
Miško Hevery 5266ffe04a feat(ivy): add `(event)="handle"` syntax support to compiler (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Kara Erickson 85d3b591b6 refactor(ivy): generate pipe names instead of defs (#23104)
PR Close #23104
2018-04-02 09:42:44 -07:00
Kara Erickson 9cd446565c refactor(compiler): generate flat css selectors (#23074)
PR Close #23074
2018-03-30 15:27:50 -07:00
Kara Erickson 910a16a1ff refactor(ivy): remove directive references from template (#22986)
PR Close #22986
2018-03-26 22:33:23 -04:00
Chuck Jazdzewski 73c203fda9 feat(ivy): support host attribute and property bindings (#22334)
PR Close #22334
2018-03-08 10:57:30 -08:00
Chuck Jazdzewski 0451fd93df feat(ivy): support generating view and content queries (#22330)
PR Close #22330
2018-03-01 13:06:47 -08:00
Chuck Jazdzewski 49f074f61d feat(ivy): support array and object literals in binding expressions (#22336)
PR Close #22336
2018-03-01 13:02:58 -08:00
Chuck Jazdzewski 99909bbf2c feat(ivy): generate pipe references and definitions (#22034)
PR Close #22034
2018-02-20 13:58:03 -08:00