mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Merge remote-tracking branch 'origin/trunk' into layout-builtin-numbers-refactor
This commit is contained in:
commit
f96d60a13e
9 changed files with 108 additions and 46 deletions
|
@ -277,6 +277,7 @@ impl<'a> WasmBackend<'a> {
|
|||
location,
|
||||
size,
|
||||
alignment_bytes,
|
||||
..
|
||||
} => {
|
||||
let (from_ptr, from_offset) =
|
||||
location.local_and_offset(self.storage.stack_frame_pointer);
|
||||
|
@ -623,6 +624,21 @@ impl<'a> WasmBackend<'a> {
|
|||
}
|
||||
|
||||
StoredValue::StackMemory { location, .. } => match lit {
|
||||
Literal::Decimal(decimal) => {
|
||||
let (local_id, offset) =
|
||||
location.local_and_offset(self.storage.stack_frame_pointer);
|
||||
|
||||
let lower_bits = decimal.0 as i64;
|
||||
let upper_bits = (decimal.0 >> 64) as i64;
|
||||
|
||||
self.code_builder.get_local(local_id);
|
||||
self.code_builder.i64_const(lower_bits);
|
||||
self.code_builder.i64_store(Align::Bytes8, offset);
|
||||
|
||||
self.code_builder.get_local(local_id);
|
||||
self.code_builder.i64_const(upper_bits);
|
||||
self.code_builder.i64_store(Align::Bytes8, offset + 8);
|
||||
}
|
||||
Literal::Str(string) => {
|
||||
let (local_id, offset) =
|
||||
location.local_and_offset(self.storage.stack_frame_pointer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue