Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.00 KB | None | 0 0
  1. if(currentToken.is(Kind.NOT)){
  2.             nextToken();
  3.            
  4.  
  5.            
  6.             result = parseBoolFactor();
  7.            
  8.             BranchInstruction ifne_7 = _factory.createBranchInstruction(Constants.IFNE, null);
  9.             il.append(ifne_7);
  10.  
  11.            
  12.             if(result != null && result instanceof Boolean){
  13.                 BranchInstruction goto_11 = null;
  14.                 InstructionHandle ih_14 = null;
  15.                 boolean flag = toBool(result);
  16.                 result = !flag;
  17.                
  18.                 if(!flag){
  19.                     il.append(new PUSH(_cp, 0));
  20.                    
  21.                     goto_11 = _factory.createBranchInstruction(Constants.GOTO, null);
  22.                     il.append(goto_11);
  23.                     ih_14 = il.append(new PUSH(_cp, 1));
  24.                 } else {
  25.                     il.append(new PUSH(_cp, 1));
  26.                     goto_11 = _factory.createBranchInstruction(Constants.GOTO, null);
  27.                     il.append(goto_11);
  28.                    ih_14 = il.append(new PUSH(_cp, 0));
  29.                 }
  30.                
  31.                 ifne_7.setTarget(ih_14);
  32.                 InstructionHandle nopAddr = il.append(new NOP());
  33.                 goto_11.setTarget(nopAddr);
  34.                
  35.                
  36.             } else {
  37.                 return false;
  38.             }
  39.            
  40.            
  41.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement