Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(currentToken.is(Kind.NOT)){
- nextToken();
- result = parseBoolFactor();
- BranchInstruction ifne_7 = _factory.createBranchInstruction(Constants.IFNE, null);
- il.append(ifne_7);
- if(result != null && result instanceof Boolean){
- BranchInstruction goto_11 = null;
- InstructionHandle ih_14 = null;
- boolean flag = toBool(result);
- result = !flag;
- if(!flag){
- il.append(new PUSH(_cp, 0));
- goto_11 = _factory.createBranchInstruction(Constants.GOTO, null);
- il.append(goto_11);
- ih_14 = il.append(new PUSH(_cp, 1));
- } else {
- il.append(new PUSH(_cp, 1));
- goto_11 = _factory.createBranchInstruction(Constants.GOTO, null);
- il.append(goto_11);
- ih_14 = il.append(new PUSH(_cp, 0));
- }
- ifne_7.setTarget(ih_14);
- InstructionHandle nopAddr = il.append(new NOP());
- goto_11.setTarget(nopAddr);
- } else {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement