-
Notifications
You must be signed in to change notification settings - Fork 0
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
43 constant pool vm #47
Conversation
f2a53a1
to
45bbc57
Compare
throw std::invalid_argument(std::string{"Bad input stream"}); | ||
} | ||
uint16_t constants = 0; | ||
static_assert(sizeof constants == 2); |
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.
remove it, please. it is better to check sizeof(constant) == sizeof(Immediate)
but when you make constant of type Immediate
it will be unnecessary.
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.
@c71n93 let's leave it. What if once we decide write number of constants to file in 4 bytes instead of 2, but immediate will still be 2 bytes. I leave this assert just for safety
Introduced Constant pool for i64 and f64