-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
lazy builtins #3973
base: main
Are you sure you want to change the base?
lazy builtins #3973
Conversation
1c4cc00
to
c52c687
Compare
cf4a379
to
d697af1
Compare
9c5fb9f
to
e1ed8a8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3973 +/- ##
==========================================
+ Coverage 47.24% 52.89% +5.65%
==========================================
Files 476 486 +10
Lines 46892 47127 +235
==========================================
+ Hits 22154 24928 +2774
+ Misses 24738 22199 -2539 ☔ View full report in Codecov by Sentry. |
Test262 conformance changes
Broken tests (26):
New panics (2):
|
Some tests regressed thanks to the changes. Is it potentially a typo/copypaste error, or do we need to go back to the drawing board? |
I'll hold my review until it's up to date with |
…eping for now. Exotic objects need a specific Lazy equivalent so we can identify them in brand checks
) | ||
} | ||
|
||
pub(crate) fn native_function_construct_inner( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there's been some (minor) performance regressions with this PR and I think its related to this, I'm going to assume because its not [inline]
'd this is now calling 2 functions instead of 1, and because its on a hotpath its actually slowed it down. Ill try adding the inline attribute and see if thats what it is, but leaving this here as a reminder.
Lazy Builtins
So, this creates 2 new data structs which are used inside of JS Objects.
LazyBuiltIn
andLazyPrototype
.Instead of calling initialize on array for example, we will setup array with a constructor that has a LazyBuiltin object and a prototype which lazy a LazyPrototype. If any properties or the constructor itself is called then we will call
init
at that point.For now I've started with:
I also updated the VSCode task to always choose the
debug/script.js
path, as it makes debugging much faster