compile with -Wunused-but-set-variable
Our open-source build compiles with these warnings, so they cause spew when building from github. And I think they are good to catch programmer error.
Esse commit está contido em:
@@ -5419,7 +5419,9 @@ void genCodeForTrace(Trace* trace,
|
||||
CodegenState state(irFactory, regs, live_regs, lifetime, asmInfo);
|
||||
|
||||
// Returns: whether a block has already been emitted.
|
||||
auto isEmitted = [&](Block* block) { return state.addresses[block]; };
|
||||
DEBUG_ONLY auto isEmitted = [&](Block* block) {
|
||||
return state.addresses[block];
|
||||
};
|
||||
|
||||
/*
|
||||
* Emit the given block on the supplied assembler. The `nextBlock'
|
||||
|
||||
@@ -321,7 +321,7 @@ PhysReg::Type LinearScan::getRegType(const SSATmp* tmp, int locIdx) const {
|
||||
|
||||
if (packed_tv) return PhysReg::GP;
|
||||
|
||||
Type tmpType = tmp->type();
|
||||
DEBUG_ONLY Type tmpType = tmp->type();
|
||||
|
||||
uint32_t tmpId = tmp->id();
|
||||
|
||||
|
||||
@@ -943,10 +943,6 @@ getDynLocType(const vector<DynLocation*>& inputs,
|
||||
}
|
||||
|
||||
const bool setElem = mcodeMaybeArrayKey(ni->immVecM[0]);
|
||||
const bool setNewElem = ni->immVecM[0] == MW;
|
||||
const Type keyType =
|
||||
setNewElem ? Type::None
|
||||
: Type::fromRuntimeType(inputs[2]->rtt);
|
||||
const Type valType = Type::fromRuntimeType(inputs[0]->rtt);
|
||||
if (setElem && baseType.maybe(Type::Str)) {
|
||||
if (baseType.isString()) {
|
||||
|
||||
@@ -182,14 +182,6 @@ void VectorEffects::init(Opcode op, const Type origBase,
|
||||
}
|
||||
}
|
||||
|
||||
// Setting an element with a base of one of these types will either succeed
|
||||
// (with possible promotion) or fatal
|
||||
const Type okBase = Type::Str | Type::Arr | Type::Obj;
|
||||
|
||||
// Setting an element with one of these types as the key will fail, issue a
|
||||
// warning, and evaulate to null.
|
||||
const Type badArrKey = Type::Arr | Type::Obj;
|
||||
|
||||
// The final baseType should be a pointer/box iff the input was
|
||||
baseType = baseBoxed ? baseType.box() : baseType;
|
||||
baseType = basePtr ? baseType.ptr() : baseType;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário