Advertisement
tinyevil

Untitled

Oct 14th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. this is the the bytecode i generate
  2. ```
  3. for ( ;; )
  4. if ( foo() )
  5. return bar();
  6.  
  7. main:
  8. code:
  9. block_0:
  10. br block_1
  11. block_1:
  12. br block_2
  13. block_2:
  14. r0 = call_cmethod com.meduzik.Main.foo this
  15. r1 = to_bool r0
  16. condbr r1 block_3 block_4
  17. block_3:
  18. r2 = call_cmethod com.meduzik.Main.bar this
  19. ret r2
  20. block_4:
  21. br block_1
  22.  
  23.  
  24.  
  25. for ( ; cond(); )
  26. if ( foo() )
  27. return bar();
  28.  
  29. main:
  30. code:
  31. block_0:
  32. br block_1
  33. block_1:
  34. r0 = call_cmethod com.meduzik.Main.cond this
  35. r1 = to_bool r0
  36. condbr r1 block_2 block_3
  37. block_2:
  38. r2 = call_cmethod com.meduzik.Main.foo this
  39. r3 = to_bool r2
  40. condbr r3 block_4 block_5
  41. block_3:
  42. ret 0.000000 // this return is inserted by the "finalizeBody" method, generating error in the process
  43. block_4:
  44. r4 = call_cmethod com.meduzik.Main.bar this
  45. ret r4
  46. block_5:
  47. br block_1
  48. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement