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

src: use AliasedBuffer for TickInfo #17881

Closed

Conversation

apapirovski
Copy link
Member

Instead of creating a v8::ArrayBuffer in SetupNextTick, instead just make TickInfo use an AliasedBuffer. The reason it wasn't already doing this is that the code there predates the introduction of AliasedBuffer.

Also slight clean up around the naming of the "scheduled" flag.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

@apapirovski apapirovski added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Dec 27, 2017
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. process Issues and PRs related to the process subsystem. labels Dec 27, 2017
@addaleax
Copy link
Member

Sorry, the commits I just landed might have given you an immediate merge conflict? :/

@apapirovski apapirovski force-pushed the patch-tickinfo-aliasedbuffer branch from aefac2c to b31bf75 Compare December 27, 2017 18:59
@apapirovski
Copy link
Member Author

@addaleax No worries, just rebased.

CI: https://ci.nodejs.org/job/node-test-pull-request/12317/

@apapirovski apapirovski changed the title src: use AliasedBufer for TickInfo src: use AliasedBuffer for TickInfo Dec 27, 2017
@apapirovski apapirovski force-pushed the patch-tickinfo-aliasedbuffer branch from b31bf75 to 26fdc0f Compare December 27, 2017 19:03
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 27, 2017
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scheduled -> hasScheduled thing is a stylistic change and should arguably be done in a separate commit.

I'm not fond of returning mutable references but I know other places that use AliasedBuffer do the same thing. We should rectify that sometime soon.

Copy link
Contributor

@XadillaX XadillaX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apapirovski
Copy link
Member Author

Landed in 5846786

@apapirovski apapirovski deleted the patch-tickinfo-aliasedbuffer branch December 31, 2017 00:14
apapirovski added a commit that referenced this pull request Dec 31, 2017
PR-URL: #17881
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@MylesBorins
Copy link
Contributor

This does not land cleanly on v9.x, could it be backproted?

@TimothyGu TimothyGu removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 13, 2018
apapirovski added a commit to apapirovski/node that referenced this pull request Feb 26, 2018
PR-URL: nodejs#17881
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
addaleax pushed a commit that referenced this pull request Feb 26, 2018
Backport-PR-URL: #19006
PR-URL: #17881
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
addaleax pushed a commit that referenced this pull request Feb 26, 2018
Backport-PR-URL: #19006
PR-URL: #17881
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 26, 2018
Backport-PR-URL: #19006
PR-URL: #17881
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@addaleax addaleax mentioned this pull request Feb 27, 2018
@MylesBorins
Copy link
Contributor

Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants