Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. fun main(args: Array<String>) {
  2. val x = 10
  3. val y = 9
  4. if(x == 6) {
  5. if(y == 6) {
  6. println("a")
  7. } else {
  8. println("b")
  9. }
  10. } else {
  11. println("c")
  12. }
  13. }
  14.  
  15. /*
  16. The goto at the end of the inner if block (instruction 34 in hello.kt.javap)
  17. points directly at another goto (insn 47) which is the end of the outer if block.
  18.  
  19. In the equivalent compiled java you can see that the goto at the
  20. end of the inner if (insn 26) targets directly the end of the outer else (insn 48).
  21.  
  22. I'm also not sure the reason for putting the constant strings into
  23. local slot 3 before passing them to the println method, and I'd be
  24. very interested to know why that is.
  25. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement