-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Refactor Context::run()
method
#3179
Conversation
ef099f0
to
c6a2ffc
Compare
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #3179 +/- ##
==========================================
- Coverage 50.41% 50.40% -0.01%
==========================================
Files 436 436
Lines 42343 42375 +32
==========================================
+ Hits 21346 21358 +12
- Misses 20997 21017 +20
|
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.
Nice changes. I just found a few typos.
- Remove async generator close from run - Remove promise capability from run - Remove promise capability check from call_internal - Remove generator creation from call_internal - Move promise capability creation to separate opcode
c6a2ffc
to
9a8398a
Compare
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.
Hey! This looks really great (especially with that other PR re calling the function with the stack🔥).
I just had one question but it could just be a stylistic/approach difference at it's core. Still figure I'd ask though 😄.
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.
Nice work on this!
Depends on #3059This simplifies
Context::run()
andJsObject::call_internal()
by taking some logic that is in specific types of functions (async generator or async function) and putting it in separate opcodes. This also has a performance benefit, since we only do those checks if we are using those features.This PR is related to refactoring calling in VM.
It changes the following:
Generator
,AsyncGeneratorClose
,CreatePromiseCapability
andCompletePromiseCapability
Context::run()
a simple loop that runs the opcodes, moves some logic to separate opcodes (resolving and rejecting promise capability and async generator close to separate opcode)JsObject::call_internal()
logic to separate opcodes (generator creation and returning promise)