[go-nuts] Re: Why does one string concatenation escape, but the other not?

2021-06-24 Thread tapi...@gmail.com
Filled an issue: https://github.com/golang/go/issues/46908 On Thursday, June 24, 2021 at 10:50:31 PM UTC-4 tapi...@gmail.com wrote: > Now, I think the escape analysis message should be "a + a does not > escapes", > which accurate meaning is "the header part of a + a does not escape". > It is imp

[go-nuts] Re: Why does one string concatenation escape, but the other not?

2021-06-24 Thread tapi...@gmail.com
Now, I think the escape analysis message should be "a + a does not escapes", which accurate meaning is "the header part of a + a does not escape". It is impossible for the compiler to determine whether or notthe underlying part of "a + a" will escape to heap. On Wednesday, June 23, 2021 at 12:00:

Re: [go-nuts] How to get the executable file from LLVM IR generated by gollvm

2021-06-24 Thread cy lee
thx :) 在2021年6月24日星期四 UTC+8 下午11:35:05 写道: > Hello, > > What you're talking about is not something that's currently supported by > gollvm. > > The way that the gollvm driver code is structured, each input file is > placed into one of three categories: Go source files, assembly files, and > "e

[go-nuts] Linker command failing for particular go tests involving net/http and time packages

2021-06-24 Thread Rahul Rahul
I'm running a go test to test a function that pings to websites, and returns which one gives me the faster response. The test file is called 'hello_test.go'. This is the code for the test hello_test.go Now, this is how my actual function looks like hello.go

Re: [go-nuts] Re: Error when running llvm-goc

2021-06-24 Thread Kavindu Gimhan Zoysa
I did not use any *go build* command. Sorry if I missed anything. These are the steps I followed. 1. Build gollvm referring to the official documentation. I followed the steps until https://go.googlesource.com/gollvm/#cmakeninja. 2. I was able to see the *llvm-goc *in the bin folder. I export

Re: [go-nuts] Re: Error when running llvm-goc

2021-06-24 Thread 'Than McIntosh' via golang-nuts
Could you please post the complete "go build" command? Thanks, Than On Thu, Jun 24, 2021 at 2:05 PM Kavindu Gimhan Zoysa wrote: > Hi all, > > Still, I was unable to figure out the reason for the above error. Really > appreciate your help. > > Thank you, > Kavindu > > On Thursday, 24 June 2021 a

[go-nuts] Re: Error when running llvm-goc

2021-06-24 Thread Kavindu Gimhan Zoysa
Hi all, Still, I was unable to figure out the reason for the above error. Really appreciate your help. Thank you, Kavindu On Thursday, 24 June 2021 at 12:06:32 UTC+5:30 Kavindu Gimhan Zoysa wrote: > Hi all, > > I have build the gollvm and now I am trying to run it. So I run follwing > command

Re: [go-nuts] Hi all,

2021-06-24 Thread Kavindu Gimhan Zoysa
Thank you. Do not I need to check out for a special commit? Can I build the gollvm by checking out the latest commits in all dependant repositories(llvm-project, libbacktrace, libgo etc)? Thank you, Kavindu On Thursday, 24 June 2021 at 21:06:28 UTC+5:30 th...@google.com wrote: > This change has

Re: [go-nuts] Hi all,

2021-06-24 Thread 'Than McIntosh' via golang-nuts
This change has been submitted; if you update your gollvmn repo you should be able to build cleanly now. Thanks, Than On Thu, Jun 24, 2021 at 9:22 AM Than McIntosh wrote: > Hello, > > I sent a CL to fix this problem: > https://go-review.googlesource.com/c/gollvm/+/330609. I'll let you know > w

Re: [go-nuts] How to get the executable file from LLVM IR generated by gollvm

2021-06-24 Thread 'Than McIntosh' via golang-nuts
Hello, What you're talking about is not something that's currently supported by gollvm. The way that the gollvm driver code is structured, each input file is placed into one of three categories: Go source files, assembly files, and "everything else". Files that fall into the third category are p

[go-nuts] Upgrade to Go1.16 from Go1.14 broke my query

2021-06-24 Thread Hugh Myrie
I recently updated my Go version to 1.16 and for all my queries I now get an error: {"error":"Dynamic SQL Error\nSQL error code = -303\narithmetic exception, numeric overflow, or string truncation\nstring right truncation\n"} I'm using the package: _ "github.com/nakagami/firebirdsql" The fo

[go-nuts] How to get the executable file from LLVM IR generated by gollvm

2021-06-24 Thread cy lee
Hi, I get the .ll files from gollvm, and I know there is no way to get executable file by lli, but whether there are other ways can do this? here is the simple go code, *hello.go* *package mainimport "fmt"func main() { * *fmt.Println("hello world") * *}* Using commands as following,

Re: [go-nuts] How does stack overflow handles in gollvm

2021-06-24 Thread 'Than McIntosh' via golang-nuts
Hello, If you go into your LLVM IR dump and look at the place where the function is defined, you'll see a reference to an attribute set, e.g. define void @main.foo(i8* nest %nest.1) #0 !dbg !16 { Here "#0" refers to this attribute set (appearing later in the dump): attributes #0 = { "disable-

Re: [go-nuts] Hi all,

2021-06-24 Thread Kavindu Gimhan Zoysa
Thanks a lot. On Thursday, 24 June 2021 at 18:53:31 UTC+5:30 th...@google.com wrote: > Hello, > > I sent a CL to fix this problem: > https://go-review.googlesource.com/c/gollvm/+/330609. I'll let you know > when it is submitted. > > Thanks, Than > > > On Wed, Jun 23, 2021 at 5:30 PM Than McIn

Re: [go-nuts] Hi all,

2021-06-24 Thread 'Than McIntosh' via golang-nuts
Hello, I sent a CL to fix this problem: https://go-review.googlesource.com/c/gollvm/+/330609. I'll let you know when it is submitted. Thanks, Than On Wed, Jun 23, 2021 at 5:30 PM Than McIntosh wrote: > Hi, > > I'll take a look -- stay tuned. > > Than > > > On Wed, Jun 23, 2021 at 3:04 PM Kavi

[go-nuts] Re: Why does one string concatenation escape, but the other not?

2021-06-24 Thread tapi...@gmail.com
On Wednesday, June 23, 2021 at 12:00:43 PM UTC-4 jake...@gmail.com wrote: > It does not answer your question, but possibly provides more clues: > https://play.golang.org/p/s9Xnpcx8Mys > > package main > > func main() { > var a = "b" > x := a + a // does not escape > x = a + a // do