Skip to content

Instantly share code, notes, and snippets.

@ericlagergren
Last active September 27, 2015 01:01
Show Gist options
  • Save ericlagergren/fc3ea32d65a2fe241a00 to your computer and use it in GitHub Desktop.
Save ericlagergren/fc3ea32d65a2fe241a00 to your computer and use it in GitHub Desktop.
// type a struct { b string }
// func (x a) Name() { return x.b }
// type b a
// aa := a{ b: "1234" }
// _ = aa.Name()
// bb := b{ b: "1234" }
// _ = a(bb).Name()
test.go:7 0x401004 31db XORL BX, BX
test.go:7 0x401006 488d0d93e90600 LEAQ 0x6e993(IP), CX
test.go:7 0x40100d 48c7c004000000 MOVQ $0x4, AX
test.go:8 0x401014 31db XORL BX, BX
test.go:8 0x401016 48891c24 MOVQ BX, 0(SP)
test.go:8 0x40101a 48895c2408 MOVQ BX, 0x8(SP)
test.go:8 0x40101f 48890c24 MOVQ CX, 0(SP)
test.go:8 0x401023 4889442408 MOVQ AX, 0x8(SP)
test.go:10 0x401028 31db XORL BX, BX
test.go:10 0x40102a 488d0d6fe90600 LEAQ 0x6e96f(IP), CX
test.go:10 0x401031 48c7c004000000 MOVQ $0x4, AX
test.go:11 0x401038 31db XORL BX, BX
test.go:11 0x40103a 48895c2410 MOVQ BX, 0x10(SP)
test.go:11 0x40103f 48895c2418 MOVQ BX, 0x18(SP)
test.go:11 0x401044 48894c2410 MOVQ CX, 0x10(SP)
test.go:11 0x401049 4889442418 MOVQ AX, 0x18(SP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment