mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Make Core.Float a class. Add missing builtins for float support. (#5932)
Add missing builtins for float compound assignment, for building a FloatType, and for converting a float literal to FloatType. Switch `Core.Float` to being a class and add impls for the various floating-point operators. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com>
This commit is contained in:
co-authored by
google-labs-jules[bot]
Carbon Infra Bot
parent
f616817b71
commit
694c00c7eb
@@ -125,8 +125,8 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: %ptr.1d1: type = ptr_type Core.IntLiteral [concrete]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
||||
// CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete]
|
||||
// CHECK:STDOUT: %float: f64 = float_value 1 [concrete]
|
||||
// CHECK:STDOUT: %ptr.ef1: type = ptr_type f64 [concrete]
|
||||
// CHECK:STDOUT: %float: Core.FloatLiteral = float_value 1 [concrete]
|
||||
// CHECK:STDOUT: %ptr.5f5: type = ptr_type Core.FloatLiteral [concrete]
|
||||
// CHECK:STDOUT: %ptr.a45: type = ptr_type String [concrete]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [concrete]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
|
||||
@@ -235,8 +235,8 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: %addr.loc24: %ptr.1d1 = addr_of <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %addr.loc29: %ptr.bb2 = addr_of <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %float: f64 = float_value 1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %addr.loc34: %ptr.ef1 = addr_of <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %float: Core.FloatLiteral = float_value 1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %addr.loc34: %ptr.5f5 = addr_of <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [concrete = constants.%str]
|
||||
// CHECK:STDOUT: %addr.loc39: %ptr.a45 = addr_of <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
|
||||
Reference in New Issue
Block a user