authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-08-27 02:48:29+02:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-09-20 02:29:04+02:00
loge77fcf17301ad5a68e84cb598984a526cc356621
tree76f0b3a4649daa0fb088d0cccc2cab9b56a1adae
parent8672f2696f20e8989d42f69adbe09edfe5cd9332

Address Spaces: Implement right address space for slicing


1 files changed, 1 insertions(+), 3 deletions(-)

src/Sema.zig+1-3
......@@ -9767,9 +9767,7 @@ fn analyzeSlice(
97679767 return_elem_type,
97689768 if (end_opt == .none) slice_sentinel else null,
97699769 0, // TODO alignment
9770 // TODO(Snektron) address space, should be inferred from the pointer type.
9771 // TODO(Snektron) address space for slicing a local, should compute address space from context and architecture.
9772 .generic,
9770 if (ptr_child.zigTypeTag() == .Pointer) ptr_child.ptrAddressSpace() else .generic,
97739771 0,
97749772 0,
97759773 !ptr_child.isConstPtr(),