-
Notifications
You must be signed in to change notification settings - Fork 190
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chadhietala
force-pushed
the
content-unification
branch
from
February 27, 2018 18:03
dcd6bfc
to
8e4970e
Compare
wycats
force-pushed
the
content-unification
branch
from
February 27, 2018 19:55
8e4970e
to
db7d106
Compare
chadhietala
force-pushed
the
content-unification
branch
from
February 27, 2018 20:30
db7d106
to
b1b91e4
Compare
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
force-pushed
the
content-unification
branch
from
March 1, 2018 15:13
a0f6db4
to
df438b6
Compare
chadhietala
changed the title
[WIP] Begin unifying content appending
Unifying Content Appending
Mar 1, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.