Skip to content

Added BindingIdentifier parsing. - #389

Merged
Razican merged 2 commits into
masterfrom
binding_ident
May 10, 2020
Merged

Razican merged 2 commits into
masterfrom
binding_ident

Conversation

@Razican

@Razican Razican commented May 9, 2020 •

Copy link
Copy Markdown
Member

This adds BindingIdentifier parsing (spec). This allows creating bindings with yield and await as identifiers.

I added some tests. Note that this should only be possible in non-strict mode, but we do not currently support strict/non-strict modes. That's something we should probably do in the future.

I was a bit unsure on what did IdentifierReference and LabelIdentifier productions meant with those [~Yield] and [~Await]. Do they work the same way as BindingIdentifier?

I also improved readability of some tests.

@Razican Razican added A-Enhancement New feature or request C-Parser Issues surrounding the parser labels May 9, 2020
@Razican Razican added this to the v0.8.0 milestone May 9, 2020
@Razican Razican changed the title Added BindingIdentifier. Added BindingIdentifier parsing. May 9, 2020
@github-actions

github-actions Bot commented May 9, 2020

Copy link
Copy Markdown

Benchmark for bfe30c3

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 320.6±24.22µs 327.7±22.62µs 98%
Expression (Lexer) 1510.0±97.73ns 1480.6±92.97ns 102%
Expression (Parser) 4.0±0.24µs 3.8±0.18µs 104%
Fibonacci (Execution) 2.2±0.14ms 2.2±0.12ms 100%
For loop (Execution) 355.0±25.02µs 325.8±13.99µs 109.00000000000001%
For loop (Lexer) 4.0±0.19µs 4.0±0.21µs 101%
For loop (Parser) 11.9±0.86µs 11.1±0.88µs 107%
Hello World (Lexer) 720.0±41.28ns 745.2±52.92ns 97%
Hello World (Parser) 1753.0±85.64ns 1860.2±125.75ns 94%
Symbols (Execution) 340.4±22.99µs 347.1±17.93µs 98%
undefined undefined 100%

@github-actions

github-actions Bot commented May 9, 2020

Copy link
Copy Markdown

Benchmark for 727b070

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 411.1±12.03µs 425.9±27.96µs 96%
Expression (Lexer) 2.0±0.04µs 2.1±0.12µs 95%
Expression (Parser) 292.6±54.89µs 4.9±0.08µs 5938%
Fibonacci (Execution) 3.1±0.12ms 3.0±0.06ms 104%
For loop (Execution) 495.0±40.13µs 439.1±9.92µs 112.99999999999999%
For loop (Lexer) 5.3±0.25µs 5.4±0.15µs 99%
For loop (Parser) 112.8±25.12µs 14.6±0.36µs 774%
Hello World (Lexer) 986.8±58.59ns 991.5±36.24ns 100%
Hello World (Parser) 2.4±0.10µs 2.4±0.12µs 102%
Symbols (Execution) 444.8±15.67µs 447.9±20.60µs 99%
undefined undefined 100%

@Razican

Razican commented May 10, 2020

Copy link
Copy Markdown
Member Author

Note that the real benchmark is the first one xD this is ready for review.

@Razican
Razican merged commit 143434f into master May 10, 2020
@Razican
Razican deleted the binding_ident branch May 10, 2020 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Enhancement New feature or request C-Parser Issues surrounding the parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants