with a Go fallback. Based on what I can see in the standard library, the
convention goes something like this:
foo.go
------
func Foo(int) int // Defined in assembly
func foo(int) int { // Fallback version in Go
// ...
return 0
}
foo_GOARCH.s
------------
// func Foo(int) int
TEXT ·Foo(SB),7,$0
// ...
RET
Questions:
1) How does foo() actually get associated with Foo()? Does the tooling just
automatically look for a lowercase version? When I remove the assembly
file, I get a "missing function body" error, so there must be something
about the standard library examples.
2) Is it possible to create an unexported function like this? If the
optimized function is now called foo(), what does the fallback get named?
3) Is the commented out func signature in the assembly file required by the
tools or have any significance? I think I found that it didn't work without
it.
Thanks,
Jay
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.