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

Made String.prototype.indexOf spec compliant. #597

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

HalidOdat
Copy link
Member

It changes the following:

  • Made String.prototype.indexOf spec compliant.
  • Added tests

@HalidOdat HalidOdat added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics execution Issues or PRs related to code execution labels Jul 28, 2020
@HalidOdat HalidOdat added this to the v0.10.0 milestone Jul 28, 2020
@codecov
Copy link

codecov bot commented Jul 28, 2020

Codecov Report

Merging #597 into master will increase coverage by 0.23%.
The diff coverage is 96.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #597      +/-   ##
==========================================
+ Coverage   71.11%   71.34%   +0.23%     
==========================================
  Files         176      176              
  Lines       11503    11551      +48     
==========================================
+ Hits         8180     8241      +61     
+ Misses       3323     3310      -13     
Impacted Files Coverage Δ
boa/src/builtins/string/mod.rs 46.19% <84.61%> (+3.53%) ⬆️
boa/src/builtins/string/tests.rs 100.00% <100.00%> (ø)

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 667a820...c0e42d1. Read the comment docs.

@github-actions
Copy link

Benchmark for 80a5065

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 385.6±23.92ns 383.3±10.51ns +0.60%
Arithmetic operations (Full) 162.1±3.99µs 174.6±8.02µs -7.16%
Array access (Execution) 8.3±0.30µs 8.3±0.35µs 0.00%
Array access (Full) 177.3±3.63µs 188.7±10.61µs -6.04%
Array creation (Execution) 3.4±0.06ms 3.4±0.08ms 0.00%
Array creation (Full) 3.6±0.10ms 3.8±0.13ms -5.26%
Array pop (Execution) 1280.1±631.32µs 1221.6±48.90µs +4.79%
Array pop (Full) 1501.2±141.03µs 1574.7±52.28µs -4.67%
Boolean Object Access (Execution) 4.3±0.25µs 4.4±0.25µs -2.27%
Boolean Object Access (Full) 174.0±6.36µs 179.9±8.68µs -3.28%
Create Realm 152.7±4.98µs 152.3±3.72µs +0.26%
Dynamic Object Property Access (Execution) 5.0±0.10µs 5.1±0.20µs -1.96%
Dynamic Object Property Access (Full) 172.6±6.06µs 179.3±7.84µs -3.74%
Expression (Lexer) 2.4±0.11µs 2.4±0.06µs 0.00%
Expression (Parser) 5.5±0.10µs 5.7±0.30µs -3.51%
Fibonacci (Execution) 954.4±33.18µs 957.0±38.76µs -0.27%
Fibonacci (Full) 1118.3±34.44µs 1157.7±30.77µs -3.40%
For loop (Execution) 22.3±0.68µs 22.7±2.09µs -1.76%
For loop (Full) 191.2±7.88µs 193.5±5.06µs -1.19%
For loop (Lexer) 5.2±0.16µs 5.3±0.15µs -1.89%
For loop (Parser) 14.0±0.44µs 14.4±0.84µs -2.78%
Goal Symbols (Parser) 8.6±0.30µs 8.5±0.23µs +1.18%
Hello World (Lexer) 823.1±29.66ns 823.0±18.45ns +0.01%
Hello World (Parser) 2.2±0.09µs 2.2±0.25µs 0.00%
Long file (Parser) 6.3±0.10ms 6.5±0.23ms -3.08%
Number Object Access (Execution) 3.3±0.08µs 3.3±0.12µs 0.00%
Number Object Access (Full) 170.9±5.03µs 173.7±5.93µs -1.61%
Object Creation (Execution) 4.2±0.13µs 4.3±0.18µs -2.33%
Object Creation (Full) 193.9±5.61µs 196.2±4.66µs -1.17%
RegExp (Execution) 67.7±3.35µs 68.6±3.09µs -1.31%
RegExp (Full) 256.5±11.74µs 258.0±10.14µs -0.58%
RegExp Literal (Execution) 70.2±2.46µs 71.2±2.42µs -1.40%
RegExp Literal (Full) 248.0±10.13µs 258.7±9.93µs -4.14%
RegExp Literal Creation (Execution) 66.6±1.79µs 67.8±2.88µs -1.77%
RegExp Literal Creation (Full) 289.8±7.90µs 304.4±15.70µs -4.80%
Static Object Property Access (Execution) 4.4±0.09µs 4.4±0.05µs 0.00%
Static Object Property Access (Full) 171.4±5.34µs 175.0±5.66µs -2.06%
String Object Access (Execution) 6.5±0.27µs 6.4±0.19µs +1.56%
String Object Access (Full) 174.5±5.71µs 180.3±5.12µs -3.22%
String comparison (Execution) 5.9±0.20µs 6.0±0.49µs -1.67%
String comparison (Full) 174.6±6.08µs 178.1±7.69µs -1.97%
String concatenation (Execution) 4.9±0.13µs 4.8±0.10µs +2.08%
String concatenation (Full) 169.9±6.46µs 177.2±9.26µs -4.12%
String copy (Execution) 3.6±0.10µs 3.6±0.17µs 0.00%
String copy (Full) 168.1±4.47µs 173.4±8.13µs -3.06%
Symbols (Execution) 3.0±0.05µs 3.0±0.20µs 0.00%
Symbols (Full) 161.9±8.03µs 166.5±7.04µs -2.76%

@HalidOdat HalidOdat merged commit 356ce1a into master Jul 29, 2020
@HalidOdat HalidOdat deleted the fix/string-prototype-indexof branch July 29, 2020 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant