-
Notifications
You must be signed in to change notification settings - Fork 851
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
Patch for Bug 783507 ("Implement ES.next quasi-literals (Rhino)") #81
Closed
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
Initial clean-up / bug-fixing so the test cases will pass NativeArray: - support changing attributes for dense arrays ScriptRuntime: - call [[DefaultValue]] when appending objects and strings JsTestsBase: - close file handle
Token, ast/QuasiCall, ast/QuasiCharacters, ast/QuasiLiteral: - new AST nodes for quasi literals resp. tagged quasis resp. quasi literal sections TokenStream, Parser: - tokenize and parse quasi literals - some extra code was necessary to ensure "\r\n" sequences aren't reduced to "\n" IRFactory, Decompiler, ScriptNode, Node: - desugar default quasis to simple string concatenation - desugar tagged quasis to call expressions - collect each functions tagged quasis in ScriptNode ScriptRuntime: - implement the abstract operation GetQuasiCallSite CodeGenerator, Icode, Interpreter, InterpreterData: - added new opcode for the call to GetQuasiCallSite - record cooked and raw quasi literal sections for later construction of the call site object optimizer/Block, optimizer/Codegen: - record cooked and raw quasi literal sections for later construction of the call site object - same approach as for RegExp literals, could be optimized if necessary
Add implementation for String.raw [15.5.3.4]
Add test cases for: - default quasis - tagged quasis - String.raw
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
Sep 18, 2020
manual rebase of Patch 2 & 3 for mozilla#81
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
Sep 21, 2020
tonygermano
added a commit
to tonygermano/rhino
that referenced
this pull request
May 2, 2021
Fixed merge conflict and bugs from 3rd commit of mozilla#81 Co-authored-by: André Bargull <[email protected]>
Merged
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
May 19, 2021
manual rebase of Patch 2 & 3 for mozilla#81
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
May 19, 2021
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
May 21, 2021
manual rebase of Patch 2 & 3 for mozilla#81
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
May 21, 2021
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
Jun 1, 2021
manual rebase of Patch 2 & 3 for mozilla#81
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
Jun 1, 2021
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
Jun 8, 2021
manual rebase of Patch 2 & 3 for mozilla#81
p-bakker
added a commit
to p-bakker/rhino
that referenced
this pull request
Jun 8, 2021
gbrail
pushed a commit
that referenced
this pull request
Jun 10, 2021
manual rebase of Patch 2 & 3 for #81
gbrail
pushed a commit
that referenced
this pull request
Jun 10, 2021
Merged via #904 |
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 is a first stab at implementing quasi-literals (resp. the new official name "string templates"), it's still kind of rough and could need some clean-up, but should be sufficient as a starting point. I've used the current ES6 draft (July 8, 2012 Draft) for this patch.
There are four individual patches:
[Patch 1] fixes two bugs in the current code base which prevented the test cases to succeed
[Patch 2] contains the majority of the changes (frontend as well as backend)
[Patch 3] adds the new "String.raw" function
[Patch 4] adds some test cases for quasi-literals and String.raw