-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Add Inspect to builtins #5747
Add Inspect to builtins #5747
Conversation
e345244
to
6b9592a
Compare
crates/compiler/mono/src/layout.rs
Outdated
Alias(Symbol::INSPECT_ELEM_WALKER | Symbol::INSPECT_KEY_VAL_WALKER, _, var, _) => Self::from_var(env, var), | ||
|
||
Alias(symbol, _, _, _) if symbol.is_builtin() => { | ||
unreachable!("Need to special-case this builtin, like the ones above: {:?}", symbol); |
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.
Turns out some builtins need to be handled differently from others. Before this change, we were getting errors where Inspect.ElemWalker
was specializing to have 3 symbols but 0 layouts because its layout was incorrectly being cached as a 0-arg thunk.
Added this unreachable!
so that if this happens again in the future, it will be clearer where to apply the fix!
Keep getting errors in the build ruby example on Json, and it doesn't tell me the name of the symbol, just the IdentId, which makes this really hard to track down. This approach works fine, it'll just be harder to debug the next time we run into a special case like ElemWalker.
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.
I added some comments, tests and upgraded something to basic-cli 0.5. The rest looked good!
No description provided.