Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifying Content Appending #784

Merged
merged 23 commits into from
Mar 1, 2018
Merged

Unifying Content Appending #784

merged 23 commits into from
Mar 1, 2018

Conversation

wycats
Copy link
Contributor

@wycats wycats commented Feb 14, 2018

This PRs intention is to unify appending content into the DOM. Prior to these changes there were different code paths for the LazyCompiler and the EagerCompiler for appending content. The difference was that the EagerCompiler would compile a standard library function for appending content and then jump to that function any time a content append occured. The LazyCompiler simply would recompile all the instructions inline. This made for some pretty confusing code as we branched based on what compiler was being used. This PR introduces a standard library for unified content append that handles append all content types into the DOM in a unified fashion.

We have also cleaned up how a template is compiled by encapsulating more of the required "options" into the compiler it's self.

wycats and others added 23 commits March 1, 2018 09:11
This is a bunch of cleanup to set up for the next step: moving the
conditional logic for dynamic content into opcodes.
TODO:

- restore stable text node optimization
- lazy mode to use stdlib
- try to optimize the asm of the switch statement
Outside of the precompiler, TemplateMeta is an overly generic name,
since the value is used as a referrer. In other places, this commit
renames TemplateMeta to Locator.
Also a bunch of other cleanup and general refactoring
Clean up a bunch of benign but incorrect code caught by the upgrade
@chadhietala chadhietala changed the title [WIP] Begin unifying content appending Unifying Content Appending Mar 1, 2018
@chadhietala chadhietala merged commit f04b36b into master Mar 1, 2018
@krisselden krisselden deleted the content-unification branch March 19, 2018 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants