-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an
is_reference_type::<T>()
builtin. (#1121)
Returns false for copy types (unit, bool, byte, uint), true otherwise. This is a temporary measure to assist in getting the stdlib richer now, i.e., to make decisions regarding ASM block instructions based on generic types, but isn't reliable once we have optimisations which could invalidate compile time assertions like this. A 'reference type' may not always be used by reference if optimisations allow a value to be passed by value. `is_reference_type::<T>()` closely resembles `size_of::<T>()` in both syntax and semantics and so I've combined them into a builtin 'type property' expression and split the `size_of_value(expr)` expression into its own thing.
- Loading branch information
Showing
16 changed files
with
322 additions
and
145 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.