mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
allow no_data return value
This commit is contained in:
parent
2e7f53fe4a
commit
9f8077c3a3
2 changed files with 5 additions and 3 deletions
|
@ -1112,7 +1112,7 @@ impl<
|
|||
}
|
||||
|
||||
/// Specifies a no data exists.
|
||||
pub fn no_data_arg(&mut self, sym: &Symbol) {
|
||||
pub fn no_data(&mut self, sym: &Symbol) {
|
||||
self.symbol_storage_map.insert(*sym, NoData);
|
||||
}
|
||||
|
||||
|
|
|
@ -406,7 +406,9 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Syste
|
|||
single_register_layouts!() => {
|
||||
internal_error!("single register layouts are not complex symbols");
|
||||
}
|
||||
x if layout_interner.stack_size(x) == 0 => {}
|
||||
x if layout_interner.stack_size(x) == 0 => {
|
||||
storage_manager.no_data(sym);
|
||||
}
|
||||
x if !Self::returns_via_arg_pointer(layout_interner, &x) => {
|
||||
let size = layout_interner.stack_size(*layout);
|
||||
let offset = storage_manager.claim_stack_area(sym, size);
|
||||
|
@ -663,7 +665,7 @@ impl X64_64SystemVLoadArgs {
|
|||
single_register_integers!() => self.load_arg_general(storage_manager, sym),
|
||||
single_register_floats!() => self.load_arg_float(storage_manager, sym),
|
||||
_ if stack_size == 0 => {
|
||||
storage_manager.no_data_arg(&sym);
|
||||
storage_manager.no_data(&sym);
|
||||
}
|
||||
_ if stack_size > 16 => {
|
||||
// TODO: Double check this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue