-
-
Notifications
You must be signed in to change notification settings - Fork 413
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 static
shapes
#2859
Implement static
shapes
#2859
Conversation
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #2859 +/- ##
==========================================
- Coverage 50.05% 49.69% -0.37%
==========================================
Files 446 449 +3
Lines 45975 46081 +106
==========================================
- Hits 23015 22899 -116
- Misses 22960 23182 +222
|
be6ad76
to
bd062f8
Compare
5c0899c
to
20da877
Compare
bd062f8
to
a62710c
Compare
20da877
to
01093b9
Compare
01b71f4
to
b26077c
Compare
Benchmark for eccfcb7Click to view benchmark
|
Benchmark for e827a78Click to view benchmark
|
Benchmark for adb6db9Click to view benchmark
|
Benchmark for 2395e3eClick to view benchmark
|
34b540d
to
72be6bd
Compare
Benchmark for 5743b5cClick to view benchmark
|
Benchmark for a318abbClick to view benchmark
|
Benchmark for 155f3bcClick to view benchmark
|
88ff904
to
bfaea4c
Compare
Benchmark for a3ab305Click to view benchmark
|
Benchmark for 4b86e61Click to view benchmark
|
Benchmark for ec9310aClick to view benchmark
|
Benchmark for 27bc506Click to view benchmark
|
44c0d10
to
ef18364
Compare
Benchmark for 97d3899Click to view benchmark
|
Benchmark for 97c7fd2Click to view benchmark
|
Benchmark for ad894dbClick to view benchmark
|
5fdf50e
to
7907c49
Compare
Benchmark for dae4b43Click to view benchmark
|
Benchmark for 01cc3f8Click to view benchmark
|
dbff374
to
263e9e0
Compare
Benchmark for 0be614bClick to view benchmark
|
Finished converting all the builtins to have static shapes, in total eliminated |
Benchmark for ec5e9ffClick to view benchmark
|
Benchmark for 5a72694Click to view benchmark
|
Blocked on #2767, since it seems like they're both a bit incompatible with each other. @HalidOdat will determine if this should be closed after finishing the implementation of the other PR. |
After doing some experimentation with the merged in inline cache I don't think it's worth doing, so closing this! |
Depends on #2723This Pull Request fixes/closes #2813 .
This PR is currently a WIP that implements #2813 , It currently
only is applied tois applied toJSON
builtin object (because it has less properties, so easier to test with).someall builtins objects.This points to #2723 for easier review, will make it point to main one #2723 is merged!Main changes:
boa_builtins
crate that generates and stores the static shapes (this is done becausephf!
macro does not work with customenum
s). Maybe this is a good opportunity to try to split builtins fromboa_engine
crate to reduce compilation times.static
that can be shared across realms (and threads). I had to put the prototype in storage properties atlen() - 1
(last property), could also store it in the first but it would make Direct array length access #2796 a bit harder and when converting to unique on shape change we would have to shift the storage elements instead of a singlepop
(will have to do further research on what would be the best choice)Vec
realloc)Using the debug object we can see that the static shape of
JSON
object is shared betweenRealm
s.This may be a good way to identify if a global builtin object has been modified, which could allow us some interesting optimizations in some cases.
TODO:
unique
)unique
)unique
)unique
)188
unique shapes per realm, replaced with reusable static shapes)1
)1
)1
)2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )2
, constructor, prototype )14
, constructor, prototype ) - Share the sameNATIVE_ERROR
static shape2
, constructor, prototype )2
, constructor, prototype )