-
Notifications
You must be signed in to change notification settings - Fork 473
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
Refactor function literal tests for parsers #1404
Merged
leobalter
merged 2 commits into
tc39:master
from
jugglinmike:refactor-for-parsers-function
Feb 5, 2018
Merged
Refactor function literal tests for parsers #1404
leobalter
merged 2 commits into
tc39:master
from
jugglinmike:refactor-for-parsers-function
Feb 5, 2018
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
A number of tests for the parsing of function literals were expressed using `eval`. This made the tests more complex than necessary and also prevented the tests from providing value to ECMAScript parsers. Remove the use of `eval` in the relevant tests and instead express the expectations with literal source text.
leobalter
reviewed
Feb 5, 2018
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
function __func(){# ABC} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
leobalter
reviewed
Feb 5, 2018
eval("function\u0009\u2029w(\u000C)\u00A0{\u000D};"); | ||
// The following function expression is expressed with literal unicode | ||
// characters so that parsers may benefit from this test. The included code | ||
// points are as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for adding this comment.
leobalter
approved these changes
Feb 5, 2018
jugglinmike
added a commit
to jugglinmike/ecma262
that referenced
this pull request
Mar 29, 2018
In the March 2018 meeting of TC39, the committee elected to extend the definition of "function code" to include the BindingIdentifier of the productions where a BindingIdentifier is present. This decision was motivated by a desire to match implementation reality. This alteration does not require a change to Test262 because like the majority of modern implementations, Test262 already enforces the new behavior [1]. [1] tc39/test262#1404
jugglinmike
added a commit
to jugglinmike/ecma262
that referenced
this pull request
May 18, 2019
In the March 2018 meeting of TC39, the committee elected to extend the definition of "function code" to include the BindingIdentifier of the productions where a BindingIdentifier is present. This decision was motivated by a desire to match implementation reality. This alteration does not require a change to Test262 because like the majority of modern implementations, Test262 already enforces the new behavior [1]. [1] tc39/test262#1404
ljharb
pushed a commit
to jugglinmike/ecma262
that referenced
this pull request
Jun 19, 2019
In the March 2018 meeting of TC39, the committee elected to extend the definition of "function code" to include the BindingIdentifier of the productions where a BindingIdentifier is present. This decision was motivated by a desire to match implementation reality. This alteration does not require a change to Test262 because like the majority of modern implementations, Test262 already enforces the new behavior [1]. [1] tc39/test262#1404
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.
A number of tests for the parsing of function literals were expressed
using
eval
. This made the tests more complex than necessary and alsoprevented the tests from providing value to ECMAScript parsers.
Remove the use of
eval
in the relevant tests and instead express theexpectations with literal source text.
While writing this patch, I re-discovered a potential conflict between
implementations and the specification text. I filed a patch to the spec here:
tc39/ecma262#1091
I've tried to limit this patch to refactoring and avoid changing test behavior.
Since the issue referenced above is a long-standing one and unrelated to the
intent of this patch, I'd like to address that separately (pending the
resolution of the ECMA-262 issue).
This is in service of gh-1356