[go-nuts] Go ssa instruction type

2018-04-04 Thread Arpit Aggarwal
Hi everybody, I am using Go SSA for analysis purposes in my project. The BasicBlock type in Go ssa contains Instrs[] of type []Instruction. But Instruction type is not able to tell me which type of instruction is it (BinOp, Unop etc). There is no function if Instruction interface which can tel

Re: [go-nuts] Go ssa instruction type

2018-04-04 Thread Arpit Aggarwal
gt; > You just have to type-switch on the ssa.Instruction value. > > hth, > -s > > sent from my droid > > On Wed, Apr 4, 2018, 13:21 Arpit Aggarwal > wrote: > >> Hi everybody, >> >> I am using Go SSA for analysis purposes in my project. >> >

Re: [go-nuts] Go ssa instruction type

2018-04-04 Thread Arpit Aggarwal
Got it using reflect package. Still thanks a lot buddy. On Wednesday, April 4, 2018 at 5:10:01 PM UTC+5:30, Arpit Aggarwal wrote: > > Thank you very much Sebastien, > this is very helpful. I didn't know about the type switches. > Also do you know anything by which i can simp

[go-nuts] Reordering of reads and writes within a goroutine

2017-09-07 Thread Arpit Aggarwal
Hi everybody, I was going through the Go memory model at https://golang.org/ref/mem In the second line,first paragraph of Happens Before Description it is written that * compilers and processors may reorder the reads and writes executed within a single goroutine only when the reordering does

[go-nuts] Go Compiler Intermediate Representation

2017-02-21 Thread Arpit Aggarwal
Hi all, I am doing a project in which I need Go compiler's intermediate representation(IR) (which is semantics preserving and I can get all all info like line number and data type and other features) (human readable) to convert to another IR of a tool. I am new to Golang. Can anybody tell me how

Re: [go-nuts] Go Compiler Intermediate Representation

2017-02-21 Thread Arpit Aggarwal
Thanks a lot *Ian*. Will try it and ask if I have any further doubts. Thanks, Arpit On Tuesday, February 21, 2017 at 10:59:41 PM UTC+5:30, Ian Lance Taylor wrote: > > On Tue, Feb 21, 2017 at 9:15 AM, Arpit Aggarwal > wrote: > > > > I am doing a project in which

[go-nuts] Re: Go Compiler Intermediate Representation

2017-02-24 Thread Arpit Aggarwal
Thank you very much adon... Its very useful for my project. Again, thanks a lot Regards Arpit On Wednesday, February 22, 2017 at 2:13:25 PM UTC-8, adon...@google.com wrote: > > On Tuesday, 21 February 2017 12:23:44 UTC-5, Arpit Aggarwal wrote: >> >> I am doing a project