[v10.x-backport] module: use compileFunction over Module.wrap#27124
Closed
guybedford wants to merge 2 commits intonodejs:v10.x-stagingfrom
Closed
[v10.x-backport] module: use compileFunction over Module.wrap#27124guybedford wants to merge 2 commits intonodejs:v10.x-stagingfrom
guybedford wants to merge 2 commits intonodejs:v10.x-stagingfrom
Conversation
Use vm.compileFunction (which is a binding for v8::CompileFunctionInContext) instead of Module.wrap internally in Module._compile for the cjs loader. Fixes: nodejs#17396 PR-URL: nodejs#21573 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: nodejs#21573 Fixes: nodejs#17396 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Collaborator
Contributor
Author
|
This should probably go along with #26579. |
Contributor
Author
|
//cc @ryzokuken |
Contributor
|
@guybedford 👋 thanks for putting this work in, this will help make coverage a much more consistent experience once Node 8 cycles out; I'll try to do some end to end testing for you this week. |
Contributor
|
@nodejs/releasers 👋 it would be awesome to get this back-ported, as it makes the behavior between Node 10 and newer Node consistent, in relation to byte offsets (really valuable for coverage). |
BethGriggs
approved these changes
Apr 30, 2019
BethGriggs
pushed a commit
that referenced
this pull request
Apr 30, 2019
Use vm.compileFunction (which is a binding for v8::CompileFunctionInContext) instead of Module.wrap internally in Module._compile for the cjs loader. Fixes: #17396 Backport-PR-URL: #27124 PR-URL: #21573 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Apr 30, 2019
Backport-PR-URL: #27124 PR-URL: #21573 Fixes: #17396 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Member
|
Landed on v10.x-staging. |
Contributor
|
Thanks @guybedford and @BethGriggs |
Contributor
|
@BethGriggs @guybedford I am very excited about this \o/ |
This was referenced May 1, 2019
BethGriggs
pushed a commit
that referenced
this pull request
May 10, 2019
Use vm.compileFunction (which is a binding for v8::CompileFunctionInContext) instead of Module.wrap internally in Module._compile for the cjs loader. Fixes: #17396 Backport-PR-URL: #27124 PR-URL: #21573 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
May 10, 2019
Backport-PR-URL: #27124 PR-URL: #21573 Fixes: #17396 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins
added a commit
to MylesBorins/node
that referenced
this pull request
May 16, 2019
MylesBorins
added a commit
that referenced
this pull request
May 16, 2019
Refs: #27124 Refs: #25112 PR-URL: #27727 Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
May 16, 2019
Use vm.compileFunction (which is a binding for v8::CompileFunctionInContext) instead of Module.wrap internally in Module._compile for the cjs loader. Fixes: #17396 Backport-PR-URL: #27124 PR-URL: #21573 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
May 16, 2019
Backport-PR-URL: #27124 PR-URL: #21573 Fixes: #17396 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins
added a commit
that referenced
this pull request
May 16, 2019
Refs: #27124 Refs: #25112 PR-URL: #27727 Reviewed-By: Anna Henningsen <[email protected]>
This was referenced Jan 12, 2022
This was referenced Jan 12, 2022
This was referenced Feb 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This backports PR #21573, which replaces the CJS wrapper with the use of compileFunction.
The major benefit of this is that it will allow us to use native v8 coverage support in the 10.x branch.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes