Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix correctness issues in sizeof tfunc
The `Core.sizeof` function can take either a value or a type, which can be a bit confusing in the tfunc, because the tfunc operates on the types of the values passed to the builtin. In particular, we were incorrectly returning Const(16) (on 64bit) for sizeof_tfunc(UnionAll), because it was treating it the asme as `sizeof_tfunc(Const(UnionAll))`. Try to clean that up as well as fixing a similar confusion in the nothrow version of this function. Lastly, we had a similar fast path in codegen, which would try to inline the actual size for a constant datatype argument. For codegen, just rm that whole code path, since it should have no more information than inference and figuring it out in inference exposes strictly more optimization opportunities. Fixes #36710
- Loading branch information