Skip to content

Commit

Permalink
Upgrade wagon to fix downstream go module issues
Browse files Browse the repository at this point in the history
Signed-off-by: Silas Davis <[email protected]>
  • Loading branch information
Silas Davis committed Oct 9, 2019
1 parent 76d6d29 commit 562dcda
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ TEST_RUNNER:=target/test_runner

# Run all test fixtures
.PHONY: test
test: testsuite test_runner wast $(patsubst ${JSON_DIR}/%.json, ${NO_TEST}, $(wildcard ${JSON_DIR}/*.json))
test: build testsuite test_runner wast $(patsubst ${JSON_DIR}/%.json, ${NO_TEST}, $(wildcard ${JSON_DIR}/*.json))

.PHONY: build
build:
go build .

target/test_runner:
go build -o ${TEST_RUNNER} ./spec/test_runner
Expand Down
4 changes: 2 additions & 2 deletions compiler/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (m *Module) CompileWithNGen(gp GasPolicy, numGlobals uint64) (out string, r

for i, f := range m.Base.FunctionIndexSpace {
//fmt.Printf("Compiling function %d (%+v) with %d locals\n", i, f.Sig, len(f.Body.Locals))
d, err := disasm.Disassemble(f, m.Base)
d, err := disasm.NewDisassembly(f, m.Base)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -220,7 +220,7 @@ func (m *Module) CompileForInterpreter(gp GasPolicy) (_retCode []InterpreterCode

for i, f := range m.Base.FunctionIndexSpace {
//fmt.Printf("Compiling function %d (%+v) with %d locals\n", i, f.Sig, len(f.Body.Locals))
d, err := disasm.Disassemble(f, m.Base)
d, err := disasm.NewDisassembly(f, m.Base)
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,10 @@ func (c *SSAFunctionCompiler) Serialize() []byte {
binary.Write(buf, binary.LittleEndian, uint32(v))
}

case "current_memory":
case "memory.size":
binary.Write(buf, binary.LittleEndian, opcodes.CurrentMemory)

case "grow_memory":
case "memory.grow":
binary.Write(buf, binary.LittleEndian, opcodes.GrowMemory)
binary.Write(buf, binary.LittleEndian, uint32(ins.Values[0]))

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/perlin-network/life

replace github.com/go-interpreter/wagon v0.0.0 => github.com/perlin-network/wagon v0.3.1-0.20180825141017-f8cb99b55a39
go 1.13

require (
github.com/go-interpreter/wagon v0.0.0
github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951
github.com/kr/pretty v0.1.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e // indirect
google.golang.org/appengine v1.6.5 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

go 1.13

0 comments on commit 562dcda

Please sign in to comment.