Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/wasm-encoder/src/core/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ impl Encode for Function {
pub struct Ieee32(pub(crate) u32);

impl Ieee32 {
/// Creates a new Ieee32
pub fn new(bits: u32) -> Self {
Ieee32 { 0: bits }
}

/// Gets the underlying bits of the 32-bit float.
pub fn bits(self) -> u32 {
self.0
Expand Down Expand Up @@ -337,6 +342,11 @@ impl Encode for Ieee32 {
pub struct Ieee64(pub(crate) u64);

impl Ieee64 {
/// Creates a new Ieee64
pub fn new(bits: u64) -> Self {
Ieee64 { 0: bits }
}

/// Gets the underlying bits of the 64-bit float.
pub fn bits(self) -> u64 {
self.0
Expand Down
Loading