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

[Merged by Bors] - Allow let as variable declaration name #2044

Closed
wants to merge 1 commit into from

Conversation

raskad
Copy link
Member

@raskad raskad commented Apr 23, 2022

This Pull Request changes the following:

  • Allow let as variable declaration name

@raskad raskad added enhancement New feature or request parser Issues surrounding the parser labels Apr 23, 2022
@raskad raskad added this to the v0.15.0 milestone Apr 23, 2022
@github-actions
Copy link

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 89,014 89,014 0
Passed 53,246 53,258 +12
Ignored 22,149 22,149 0
Failed 13,619 13,607 -12
Panics 0 0 0
Conformance 59.82% 59.83% +0.01%
Fixed tests (12):
test/language/statements/while/let-identifier-with-newline.js (previously Failed)
test/language/statements/while/let-block-with-newline.js (previously Failed)
test/language/statements/if/let-identifier-with-newline.js (previously Failed)
test/language/statements/if/let-block-with-newline.js (previously Failed)
test/language/statements/labeled/let-identifier-with-newline.js (previously Failed)
test/language/statements/labeled/let-block-with-newline.js (previously Failed)
test/language/statements/for-in/head-var-bound-names-let.js (previously Failed)
test/language/statements/for/let-identifier-with-newline.js (previously Failed)
test/language/statements/for/let-block-with-newline.js (previously Failed)
test/language/statements/for-of/let-identifier-with-newline.js (previously Failed)
test/language/statements/for-of/head-var-bound-names-let.js (previously Failed)
test/language/statements/for-of/let-block-with-newline.js (previously Failed)

@codecov
Copy link

codecov bot commented Apr 23, 2022

Codecov Report

Merging #2044 (0292842) into main (5b46d12) will decrease coverage by 0.03%.
The diff coverage is 12.00%.

@@            Coverage Diff             @@
##             main    #2044      +/-   ##
==========================================
- Coverage   43.90%   43.87%   -0.04%     
==========================================
  Files         212      212              
  Lines       18734    18757      +23     
==========================================
+ Hits         8226     8229       +3     
- Misses      10508    10528      +20     
Impacted Files Coverage Δ
...engine/src/syntax/parser/expression/primary/mod.rs 33.64% <0.00%> (-0.32%) ⬇️
...src/syntax/parser/statement/declaration/lexical.rs 30.59% <5.26%> (-3.60%) ⬇️
boa_engine/src/syntax/parser/statement/mod.rs 29.37% <40.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b46d12...0292842. Read the comment docs.

@github-actions
Copy link

Benchmark for 4b06192

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 525.2±2.32ns 512.8±1.67ns -2.36%
Arithmetic operations (Execution) 645.7±0.73ns 638.6±0.75ns -1.10%
Arithmetic operations (Parser) 5.9±0.01µs 5.9±0.01µs 0.00%
Array access (Compiler) 1298.2±3.77ns 1300.1±4.41ns +0.15%
Array access (Execution) 7.7±0.02µs 7.7±0.03µs 0.00%
Array access (Parser) 12.7±0.02µs 12.6±0.03µs -0.79%
Array creation (Compiler) 1838.9±9.72ns 1813.4±5.51ns -1.39%
Array creation (Execution) 2.5±0.00ms 2.5±0.01ms 0.00%
Array creation (Parser) 14.5±0.06µs 14.4±0.02µs -0.69%
Array pop (Compiler) 3.8±0.01µs 3.7±0.01µs -2.63%
Array pop (Execution) 1117.8±6.64µs 1113.4±7.77µs -0.39%
Array pop (Parser) 144.6±0.16µs 144.9±0.25µs +0.21%
Boolean Object Access (Compiler) 1054.4±2.11ns 1054.0±2.37ns -0.04%
Boolean Object Access (Execution) 4.2±0.01µs 4.1±0.01µs -2.38%
Boolean Object Access (Parser) 15.4±0.03µs 15.0±0.02µs -2.60%
Clean js (Compiler) 3.4±0.01µs 3.4±0.01µs 0.00%
Clean js (Execution) 699.7±3.94µs 690.7±4.79µs -1.29%
Clean js (Parser) 31.3±0.06µs 31.0±0.07µs -0.96%
Create Realm 277.4±0.32ns 275.3±0.50ns -0.76%
Dynamic Object Property Access (Compiler) 1627.6±3.73ns 1619.4±4.47ns -0.50%
Dynamic Object Property Access (Execution) 5.4±0.01µs 5.5±0.02µs +1.85%
Dynamic Object Property Access (Parser) 11.3±0.02µs 11.2±0.02µs -0.88%
Fibonacci (Compiler) 2.3±0.11µs 2.3±0.01µs 0.00%
Fibonacci (Execution) 1326.5±2.90µs 1310.9±1.67µs -1.18%
Fibonacci (Parser) 17.2±0.02µs 16.9±0.04µs -1.74%
For loop (Compiler) 1974.0±6.32ns 1941.2±4.94ns -1.66%
For loop (Execution) 15.4±0.06µs 15.5±0.07µs +0.65%
For loop (Parser) 14.7±0.09µs 14.7±0.10µs 0.00%
Mini js (Compiler) 3.3±0.01µs 3.3±0.02µs 0.00%
Mini js (Execution) 652.2±3.79µs 646.6±3.37µs -0.86%
Mini js (Parser) 27.6±0.05µs 27.5±0.04µs -0.36%
Number Object Access (Compiler) 1019.7±2.79ns 1010.9±4.13ns -0.86%
Number Object Access (Execution) 3.2±0.01µs 3.2±0.01µs 0.00%
Number Object Access (Parser) 11.8±0.03µs 11.7±0.02µs -0.85%
Object Creation (Compiler) 1429.1±3.41ns 1412.5±3.36ns -1.16%
Object Creation (Execution) 5.1±0.21µs 5.1±0.02µs 0.00%
Object Creation (Parser) 9.8±0.08µs 9.7±0.02µs -1.02%
RegExp (Compiler) 1643.0±3.87ns 1668.3±2.97ns +1.54%
RegExp (Execution) 11.0±0.06µs 11.1±0.06µs +0.91%
RegExp (Parser) 10.8±0.01µs 10.8±0.02µs 0.00%
RegExp Creation (Compiler) 1436.4±3.03ns 1434.5±3.49ns -0.13%
RegExp Creation (Execution) 8.2±0.05µs 8.2±0.03µs 0.00%
RegExp Creation (Parser) 8.9±0.02µs 8.9±0.03µs 0.00%
RegExp Literal (Compiler) 1636.6±3.66ns 1649.3±3.40ns +0.78%
RegExp Literal (Execution) 10.9±0.04µs 11.1±0.06µs +1.83%
RegExp Literal (Parser) 8.7±0.01µs 8.7±0.02µs 0.00%
RegExp Literal Creation (Compiler) 1420.5±3.25ns 1447.7±3.39ns +1.91%
RegExp Literal Creation (Execution) 8.2±0.02µs 8.2±0.03µs 0.00%
RegExp Literal Creation (Parser) 6.9±0.01µs 6.8±0.02µs -1.45%
Static Object Property Access (Compiler) 1400.3±1.45ns 1415.3±4.70ns +1.07%
Static Object Property Access (Execution) 5.2±0.01µs 5.2±0.01µs 0.00%
Static Object Property Access (Parser) 10.5±0.01µs 10.5±0.02µs 0.00%
String Object Access (Compiler) 1441.4±8.76ns 1399.1±1.92ns -2.93%
String Object Access (Execution) 5.9±0.02µs 5.8±0.02µs -1.69%
String Object Access (Parser) 15.0±0.03µs 14.8±0.02µs -1.33%
String comparison (Compiler) 2.1±0.00µs 2.1±0.01µs 0.00%
String comparison (Execution) 4.6±0.02µs 4.6±0.01µs 0.00%
String comparison (Parser) 11.6±0.02µs 11.6±0.02µs 0.00%
String concatenation (Compiler) 1669.5±3.83ns 1643.8±3.93ns -1.54%
String concatenation (Execution) 4.4±0.01µs 4.4±0.01µs 0.00%
String concatenation (Parser) 8.1±0.01µs 8.0±0.02µs -1.23%
String copy (Compiler) 1294.6±3.39ns 1325.6±5.37ns +2.39%
String copy (Execution) 4.1±0.01µs 4.2±0.01µs +2.44%
String copy (Parser) 6.0±0.02µs 6.0±0.02µs 0.00%
Symbols (Compiler) 924.2±4.67ns 923.0±1.45ns -0.13%
Symbols (Execution) 4.3±0.01µs 4.2±0.01µs -2.33%
Symbols (Parser) 4.6±0.01µs 4.6±0.03µs 0.00%

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@HalidOdat
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Apr 24, 2022
This Pull Request changes the following:

- Allow `let` as variable declaration name
@bors
Copy link

bors bot commented Apr 24, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Allow let as variable declaration name [Merged by Bors] - Allow let as variable declaration name Apr 24, 2022
@bors bors bot closed this Apr 24, 2022
@bors bors bot deleted the allow-let-as-var branch April 24, 2022 11:44
Razican pushed a commit that referenced this pull request Jun 8, 2022
This Pull Request changes the following:

- Allow `let` as variable declaration name
@pedropaulosuzuki
Copy link
Contributor

Is there a specific test for this? Or are we using Test262 in general as our testing methods? While I see the value on using Test262, it is also good to use our in-house tests in order to catch regressions.

@raskad
Copy link
Member Author

raskad commented Jun 20, 2022

Is there a specific test for this? Or are we using Test262 in general as our testing methods? While I see the value on using Test262, it is also good to use our in-house tests in order to catch regressions.

Unless there are implementation specific tests that are not covered by the 262 suite, I think replicating the 262 tests does not make much sense. We have to run the 262 suite anyways, so we would mostly just double the test time. Also whenever the 262 suite changes, we would have to adjust our internal test suite which would probably result in the two suites diverging. But that's just my 2 cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants