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

Rename Value to JsValue #1457

Merged
merged 2 commits into from
Aug 12, 2021
Merged

Rename Value to JsValue #1457

merged 2 commits into from
Aug 12, 2021

Conversation

HalidOdat
Copy link
Member

Related to #1376

It changes the following:

  • Rename Value to JsValue
  • Remove Value::number(), Value::integer(), Value::rational() for a universal JsValue::new() constructor.

@HalidOdat HalidOdat added this to the v0.13.0 milestone Aug 6, 2021
@github-actions
Copy link

github-actions bot commented Aug 7, 2021

Test262 conformance changes:

Test result master count PR count difference
Total 78,897 78,897 0
Passed 29,633 29,633 0
Ignored 15,612 15,612 0
Failed 33,652 33,652 0
Panics 2 2 0
Conformance 37.56% 37.56% 0.00%

@github-actions
Copy link

github-actions bot commented Aug 7, 2021

Benchmark for c1e97af

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 221.4±0.20ns 220.0±2.67ns +0.64%
Arithmetic operations (Full) 260.5±0.49µs 262.8±0.54µs -0.88%
Array access (Execution) 5.5±0.01µs 5.5±0.01µs 0.00%
Array access (Full) 281.1±0.71µs 283.5±0.74µs -0.85%
Array creation (Execution) 2.4±0.00ms 2.6±0.00ms -7.69%
Array creation (Full) 2.9±0.00ms 2.8±0.00ms +3.57%
Array pop (Execution) 787.7±3.88µs 853.1±3.48µs -7.67%
Array pop (Full) 1276.4±1.85µs 1237.9±1.70µs +3.11%
Boolean Object Access (Execution) 4.6±0.01µs 4.6±0.01µs 0.00%
Boolean Object Access (Full) 275.5±0.34µs 279.7±0.41µs -1.50%
Clean js (Execution) 618.8±3.75µs 629.8±4.03µs -1.75%
Clean js (Full) 931.7±3.06µs 931.9±3.03µs -0.02%
Clean js (Parser) 30.5±0.05µs 31.0±0.07µs -1.61%
Create Realm 359.9±0.15ns 350.3±0.18ns +2.74%
Dynamic Object Property Access (Execution) 4.3±0.01µs 4.3±0.01µs 0.00%
Dynamic Object Property Access (Full) 279.0±1.01µs 278.4±0.68µs +0.22%
Expression (Parser) 5.1±0.00µs 5.1±0.01µs 0.00%
Fibonacci (Execution) 684.3±4.98µs 676.3±0.51µs +1.18%
Fibonacci (Full) 987.9±0.58µs 999.0±1.77µs -1.11%
For loop (Execution) 16.6±0.06µs 16.6±0.04µs 0.00%
For loop (Full) 284.3±0.22µs 285.6±0.67µs -0.46%
For loop (Parser) 14.7±0.05µs 14.7±0.04µs 0.00%
Goal Symbols (Parser) 10.7±0.05µs 10.7±0.03µs 0.00%
Hello World (Parser) 3.0±0.01µs 3.0±0.02µs 0.00%
Long file (Parser) 724.0±1.53ns 727.5±0.62ns -0.48%
Mini js (Execution) 569.5±3.57µs 579.1±5.33µs -1.66%
Mini js (Full) 884.1±5.99µs 881.3±2.94µs +0.32%
Mini js (Parser) 27.1±0.05µs 27.0±0.03µs +0.37%
Number Object Access (Execution) 3.6±0.02µs 3.6±0.01µs 0.00%
Number Object Access (Full) 273.0±0.37µs 273.6±0.59µs -0.22%
Object Creation (Execution) 3.9±0.01µs 3.8±0.01µs +2.63%
Object Creation (Full) 274.0±0.61µs 275.6±0.37µs -0.58%
RegExp (Execution) 10.9±0.12µs 11.0±0.08µs -0.91%
RegExp (Full) 282.8±0.47µs 281.6±0.64µs +0.43%
RegExp Literal (Execution) 10.9±0.07µs 11.0±0.10µs -0.91%
RegExp Literal (Full) 289.0±0.37µs 289.9±0.78µs -0.31%
RegExp Literal Creation (Execution) 8.0±0.04µs 8.1±0.04µs -1.23%
RegExp Literal Creation (Full) 279.0±0.44µs 279.6±0.39µs -0.21%
Static Object Property Access (Execution) 4.1±0.02µs 4.0±0.01µs +2.50%
Static Object Property Access (Full) 276.0±0.58µs 276.7±0.48µs -0.25%
String Object Access (Execution) 6.0±0.01µs 6.0±0.01µs 0.00%
String Object Access (Full) 277.9±0.32µs 281.2±0.53µs -1.17%
String comparison (Execution) 5.4±0.02µs 5.4±0.02µs 0.00%
String comparison (Full) 277.5±2.86µs 278.0±0.35µs -0.18%
String concatenation (Execution) 4.3±0.02µs 4.3±0.01µs 0.00%
String concatenation (Full) 270.9±0.59µs 272.4±0.61µs -0.55%
String copy (Execution) 3.4±0.01µs 3.4±0.01µs 0.00%
String copy (Full) 267.2±0.54µs 270.4±0.64µs -1.18%
Symbols (Execution) 3.0±0.01µs 3.0±0.01µs 0.00%
Symbols (Full) 253.5±0.60µs 254.5±0.29µs -0.39%

@bartlomieju
Copy link
Contributor

I believe this closes #1376

@HalidOdat
Copy link
Member Author

I believe this closes #1376

This does not close it since we still have GcObject => JsObject and we might want to change boa::Result as well.

@HalidOdat HalidOdat merged commit 62ad20c into master Aug 12, 2021
@HalidOdat HalidOdat deleted the rename-value branch August 12, 2021 00:03
@github-actions
Copy link

Benchmark for 279a80a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 273.5±15.13ns 319.7±45.04ns -14.45%
Arithmetic operations (Full) 347.5±19.66µs 390.8±407.46µs -11.08%
Array access (Execution) 8.0±0.40µs 7.5±0.88µs +6.67%
Array access (Full) 362.5±24.20µs 385.9±28.81µs -6.06%
Array creation (Execution) 3.2±0.13ms 3.1±0.43ms +3.23%
Array creation (Full) 3.4±0.21ms 3.7±0.40ms -8.11%
Array pop (Execution) 1043.5±105.68µs 980.8±141.79µs +6.39%
Array pop (Full) 1539.9±181.59µs 1649.9±292.49µs -6.67%
Boolean Object Access (Execution) 6.1±0.29µs 6.4±0.60µs -4.69%
Boolean Object Access (Full) 362.9±31.27µs 374.2±39.28µs -3.02%
Clean js (Execution) 791.9±34.34µs 904.4±167.95µs -12.44%
Clean js (Full) 1165.4±84.12µs 1216.0±319.20µs -4.16%
Clean js (Parser) 36.6±1.84µs 38.2±7.02µs -4.19%
Create Realm 463.0±45.41ns 440.3±30.70ns +5.16%
Dynamic Object Property Access (Execution) 6.4±0.61µs 6.0±0.95µs +6.67%
Dynamic Object Property Access (Full) 353.7±33.26µs 380.7±43.82µs -7.09%
Expression (Parser) 6.4±0.51µs 6.9±1.47µs -7.25%
Fibonacci (Execution) 975.5±26.84µs 925.1±127.31µs +5.45%
Fibonacci (Full) 1328.8±63.81µs 1451.0±210.84µs -8.42%
For loop (Execution) 23.3±1.04µs 21.6±1.48µs +7.87%
For loop (Full) 367.2±19.67µs 395.5±44.22µs -7.16%
For loop (Parser) 17.7±2.76µs 17.8±1.07µs -0.56%
Goal Symbols (Parser) 12.7±1.98µs 12.7±1.49µs 0.00%
Hello World (Parser) 3.5±0.34µs 3.7±0.55µs -5.41%
Long file (Parser) 820.9±63.39ns 825.3±117.23ns -0.53%
Mini js (Execution) 718.2±31.50µs 772.8±135.60µs -7.07%
Mini js (Full) 1082.3±38.22µs 1126.5±148.20µs -3.92%
Mini js (Parser) 32.7±4.67µs 32.8±4.11µs -0.30%
Number Object Access (Execution) 4.9±0.26µs 4.8±0.56µs +2.08%
Number Object Access (Full) 350.4±22.27µs 362.4±37.20µs -3.31%
Object Creation (Execution) 5.5±0.37µs 5.3±0.50µs +3.77%
Object Creation (Full) 348.3±43.87µs 400.1±138.53µs -12.95%
RegExp (Execution) 14.9±0.76µs 14.1±1.08µs +5.67%
RegExp (Full) 370.9±33.27µs 381.0±55.18µs -2.65%
RegExp Literal (Execution) 15.5±3.84µs 14.4±1.84µs +7.64%
RegExp Literal (Full) 369.5±34.32µs 385.6±74.37µs -4.18%
RegExp Literal Creation (Execution) 10.7±0.39µs 10.1±0.97µs +5.94%
RegExp Literal Creation (Full) 361.1±59.38µs 395.4±66.48µs -8.67%
Static Object Property Access (Execution) 5.8±0.62µs 5.6±0.75µs +3.57%
Static Object Property Access (Full) 348.7±31.97µs 392.5±43.11µs -11.16%
String Object Access (Execution) 8.3±0.63µs 8.6±0.87µs -3.49%
String Object Access (Full) 353.2±22.03µs 375.6±54.64µs -5.96%
String comparison (Execution) 7.2±0.44µs 7.2±1.70µs 0.00%
String comparison (Full) 355.8±28.05µs 376.3±48.60µs -5.45%
String concatenation (Execution) 6.4±3.70µs 5.6±0.67µs +14.29%
String concatenation (Full) 347.8±21.95µs 358.9±58.89µs -3.09%
String copy (Execution) 4.9±0.38µs 4.8±1.13µs +2.08%
String copy (Full) 340.3±32.43µs 362.3±45.57µs -6.07%
Symbols (Execution) 4.3±0.17µs 4.2±1.26µs +2.38%
Symbols (Full) 322.4±16.35µs 361.6±73.02µs -10.84%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants