static Block getSwitchTarget(IList <Block> targets, Block fallThrough, Value value) { if (!value.isInt32()) { return(null); } return(CflowUtils.getSwitchTarget(targets, fallThrough, (Int32Value)value)); }
Block getTarget(Block switchBlock) { var val1 = instructionEmulator.pop(); if (!val1.isInt32()) { return(null); } return(CflowUtils.getSwitchTarget(switchBlock.Targets, switchBlock.FallThrough, (Int32Value)val1)); }
bool IBranchHandler.handleSwitch(Int32Value switchIndex) { var target = CflowUtils.getSwitchTarget(block.Targets, block.FallThrough, switchIndex); if (target == null) { return(false); } popPushedArgs(1); block.replaceSwitchWithBranch(target); return(true); }
bool emulate_Switch() { var val1 = instructionEmulator.pop(); if (!val1.isInt32()) return false; var target = CflowUtils.getSwitchTarget(block.Targets, block.FallThrough, (Int32Value)val1); if (target == null) return false; popPushedArgs(1); block.replaceSwitchWithBranch(target); return true; }