all: remove init interpretation during IR construction

The interp package does a much better job at interpretation, and is
implemented as a pass on the IR which makes it much easier to compose.
Also, the implementation works much better as it is based on LLVM IR
instead of Go SSA.
This commit is contained in:
Ayke van Laethem
2019-02-09 13:31:51 +01:00
committed by Ron Evans
parent da345e8723
commit 92d9b780b5
6 changed files with 46 additions and 917 deletions
+4 -9
View File
@@ -43,11 +43,10 @@ type Function struct {
// Global variable, possibly constant.
type Global struct {
*ssa.Global
program *Program
LLVMGlobal llvm.Value
linkName string // go:extern
extern bool // go:extern
initializer Value
program *Program
LLVMGlobal llvm.Value
linkName string // go:extern
extern bool // go:extern
}
// Type with a name and possibly methods.
@@ -416,10 +415,6 @@ func (g *Global) CName() string {
return ""
}
func (g *Global) Initializer() Value {
return g.initializer
}
// Return true if this named type is annotated with the //go:volatile pragma,
// for volatile loads and stores.
func (p *Program) IsVolatile(t types.Type) bool {