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

Implement Map.prototype[ @@toStringTag ] #1249

Merged
merged 2 commits into from
May 12, 2021
Merged

Implement Map.prototype[ @@toStringTag ] #1249

merged 2 commits into from
May 12, 2021

Conversation

wylie39
Copy link
Contributor

@wylie39 wylie39 commented May 12, 2021

This Implements Map.prototype[ @@toStringTag ]

This is based on #1225

resolves #1229

This Implements Map.prototype[ @@toStringTag ] 

This is the same as #1225
@Razican Razican added this to the v0.12.0 milestone May 12, 2021
@Razican Razican added builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request labels May 12, 2021
@Razican
Copy link
Member

Razican commented May 12, 2021

Test262 conformance changes:

Test result master count PR count difference
Total 78,701 78,701 0
Passed 25,750 25,752 +2
Ignored 15,519 15,519 0
Failed 37,432 37,430 -2
Panics 27 27 0
Conformance 32.72% 32.72% +0.00%

Benchmarks:

┌─────────┬──────────────────────────────────────────────┬────────────────────┬──────────────────────┬────────────┐
│ (index) │                     name                     │  changesDuration   │    masterDuration    │ difference │
├─────────┼──────────────────────────────────────────────┼────────────────────┼──────────────────────┼────────────┤
│    0    │     'Arithmetic operations (Execution)'      │   '358.7±2.97ns'   │  '**355.4±4.27ns**'  │   '+1.0'   │
│    1    │        'Arithmetic operations (Full)'        │   '259.0±2.00µs'   │  '**257.0±1.27µs**'  │   '+1.0'   │
│    2    │          'Array access (Execution)'          │    '6.2±0.05µs'    │   '**6.1±0.07µs**'   │   '+1.0'   │
│    3    │            'Array access (Full)'             │   '278.5±3.15µs'   │  '**274.4±4.77µs**'  │   '+1.0'   │
│    4    │         'Array creation (Execution)'         │    '3.1±0.03ms'    │   '**3.1±0.05ms**'   │   '+1.0'   │
│    5    │           'Array creation (Full)'            │    '3.2±0.06ms'    │     '3.2±0.05ms'     │   '0.0'    │
│    6    │           'Array pop (Execution)'            │  '982.1±11.09µs'   │ '**962.1±24.05µs**'  │   '+2.0'   │
│    7    │              'Array pop (Full)'              │  '1391.5±31.94µs'  │   '1394.4±21.40µs'   │   '0.0'    │
│    8    │     'Boolean Object Access (Execution)'      │  '**5.2±0.12µs**'  │     '5.3±0.11µs'     │  '-0.99'   │
│    9    │        'Boolean Object Access (Full)'        │ '**272.4±4.33µs**' │    '276.7±3.60µs'    │   '-2.0'   │
│   10    │            'Clean js (Execution)'            │  '650.1±10.93µs'   │    '652.7±7.63µs'    │   '0.0'    │
│   11    │              'Clean js (Full)'               │  '951.4±12.63µs'   │    '956.2±9.93µs'    │   '0.0'    │
│   12    │             'Clean js (Parser)'              │ '**39.2±0.93µs**'  │    '39.5±0.77µs'     │  '-0.99'   │
│   13    │                'Create Realm'                │ '**419.0±1.47ns**' │   '426.8±11.42ns'    │   '-2.0'   │
│   14    │ 'Dynamic Object Property Access (Execution)' │  '**4.9±0.08µs**'  │     '4.9±0.11µs'     │  '-0.99'   │
│   15    │   'Dynamic Object Property Access (Full)'    │   '276.6±3.81µs'   │  '**270.7±5.26µs**'  │   '+2.0'   │
│   16    │            'Expression (Parser)'             │    '6.7±0.07µs'    │   '**6.6±0.11µs**'   │   '+1.0'   │
│   17    │           'Fibonacci (Execution)'            │   '744.7±2.67µs'   │   '744.5±11.11µs'    │   '0.0'    │
│   18    │              'Fibonacci (Full)'              │  '1053.2±26.96µs'  │ '**1043.3±18.06µs**' │   '+1.0'   │
│   19    │            'For loop (Execution)'            │   '21.7±0.15µs'    │  '**21.4±0.30µs**'   │   '+1.0'   │
│   20    │              'For loop (Full)'               │   '290.4±4.02µs'   │  '**288.4±4.96µs**'  │   '+1.0'   │
│   21    │             'For loop (Parser)'              │ '**18.5±0.69µs**'  │    '19.5±0.19µs'     │   '-5.7'   │
│   22    │           'Goal Symbols (Parser)'            │   '13.5±0.09µs'    │  '**12.9±0.50µs**'   │   '+5.0'   │
│   23    │            'Hello World (Parser)'            │  '**3.6±0.07µs**'  │     '3.7±0.05µs'     │   '-2.0'   │
│   24    │             'Long file (Parser)'             │   '785.3±7.77ns'   │  '**776.7±7.63ns**'  │   '+1.0'   │
│   25    │            'Mini js (Execution)'             │   '593.1±7.33µs'   │  '**588.4±9.26µs**'  │   '+1.0'   │
│   26    │               'Mini js (Full)'               │   '892.9±8.76µs'   │ '**882.0±12.89µs**'  │   '+1.0'   │
│   27    │              'Mini js (Parser)'              │   '34.7±0.58µs'    │  '**34.3±0.95µs**'   │   '+1.0'   │
│   28    │      'Number Object Access (Execution)'      │  '**4.1±0.03µs**'  │     '4.3±0.02µs'     │   '-3.8'   │
│   29    │        'Number Object Access (Full)'         │   '270.0±3.56µs'   │    '270.0±1.28µs'    │   '0.0'    │
│   30    │        'Object Creation (Execution)'         │    '4.3±0.03µs'    │   '**4.1±0.11µs**'   │   '+3.0'   │
│   31    │           'Object Creation (Full)'           │   '270.5±3.53µs'   │  '**268.1±4.88µs**'  │   '+1.0'   │
│   32    │             'RegExp (Execution)'             │ '**10.8±0.13µs**'  │    '11.8±0.08µs'     │   '-9.1'   │
│   33    │               'RegExp (Full)'                │   '276.8±9.24µs'   │    '275.5±5.05µs'    │   '0.0'    │
│   34    │         'RegExp Literal (Execution)'         │ '**10.8±0.11µs**'  │    '11.7±0.14µs'     │   '-7.4'   │
│   35    │           'RegExp Literal (Full)'            │   '282.4±4.09µs'   │  '**279.4±5.44µs**'  │   '+1.0'   │
│   36    │    'RegExp Literal Creation (Execution)'     │  '**9.3±0.14µs**'  │    '10.2±0.18µs'     │   '-8.3'   │
│   37    │       'RegExp Literal Creation (Full)'       │   '274.2±4.64µs'   │  '**268.8±9.00µs**'  │   '+2.0'   │
│   38    │ 'Static Object Property Access (Execution)'  │  '**4.4±0.03µs**'  │     '4.5±0.05µs'     │  '-0.99'   │
│   39    │    'Static Object Property Access (Full)'    │ '**269.6±5.04µs**' │    '271.2±4.62µs'    │  '-0.99'   │
│   40    │      'String Object Access (Execution)'      │  '**7.2±0.09µs**'  │     '7.5±0.05µs'     │   '-3.8'   │
│   41    │        'String Object Access (Full)'         │   '279.7±1.58µs'   │    '278.7±3.19µs'    │   '0.0'    │
│   42    │       'String comparison (Execution)'        │  '**6.4±0.07µs**'  │     '6.5±0.08µs'     │  '-0.99'   │
│   43    │          'String comparison (Full)'          │   '278.9±0.70µs'   │  '**276.2±4.48µs**'  │   '+1.0'   │
│   44    │      'String concatenation (Execution)'      │  '**5.1±0.08µs**'  │     '5.2±0.05µs'     │   '-2.0'   │
│   45    │        'String concatenation (Full)'         │   '270.9±7.07µs'   │  '**262.3±7.41µs**'  │   '+3.0'   │
│   46    │          'String copy (Execution)'           │  '**3.8±0.02µs**'  │     '4.0±0.07µs'     │   '-2.9'   │
│   47    │             'String copy (Full)'             │   '265.2±3.35µs'   │  '**257.3±6.71µs**'  │   '+3.0'   │
│   48    │            'Symbols (Execution)'             │    '3.3±0.03µs'    │   '**3.3±0.05µs**'   │   '+1.0'   │
│   49    │               'Symbols (Full)'               │ '**252.0±3.95µs**' │    '254.1±1.93µs'    │  '-0.99'   │
│   50    │                      ''                      │     undefined      │      undefined       │   '+NaN'   │
└─────────┴──────────────────────────────────────────────┴────────────────────┴──────────────────────┴────────────┘

boa/src/builtins/map/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Iban Eguia <razican@protonmail.ch>
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.

Looks good from my side :) I updated the numbers, and now indeed it passes two extra tests.

@Razican Razican merged commit a0be5cd into boa-dev:master May 12, 2021
Razican added a commit that referenced this pull request May 22, 2021
* Implement Map.prototype[ @@toStringTag ]

This Implements Map.prototype[ @@toStringTag ] 

This is the same as #1225

* Update boa/src/builtins/map/mod.rs

Co-authored-by: Iban Eguia <razican@protonmail.ch>

Co-authored-by: Iban Eguia <razican@protonmail.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Map.prototype[ @@toStringTag ]
3 participants