std, src, doc, test: remove unused variables
This commit is contained in:
@@ -1107,7 +1107,6 @@ fn genAsm(o: *Object, as: *Inst.Assembly) !CValue {
|
||||
for (as.inputs) |i, index| {
|
||||
if (i[0] == '{' and i[i.len - 1] == '}') {
|
||||
const reg = i[1 .. i.len - 1];
|
||||
const arg = as.args[index];
|
||||
if (index > 0) {
|
||||
try writer.writeAll(", ");
|
||||
}
|
||||
|
||||
@@ -714,7 +714,6 @@ pub const DeclGen = struct {
|
||||
return self.fail(inst.base.src, "TODO: SPIR-V backend: binary operations for strange integers", .{});
|
||||
}
|
||||
|
||||
const is_bool = info.class == .bool;
|
||||
const is_float = info.class == .float;
|
||||
const is_signed = info.signedness == .signed;
|
||||
// **Note**: All these operations must be valid for vectors as well!
|
||||
@@ -802,8 +801,6 @@ pub const DeclGen = struct {
|
||||
const result_id = self.spv.allocResultId();
|
||||
const result_type_id = try self.genType(inst.base.src, inst.base.ty);
|
||||
|
||||
const info = try self.arithmeticTypeInfo(inst.operand.ty);
|
||||
|
||||
const opcode = switch (inst.base.tag) {
|
||||
// Bool -> bool
|
||||
.not => Opcode.OpLogicalNot,
|
||||
@@ -867,6 +864,7 @@ pub const DeclGen = struct {
|
||||
// are not allowed to be created from a phi node, and throw an error for those. For now, genType already throws
|
||||
// an error for pointers.
|
||||
const result_type_id = try self.genType(inst.base.src, inst.base.ty);
|
||||
_ = result_type_id;
|
||||
|
||||
try writeOpcode(&self.code, .OpPhi, 2 + @intCast(u16, incoming_blocks.items.len * 2)); // result type + result + variable/parent...
|
||||
|
||||
|
||||
@@ -849,7 +849,6 @@ pub const Context = struct {
|
||||
}
|
||||
|
||||
fn genCall(self: *Context, inst: *Inst.Call) InnerError!WValue {
|
||||
const func_inst = inst.func.castTag(.constant).?;
|
||||
const func_val = inst.func.value().?;
|
||||
|
||||
const target: *Decl = blk: {
|
||||
@@ -1146,8 +1145,6 @@ pub const Context = struct {
|
||||
}
|
||||
|
||||
fn genCmp(self: *Context, inst: *Inst.BinOp, op: std.math.CompareOperator) InnerError!WValue {
|
||||
const ty = inst.lhs.ty.tag();
|
||||
|
||||
// save offset, so potential conditions can insert blocks in front of
|
||||
// the comparison that we can later jump back to
|
||||
const offset = self.code.items.len;
|
||||
|
||||
Reference in New Issue
Block a user