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(...@@ -9767,9 +9767,7 @@ fn analyzeSlice(
9767 return_elem_type,9767 return_elem_type,
9768 if (end_opt == .none) slice_sentinel else null,9768 if (end_opt == .none) slice_sentinel else null,
9769 0, // TODO alignment9769 0, // TODO alignment
9770 // TODO(Snektron) address space, should be inferred from the pointer type.9770 if (ptr_child.zigTypeTag() == .Pointer) ptr_child.ptrAddressSpace() else .generic,
9771 // TODO(Snektron) address space for slicing a local, should compute address space from context and architecture.
9772 .generic,
9773 0,9771 0,
9774 0,9772 0,
9775 !ptr_child.isConstPtr(),9773 !ptr_child.isConstPtr(),