authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-11-27 20:39:23-08:00
committergravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-11-27 20:39:23-08:00
logbc3094b278ebdce5f7f86224081a228495bc0dd6
treeb8390fbee7f9ff6c50c369673e143bcb47996ba0
parent6cf01a679f1950f1393d9245048a62500e3869c1
signaturelock-open Commit is signed but in an unrecognized format.

sema: make `++` and `**` return immutable pointers


1 files changed, 8 insertions(+), 2 deletions(-)

src/Sema.zig+8-2
...@@ -15226,7 +15226,10 @@ fn zirArrayCat(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -15226,7 +15226,10 @@ fn zirArrayCat(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
15226 if (ptr_addrspace) |ptr_as| {15226 if (ptr_addrspace) |ptr_as| {
15227 const alloc_ty = try pt.ptrTypeSema(.{15227 const alloc_ty = try pt.ptrTypeSema(.{
15228 .child = result_ty.toIntern(),15228 .child = result_ty.toIntern(),
15229 .flags = .{ .address_space = ptr_as },15229 .flags = .{
15230 .address_space = ptr_as,
15231 .is_const = true,
15232 },
15230 });15233 });
15231 const alloc = try block.addTy(.alloc, alloc_ty);15234 const alloc = try block.addTy(.alloc, alloc_ty);
15232 const elem_ptr_ty = try pt.ptrTypeSema(.{15235 const elem_ptr_ty = try pt.ptrTypeSema(.{
...@@ -15558,7 +15561,10 @@ fn zirArrayMul(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -15558,7 +15561,10 @@ fn zirArrayMul(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
15558 if (ptr_addrspace) |ptr_as| {15561 if (ptr_addrspace) |ptr_as| {
15559 const alloc_ty = try pt.ptrTypeSema(.{15562 const alloc_ty = try pt.ptrTypeSema(.{
15560 .child = result_ty.toIntern(),15563 .child = result_ty.toIntern(),
15561 .flags = .{ .address_space = ptr_as },15564 .flags = .{
15565 .address_space = ptr_as,
15566 .is_const = true,
15567 },
15562 });15568 });
15563 const alloc = try block.addTy(.alloc, alloc_ty);15569 const alloc = try block.addTy(.alloc, alloc_ty);
15564 const elem_ptr_ty = try pt.ptrTypeSema(.{15570 const elem_ptr_ty = try pt.ptrTypeSema(.{