Commit 694173b 1 parent 77b1f16 commit 694173b Copy full SHA for 694173b
File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ impl Linker {
53
53
// Critically, std/core.sus MUST be the first file to be loaded into the linker. Otherwise the IDs don't point to the correct objects
54
54
assert_eq ! ( self . types[ get_builtin_type!( "int" ) ] . link_info. name, "int" ) ;
55
55
assert_eq ! ( self . types[ get_builtin_type!( "bool" ) ] . link_info. name, "bool" ) ;
56
+ assert_eq ! (
57
+ self . types[ get_builtin_type!( "float" ) ] . link_info. name,
58
+ "float"
59
+ ) ;
56
60
57
61
assert_eq ! (
58
62
self . constants[ get_builtin_const!( "true" ) ] . link_info. name,
Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ impl ConcreteType {
98
98
32 // TODO concrete int sizes
99
99
} else if type_ref. id == get_builtin_type ! ( "bool" ) {
100
100
1
101
+ } else if type_ref. id == get_builtin_type ! ( "float" ) {
102
+ 32
101
103
} else {
102
104
println ! ( "TODO Named Structs Size" ) ;
103
105
1 // todo!() // Named structs are not implemented yet
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ __builtin__ struct bool {}
28
28
// An integer of variable size. Right now it's not implemented yet, so this is just a 32-bit int.
29
29
__builtin__ struct int {}
30
30
31
+ // Single precision IEEE 32-bit float. Operators are definted externally, but it's defined here for convenience.
32
+ __builtin__ struct float {}
33
+
31
34
// For intentionally triggering an ICE for debugging. It is a constant that crashes the compiler when it is evaluated
32
35
__builtin__ const bool __crash_compiler {}
33
36
You can’t perform that action at this time.
0 commit comments