| ... | ... | @@ -771,7 +771,7 @@ fn analyzeBodyInner( |
| 771 | 771 | .ptr_type => try sema.zirPtrType(block, inst), |
| 772 | 772 | .ptr_type_simple => try sema.zirPtrTypeSimple(block, inst), |
| 773 | 773 | .ref => try sema.zirRef(block, inst), |
| 774 | | .ret_err_value_code => try sema.zirRetErrValueCode(block, inst), |
| 774 | .ret_err_value_code => try sema.zirRetErrValueCode(inst), |
| 775 | 775 | .shr => try sema.zirShr(block, inst, .shr), |
| 776 | 776 | .shr_exact => try sema.zirShr(block, inst, .shr_exact), |
| 777 | 777 | .slice_end => try sema.zirSliceEnd(block, inst), |
| ... | ... | @@ -9250,10 +9250,17 @@ fn zirEmbedFile(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A |
| 9250 | 9250 | return sema.analyzeDeclRef(embed_file.owner_decl); |
| 9251 | 9251 | } |
| 9252 | 9252 | |
| 9253 | | fn zirRetErrValueCode(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref { |
| 9254 | | _ = block; |
| 9255 | | _ = inst; |
| 9256 | | return sema.fail(block, sema.src, "TODO implement zirRetErrValueCode", .{}); |
| 9253 | fn zirRetErrValueCode(sema: *Sema, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref { |
| 9254 | const inst_data = sema.code.instructions.items(.data)[inst].str_tok; |
| 9255 | const err_name = inst_data.get(sema.code); |
| 9256 | |
| 9257 | // Return the error code from the function. |
| 9258 | const kv = try sema.mod.getErrorValue(err_name); |
| 9259 | const result_inst = try sema.addConstant( |
| 9260 | try Type.Tag.error_set_single.create(sema.arena, kv.key), |
| 9261 | try Value.Tag.@"error".create(sema.arena, .{ .name = kv.key }), |
| 9262 | ); |
| 9263 | return result_inst; |
| 9257 | 9264 | } |
| 9258 | 9265 | |
| 9259 | 9266 | fn zirShl( |