Source File
type.go
Belonging Package
github.com/tetratelabs/wazero/internal/engine/wazevo/ssa
package ssatype Type byteconst (typeInvalid Type = iota// TODO: add 8, 16 bit types when it's needed for optimizations.// TypeI32 represents an integer type with 32 bits.TypeI32// TypeI64 represents an integer type with 64 bits.TypeI64// TypeF32 represents 32-bit floats in the IEEE 754.TypeF32// TypeF64 represents 64-bit floats in the IEEE 754.TypeF64// TypeV128 represents 128-bit SIMD vectors.TypeV128// -- Do not add new types after this line. ----typeEnd)// String implements fmt.Stringer.func ( Type) () ( string) {switch {case typeInvalid:return "invalid"case TypeI32:return "i32"case TypeI64:return "i64"case TypeF32:return "f32"case TypeF64:return "f64"case TypeV128:return "v128"default:panic(int())}}// IsInt returns true if the type is an integer type.func ( Type) () bool {return == TypeI32 || == TypeI64}// IsFloat returns true if the type is a floating point type.func ( Type) () bool {return == TypeF32 || == TypeF64}// Bits returns the number of bits required to represent the type.func ( Type) () byte {switch {case TypeI32, TypeF32:return 32case TypeI64, TypeF64:return 64case TypeV128:return 128default:panic(int())}}// Size returns the number of bytes required to represent the type.func ( Type) () byte {return .Bits() / 8}func ( Type) () bool {return == typeInvalid}// VecLane represents a lane in a SIMD vector.type VecLane byteconst (VecLaneInvalid VecLane = 1 + iotaVecLaneI8x16VecLaneI16x8VecLaneI32x4VecLaneI64x2VecLaneF32x4VecLaneF64x2)// String implements fmt.Stringer.func ( VecLane) () ( string) {switch {case VecLaneInvalid:return "invalid"case VecLaneI8x16:return "i8x16"case VecLaneI16x8:return "i16x8"case VecLaneI32x4:return "i32x4"case VecLaneI64x2:return "i64x2"case VecLaneF32x4:return "f32x4"case VecLaneF64x2:return "f64x2"default:panic(int())}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |