GeezerVison is showing github.com — GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit. by markshannon · Pull Request #100223 · python/cpython
Conversation
markshannon
commented
Dec 13, 2022
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Replaces
typedef uint16_t _Py_CODEUNIT;
which omits important details and is arguably wrong, with
typedef union {
int16_t cache;
struct {
uint8_t opcode;
uint8_t oparg;
};
} _Py_CODEUNIT;
which is clearer both to me and to the compiler.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
markshannon
changed the title
Redefine _Py_CODEUNIT as a union to clarify structure of code unit.
GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit.
Dec 13, 2022
|
|
uint16_t cache;
|
|
|
struct {
|
|
|
uint8_t opcode;
|
|
|
uint8_t oparg;
|
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.
Is the idea to later add more opargs here?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Up to you.
I guess it depends on how you want to align the instructions.
16 bit alignment
typedef union {
int16_t cache;
struct {
uint8_t opcode;
uint8_t oparg0;
};
struct {
uint8_t oparg1;
uint8_t oparg2;
};
} _Py_CODEUNIT;
32 bit alignment
typedef union {
int32_t cache;
struct {
uint8_t opcode;
uint8_t oparg0;
uint8_t oparg1;
uint8_t oparg2;
};
} _Py_CODEUNIT;
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Closing and reopening to kick CI
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable Clang Installed 3.x has failed when building commit 6997e77.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/350/builds/2887) and take a look at the build logs.
- Check if the failure is related to this commit (6997e77) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/350/builds/2887
Summary of the results of the build (if available):
Click to see traceback logs
remote: Enumerating objects: 40226, done.
remote: Counting objects: 0% (1/25295)
remote: Counting objects: 1% (253/25295)
remote: Counting objects: 2% (506/25295)
remote: Counting objects: 3% (759/25295)
remote: Counting objects: 4% (1012/25295)
remote: Counting objects: 5% (1265/25295)
remote: Counting objects: 6% (1518/25295)
remote: Counting objects: 7% (1771/25295)
remote: Counting objects: 8% (2024/25295)
remote: Counting objects: 9% (2277/25295)
remote: Counting objects: 10% (2530/25295)
remote: Counting objects: 11% (2783/25295)
remote: Counting objects: 12% (3036/25295)
remote: Counting objects: 13% (3289/25295)
remote: Counting objects: 14% (3542/25295)
remote: Counting objects: 15% (3795/25295)
remote: Counting objects: 16% (4048/25295)
remote: Counting objects: 17% (4301/25295)
remote: Counting objects: 18% (4554/25295)
remote: Counting objects: 19% (4807/25295)
remote: Counting objects: 20% (5059/25295)
remote: Counting objects: 21% (5312/25295)
remote: Counting objects: 22% (5565/25295)
remote: Counting objects: 23% (5818/25295)
remote: Counting objects: 24% (6071/25295)
remote: Counting objects: 25% (6324/25295)
remote: Counting objects: 26% (6577/25295)
remote: Counting objects: 27% (6830/25295)
remote: Counting objects: 28% (7083/25295)
remote: Counting objects: 29% (7336/25295)
remote: Counting objects: 30% (7589/25295)
remote: Counting objects: 31% (7842/25295)
remote: Counting objects: 32% (8095/25295)
remote: Counting objects: 33% (8348/25295)
remote: Counting objects: 34% (8601/25295)
remote: Counting objects: 35% (8854/25295)
remote: Counting objects: 36% (9107/25295)
remote: Counting objects: 37% (9360/25295)
remote: Counting objects: 38% (9613/25295)
remote: Counting objects: 39% (9866/25295)
remote: Counting objects: 40% (10118/25295)
remote: Counting objects: 41% (10371/25295)
remote: Counting objects: 42% (10624/25295)
remote: Counting objects: 43% (10877/25295)
remote: Counting objects: 44% (11130/25295)
remote: Counting objects: 45% (11383/25295)
remote: Counting objects: 46% (11636/25295)
remote: Counting objects: 47% (11889/25295)
remote: Counting objects: 48% (12142/25295)
remote: Counting objects: 49% (12395/25295)
remote: Counting objects: 50% (12648/25295)
remote: Counting objects: 51% (12901/25295)
remote: Counting objects: 52% (13154/25295)
remote: Counting objects: 53% (13407/25295)
remote: Counting objects: 54% (13660/25295)
remote: Counting objects: 55% (13913/25295)
remote: Counting objects: 56% (14166/25295)
remote: Counting objects: 57% (14419/25295)
remote: Counting objects: 58% (14672/25295)
remote: Counting objects: 59% (14925/25295)
remote: Counting objects: 60% (15177/25295)
remote: Counting objects: 61% (15430/25295)
remote: Counting objects: 62% (15683/25295)
remote: Counting objects: 63% (15936/25295)
remote: Counting objects: 64% (16189/25295)
remote: Counting objects: 65% (16442/25295)
remote: Counting objects: 66% (16695/25295)
remote: Counting objects: 67% (16948/25295)
remote: Counting objects: 68% (17201/25295)
remote: Counting objects: 69% (17454/25295)
remote: Counting objects: 70% (17707/25295)
remote: Counting objects: 71% (17960/25295)
remote: Counting objects: 72% (18213/25295)
remote: Counting objects: 73% (18466/25295)
remote: Counting objects: 74% (18719/25295)
remote: Counting objects: 75% (18972/25295)
remote: Counting objects: 76% (19225/25295)
remote: Counting objects: 77% (19478/25295)
remote: Counting objects: 78% (19731/25295)
remote: Counting objects: 79% (19984/25295)
remote: Counting objects: 80% (20236/25295)
remote: Counting objects: 81% (20489/25295)
remote: Counting objects: 82% (20742/25295)
remote: Counting objects: 83% (20995/25295)
remote: Counting objects: 84% (21248/25295)
remote: Counting objects: 85% (21501/25295)
remote: Counting objects: 86% (21754/25295)
remote: Counting objects: 87% (22007/25295)
remote: Counting objects: 88% (22260/25295)
remote: Counting objects: 89% (22513/25295)
remote: Counting objects: 90% (22766/25295)
remote: Counting objects: 91% (23019/25295)
remote: Counting objects: 92% (23272/25295)
remote: Counting objects: 93% (23525/25295)
remote: Counting objects: 94% (23778/25295)
remote: Counting objects: 95% (24031/25295)
remote: Counting objects: 96% (24284/25295)
remote: Counting objects: 97% (24537/25295)
remote: Counting objects: 98% (24790/25295)
remote: Counting objects: 99% (25043/25295)
remote: Counting objects: 100% (25295/25295)
remote: Counting objects: 100% (25295/25295), done.
remote: Compressing objects: 0% (1/11746)
remote: Compressing objects: 1% (118/11746)
remote: Compressing objects: 2% (235/11746)
remote: Compressing objects: 2% (297/11746)
remote: Compressing objects: 3% (353/11746)
remote: Compressing objects: 4% (470/11746)
remote: Compressing objects: 5% (588/11746)
remote: Compressing objects: 6% (705/11746)
remote: Compressing objects: 7% (823/11746)
remote: Compressing objects: 7% (928/11746)
remote: Compressing objects: 8% (940/11746)
remote: Compressing objects: 9% (1058/11746)
remote: Compressing objects: 10% (1175/11746)
remote: Compressing objects: 11% (1293/11746)
remote: Compressing objects: 12% (1410/11746)
remote: Compressing objects: 13% (1527/11746)
remote: Compressing objects: 14% (1645/11746)
remote: Compressing objects: 14% (1647/11746)
remote: Compressing objects: 15% (1762/11746)
remote: Compressing objects: 16% (1880/11746)
remote: Compressing objects: 17% (1997/11746)
remote: Compressing objects: 18% (2115/11746)
remote: Compressing objects: 19% (2232/11746)
remote: Compressing objects: 20% (2350/11746)
remote: Compressing objects: 21% (2467/11746)
remote: Compressing objects: 22% (2585/11746)
remote: Compressing objects: 23% (2702/11746)
remote: Compressing objects: 24% (2820/11746)
remote: Compressing objects: 25% (2937/11746)
remote: Compressing objects: 26% (3054/11746)
remote: Compressing objects: 27% (3172/11746)
remote: Compressing objects: 27% (3247/11746)
remote: Compressing objects: 28% (3289/11746)
remote: Compressing objects: 29% (3407/11746)
remote: Compressing objects: 30% (3524/11746)
remote: Compressing objects: 31% (3642/11746)
remote: Compressing objects: 32% (3759/11746)
remote: Compressing objects: 33% (3877/11746)
remote: Compressing objects: 34% (3994/11746)
remote: Compressing objects: 35% (4112/11746)
remote: Compressing objects: 36% (4229/11746)
remote: Compressing objects: 37% (4347/11746)
remote: Compressing objects: 38% (4464/11746)
remote: Compressing objects: 39% (4581/11746)
remote: Compressing objects: 40% (4699/11746)
remote: Compressing objects: 41% (4816/11746)
remote: Compressing objects: 42% (4934/11746)
remote: Compressing objects: 43% (5051/11746)
remote: Compressing objects: 44% (5169/11746)
remote: Compressing objects: 45% (5286/11746)
remote: Compressing objects: 46% (5404/11746)
remote: Compressing objects: 47% (5521/11746)
remote: Compressing objects: 48% (5639/11746)
remote: Compressing objects: 49% (5756/11746)
remote: Compressing objects: 50% (5873/11746)
remote: Compressing objects: 51% (5991/11746)
remote: Compressing objects: 52% (6108/11746)
remote: Compressing objects: 53% (6226/11746)
remote: Compressing objects: 54% (6343/11746)
remote: Compressing objects: 55% (6461/11746)
remote: Compressing objects: 56% (6578/11746)
remote: Compressing objects: 57% (6696/11746)
remote: Compressing objects: 58% (6813/11746)
remote: Compressing objects: 59% (6931/11746)
remote: Compressing objects: 60% (7048/11746)
remote: Compressing objects: 61% (7166/11746)
remote: Compressing objects: 62% (7283/11746)
remote: Compressing objects: 63% (7400/11746)
remote: Compressing objects: 64% (7518/11746)
remote: Compressing objects: 65% (7635/11746)
remote: Compressing objects: 66% (7753/11746)
remote: Compressing objects: 67% (7870/11746)
remote: Compressing objects: 68% (7988/11746)
remote: Compressing objects: 69% (8105/11746)
remote: Compressing objects: 70% (8223/11746)
remote: Compressing objects: 71% (8340/11746)
remote: Compressing objects: 72% (8458/11746)
remote: Compressing objects: 73% (8575/11746)
remote: Compressing objects: 74% (8693/11746)
remote: Compressing objects: 75% (8810/11746)
remote: Compressing objects: 76% (8927/11746)
remote: Compressing objects: 77% (9045/11746)
remote: Compressing objects: 78% (9162/11746)
remote: Compressing objects: 79% (9280/11746)
remote: Compressing objects: 80% (9397/11746)
remote: Compressing objects: 81% (9515/11746)
remote: Compressing objects: 82% (9632/11746)
remote: Compressing objects: 83% (9750/11746)
remote: Compressing objects: 84% (9867/11746)
remote: Compressing objects: 85% (9985/11746)
remote: Compressing objects: 86% (10102/11746)
remote: Compressing objects: 87% (10220/11746)
remote: Compressing objects: 88% (10337/11746)
remote: Compressing objects: 89% (10454/11746)
remote: Compressing objects: 90% (10572/11746)
remote: Compressing objects: 91% (10689/11746)
remote: Compressing objects: 92% (10807/11746)
remote: Compressing objects: 93% (10924/11746)
remote: Compressing objects: 94% (11042/11746)
remote: Compressing objects: 95% (11159/11746)
remote: Compressing objects: 96% (11277/11746)
remote: Compressing objects: 97% (11394/11746)
remote: Compressing objects: 98% (11512/11746)
remote: Compressing objects: 99% (11629/11746)
remote: Compressing objects: 100% (11746/11746)
remote: Compressing objects: 100% (11746/11746), done.
Receiving objects: 0% (1/40226)
fatal: write error: No space left on device
fatal: fetch-pack: invalid index-pack output
chmod: cannot access 'target/': No such file or directory
make: *** No rule to make target 'distclean'. Stop.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Buildbot has run out of storage
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|