Skip to content

src: revamp internal field count tracking - #31960

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:revamp-internal-field-count-tracking
Closed

src: revamp internal field count tracking#31960
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:revamp-internal-field-count-tracking

Conversation

@jasnell

Copy link
Copy Markdown
Member

Improved handling of internal field counts.

In a separate PR, it would likely be good to switch to use of utility functions that include DCHECKs for the InternalFieldCount().

/cc @bnoordhuis@addaleax

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

@nodejs-github-botnodejs-github-bot 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 Feb 26, 2020
@jasnelljasnell mentioned this pull request Feb 26, 2020
2 tasks
Comment threadsrc/async_wrap.cc Outdated
Comment threadsrc/base_object-inl.h Outdated
Comment threadsrc/cares_wrap.cc Outdated
@jasnell
jasnellforce-pushed the revamp-internal-field-count-tracking branch from 39f07a2 to ec851dcCompareFebruary 26, 2020 03:29
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, this is already much better than the current state of things and looks like it already exposes a few infidelities and at least one outright bug.

Comment threadsrc/async_wrap.cc Outdated
Comment threadsrc/base_object.h Outdated
Comment threadsrc/node_object_wrap.h Outdated
Comment threadsrc/stream_base.h Outdated
Comment threadsrc/stream_base.h Outdated
Comment threadsrc/stream_wrap.cc Outdated
Comment threadsrc/async_wrap.cc Outdated
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jasnelljasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 26, 2020

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, LGTM with suggestions.

Comment threadsrc/stream_base-inl.h Outdated
Comment threadsrc/stream_base.h Outdated
Comment threadsrc/stream_base.h Outdated

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Change suggested by bnoordhuis.
Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.
Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell
jasnellforce-pushed the revamp-internal-field-count-tracking branch from aa26581 to 9c6e9cdCompareFebruary 29, 2020 01:46
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

jasnell added a commit that referenced this pull request Mar 2, 2020
Change suggested by bnoordhuis.
Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #31960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@jasnell

jasnell commented Mar 2, 2020

Copy link
Copy Markdown
MemberAuthor

Landed in 0fac393

@jasnelljasnell closed this Mar 2, 2020
MylesBorins pushed a commit that referenced this pull request Mar 4, 2020
Change suggested by bnoordhuis.
Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #31960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Mar 4, 2020
@targos

Copy link
Copy Markdown
Member

Depends at least on #31569 to land on v12.x

@targostargos removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-blocked-v12.x labels Apr 25, 2020
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
Change suggested by bnoordhuis.
Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#31960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos pushed a commit that referenced this pull request Apr 28, 2020
Change suggested by bnoordhuis.
Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #31960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@targostargos mentioned this pull request May 2, 2020
Sign up for freeto 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 / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@jasnell@nodejs-github-bot@targos@mcollina@fhinkel@bnoordhuis@addaleax