Relax an assert slightly after the change to unbox keys in-TC
Esse commit está contido em:
@@ -2066,7 +2066,7 @@ struct VectorEffects {
|
||||
static bool getStackValue(const IRInstruction* inst, uint32_t index,
|
||||
SSATmp*& value, Type& type);
|
||||
|
||||
VectorEffects(const IRInstruction* inst) {
|
||||
explicit VectorEffects(const IRInstruction* inst) {
|
||||
int keyIdx = vectorKeyIdx(inst);
|
||||
int valIdx = vectorValIdx(inst);
|
||||
init(inst->getOpcode(),
|
||||
@@ -2074,6 +2074,7 @@ struct VectorEffects {
|
||||
keyIdx == -1 ? Type::None : inst->getSrc(keyIdx)->getType(),
|
||||
valIdx == -1 ? Type::None : inst->getSrc(valIdx)->getType());
|
||||
}
|
||||
|
||||
template<typename Container>
|
||||
VectorEffects(Opcode opc, const Container& srcs) {
|
||||
int keyIdx = vectorKeyIdx(opc);
|
||||
@@ -2083,14 +2084,17 @@ struct VectorEffects {
|
||||
keyIdx == -1 ? Type::None : srcs[keyIdx]->getType(),
|
||||
valIdx == -1 ? Type::None : srcs[valIdx]->getType());
|
||||
}
|
||||
|
||||
VectorEffects(Opcode op, Type base, Type key, Type val) {
|
||||
init(op, base, key, val);
|
||||
}
|
||||
|
||||
VectorEffects(Opcode op, SSATmp* base, SSATmp* key, SSATmp* val) {
|
||||
auto typeOrNone =
|
||||
[](SSATmp* val){ return val ? val->getType() : Type::None; };
|
||||
init(op, typeOrNone(base), typeOrNone(key), typeOrNone(val));
|
||||
}
|
||||
|
||||
Type baseType;
|
||||
Type valType;
|
||||
bool baseTypeChanged;
|
||||
|
||||
@@ -119,7 +119,13 @@ void VectorEffects::init(Opcode op, const Type origBase,
|
||||
|
||||
// Canonicalize the op to SetProp or SetElem
|
||||
op = canonicalOp(op);
|
||||
assert(key.equals(Type::None) || key.isKnownDataType());
|
||||
|
||||
// We're not expecting types other than specific known data types
|
||||
// (or for keys, Cell). (At least for keys it might work since the
|
||||
// helpers generally operate on cells, but we're asserting anyway
|
||||
// since this shouldn't actually happen.)
|
||||
assert(key.equals(Type::None) || key.isKnownDataType() ||
|
||||
key.equals(Type::Cell));
|
||||
assert(origVal.equals(Type::None) || origVal.isKnownDataType());
|
||||
|
||||
if ((op == SetElem || op == SetProp) &&
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário