Skip to content

Inline struct/tuple returns #10

@N00byEdge

Description

@N00byEdge

Currently, you can only make normal structs that can be returned through RLS and not normal returns.
We should add declarations for inline structs which can be returned through (multiple) registers but not RLS:

const T = struct inline {
  a: u64,
  b: u64,
};

fn f() T {
  return .{
    .a = 5,
    .b = 3,
  };
}

->

f:
  mov rax, 5
  mov rbx, 3
  ret

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions