gotypes,build: pointer dereference (#61)
Provides a method on `gotypes.Component` to allow pointer dereference. This will enable `gotypes` helpers to be used with struct pointer arguments, for example. Updates #53 Fixes #54
This commit is contained in:
committed by
GitHub
parent
eb225e9d2c
commit
9eb409b935
@@ -112,6 +112,9 @@ func Load(src gotypes.Component, dst reg.Register) reg.Register { return ctx.Loa
|
||||
// attempt to select the right MOV instruction based on the types involved.
|
||||
func Store(src reg.Register, dst gotypes.Component) { ctx.Store(src, dst) }
|
||||
|
||||
// Dereference loads a pointer and returns its element type.
|
||||
func Dereference(ptr gotypes.Component) gotypes.Component { return ctx.Dereference(ptr) }
|
||||
|
||||
// Doc sets documentation comment lines for the currently active function.
|
||||
func Doc(lines ...string) { ctx.Doc(lines...) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user