Fix potential constant flag toggled off incorrectly while optimizing.
This commit is contained in:
@@ -135,10 +135,7 @@ namespace Cryville.Common.Pdt {
|
|||||||
for (var ins = il.First; ins != null; ins = ins.Next) {
|
for (var ins = il.First; ins != null; ins = ins.Next) {
|
||||||
if (!(ins.Value is PdtInstruction.PushConstant)) {
|
if (!(ins.Value is PdtInstruction.PushConstant)) {
|
||||||
exp.IsConstant = false;
|
exp.IsConstant = false;
|
||||||
}
|
break;
|
||||||
else if (!(ins.Value is PdtInstruction.PushVariable)) {
|
|
||||||
exp.IsPotentialConstant = false;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user