private ConditionalHeader GetComparisonHeader(DelGetCompRegDValue getRegDValue) { ConditionalHeader header; if (ctx.cfg.IsBlockLoopStart(ctx.cfg.FindBlockByInstructionIndex(bci.bciIndexInPrototype))) { header = new WhileHeader(bci.opcode, ctx.varNames.GetVariableName(bci.registers.a), getRegDValue(), ctx.currentBlock.scope); } else { header = new IfHeader(bci.opcode, ctx.varNames.GetVariableName(bci.registers.a), getRegDValue(), ctx.currentBlock.scope); } return(header); }
public void HandleLua(DelGetCompRegDValue getRegDValue) { ctx.lua.WriteSrcConstruct(GetComparisonHeader(getRegDValue), ctx.currentBlock.scope); ScopifyRangeAndMarkEnd(); CheckAndMarkElseBlock(); }