authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-01-01 14:27:06+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-01-01 14:27:06+01:00
log0e3cd5bb1ee555a9ccfb90c1bbb0e363ca25d2d6
tree49b17f44256beda39ba2d7a88a7f78c3923c0f20
parentb100e2ec2a06268623b119baf584e059440cb8f0

stage2: remove safety check for optional payload in codegen

This will be enforced by Sema.

1 files changed, 0 insertions(+), 4 deletions(-)

src/arch/x86_64/CodeGen.zig-4
...@@ -1145,10 +1145,6 @@ fn airOptionalPayload(self: *Self, inst: Air.Inst.Index) !void {...@@ -1145,10 +1145,6 @@ fn airOptionalPayload(self: *Self, inst: Air.Inst.Index) !void {
1145 const ty_op = self.air.instructions.items(.data)[inst].ty_op;1145 const ty_op = self.air.instructions.items(.data)[inst].ty_op;
1146 const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: {1146 const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: {
1147 const operand = try self.resolveInst(ty_op.operand);1147 const operand = try self.resolveInst(ty_op.operand);
1148 if (self.wantSafety()) {
1149 // TODO check for null
1150 return self.fail("TODO implement check for null in .optional_payload", .{});
1151 }
1152 const dst_mcv: MCValue = blk: {1148 const dst_mcv: MCValue = blk: {
1153 if (self.reuseOperand(inst, ty_op.operand, 0, operand)) {1149 if (self.reuseOperand(inst, ty_op.operand, 0, operand)) {
1154 break :blk operand;1150 break :blk operand;