Commit cf2b8afb authored by Kevin Modzelewski's avatar Kevin Modzelewski

Have to pass real (not undef) values to phis now

parent acdf1fdc
......@@ -2418,7 +2418,18 @@ private:
// printf("no st entry, setting undefined\n");
ConcreteCompilerType* phi_type = types->getTypeAtBlockEnd(*it, myblock);
assert(phi_type->isUsable());
cur = new ConcreteCompilerVariable(phi_type, llvm::UndefValue::get(phi_type->llvmType()));
// Forward an incref'd None instead of a NULL.
// TODO Change to using NULL to represent not-defined for boxed types, similar
// to CPython?
llvm::Value* v;
if (phi_type == phi_type->getBoxType()) {
v = emitter.getNone()->getValue();
} else {
v = llvm::UndefValue::get(phi_type->llvmType());
}
cur = new ConcreteCompilerVariable(phi_type, v);
_setFake(defined_name, makeBool(0));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment