Advertisement
Guest User

Initialize empty slice in golang using idiomatic way

a guest
Oct 26th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. "".main t=1 size=1 args=0x0 locals=0x0
  2. 0x0000 00000 (test_slice_idiomatic.go:3) TEXT "".main(SB), $0-0
  3. 0x0000 00000 (test_slice_idiomatic.go:3) NOP
  4. 0x0000 00000 (test_slice_idiomatic.go:3) NOP
  5. 0x0000 00000 (test_slice_idiomatic.go:3) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
  6. 0x0000 00000 (test_slice_idiomatic.go:3) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
  7. 0x0000 00000 (test_slice_idiomatic.go:5) RET
  8. 0x0000 c3 .
  9. "".init t=1 size=49 args=0x0 locals=0x0
  10. 0x0000 00000 (test_slice_idiomatic.go:6) TEXT "".init(SB), $0-0
  11. 0x0000 00000 (test_slice_idiomatic.go:6) MOVQ (TLS), CX
  12. 0x0009 00009 (test_slice_idiomatic.go:6) CMPQ SP, 16(CX)
  13. 0x000d 00013 (test_slice_idiomatic.go:6) JLS 42
  14. 0x000f 00015 (test_slice_idiomatic.go:6) NOP
  15. 0x000f 00015 (test_slice_idiomatic.go:6) NOP
  16. 0x000f 00015 (test_slice_idiomatic.go:6) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
  17. 0x000f 00015 (test_slice_idiomatic.go:6) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
  18. 0x000f 00015 (test_slice_idiomatic.go:6) MOVBLZX "".initdone·(SB), AX
  19. 0x0016 00022 (test_slice_idiomatic.go:6) CMPB AL, $1
  20. 0x0018 00024 (test_slice_idiomatic.go:6) JLS $0, 27
  21. 0x001a 00026 (test_slice_idiomatic.go:6) RET
  22. 0x001b 00027 (test_slice_idiomatic.go:6) JNE $0, 34
  23. 0x001d 00029 (test_slice_idiomatic.go:6) PCDATA $0, $0
  24. 0x001d 00029 (test_slice_idiomatic.go:6) CALL runtime.throwinit(SB)
  25. 0x0022 00034 (test_slice_idiomatic.go:6) MOVB $2, "".initdone·(SB)
  26. 0x0029 00041 (test_slice_idiomatic.go:6) RET
  27. 0x002a 00042 (test_slice_idiomatic.go:6) NOP
  28. 0x002a 00042 (test_slice_idiomatic.go:6) CALL runtime.morestack_noctxt(SB)
  29. 0x002f 00047 (test_slice_idiomatic.go:6) JMP 0
  30. 0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 1b 0f dH..%....H;a.v..
  31. 0x0010 b6 05 00 00 00 00 3c 01 76 01 c3 75 05 e8 00 00 ......<.v..u....
  32. 0x0020 00 00 c6 05 00 00 00 00 02 c3 e8 00 00 00 00 eb ................
  33. 0x0030 cf .
  34. rel 5+4 t=15 TLS+0
  35. rel 18+4 t=14 "".initdone·+0
  36. rel 30+4 t=7 runtime.throwinit+0
  37. rel 36+4 t=14 "".initdone·+-1
  38. rel 43+4 t=7 runtime.morestack_noctxt+0
  39. gclocals·33cdeccccebe80329f1fdbee7f5874cb t=9 dupok size=8
  40. 0x0000 01 00 00 00 00 00 00 00 ........
  41. "".initdone· t=34 size=1
  42. "".main·f t=9 dupok size=8
  43. 0x0000 00 00 00 00 00 00 00 00 ........
  44. rel 0+8 t=1 "".main+0
  45. "".init·f t=9 dupok size=8
  46. 0x0000 00 00 00 00 00 00 00 00 ........
  47. rel 0+8 t=1 "".init+0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement