FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: simplify UnionBytes by bnoordhuis · Pull Request #29116 · nodejs/node · GitHub

/ node Public

src: simplify UnionBytes - #29116

Closed
bnoordhuis wants to merge 1 commit into
nodejs:masterfrom
bnoordhuis:simplify-unionbytes
Closed

src: simplify UnionBytes#29116
bnoordhuis wants to merge 1 commit into
nodejs:masterfrom
bnoordhuis:simplify-unionbytes

Conversation

Copy link
Copy Markdown
Member

Before this commit it was using a tagged union to store the one-byte and
two-byte pointers.

From a sizeof(UnionBytes) perspective that makes no difference - there
is a hole between the tag and the union - and it makes the code just a
little harder to reason about, IMO.

Before this commit it was using a tagged union to store the one-byte and
two-byte pointers.

From a `sizeof(UnionBytes)` perspective that makes no difference - there
is a hole between the tag and the union - and it makes the code just a
little harder to reason about, IMO.
nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Aug 14, 2019

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Member Author

The test failure is #27611.

Copy link
Copy Markdown
Collaborator

Trott commented Aug 16, 2019

Copy link
Copy Markdown
Member

Landed in 841df6a

Trott closed this Aug 16, 2019
Trott pushed a commit that referenced this pull request Aug 16, 2019
Before this commit it was using a tagged union to store the one-byte and
two-byte pointers.

From a `sizeof(UnionBytes)` perspective that makes no difference - there
is a hole between the tag and the union - and it makes the code just a
little harder to reason about, IMO.

PR-URL: #29116
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request Aug 19, 2019
Before this commit it was using a tagged union to store the one-byte and
two-byte pointers.

From a `sizeof(UnionBytes)` perspective that makes no difference - there
is a hole between the tag and the union - and it makes the code just a
little harder to reason about, IMO.

PR-URL: #29116
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL