Skip to content

Commit 562dcda

Browse files
author
Silas Davis
committed
Upgrade wagon to fix downstream go module issues
Signed-off-by: Silas Davis <[email protected]>
1 parent 76d6d29 commit 562dcda

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ TEST_RUNNER:=target/test_runner
55

66
# Run all test fixtures
77
.PHONY: test
8-
test: testsuite test_runner wast $(patsubst ${JSON_DIR}/%.json, ${NO_TEST}, $(wildcard ${JSON_DIR}/*.json))
8+
test: build testsuite test_runner wast $(patsubst ${JSON_DIR}/%.json, ${NO_TEST}, $(wildcard ${JSON_DIR}/*.json))
9+
10+
.PHONY: build
11+
build:
12+
go build .
913

1014
target/test_runner:
1115
go build -o ${TEST_RUNNER} ./spec/test_runner

compiler/module.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (m *Module) CompileWithNGen(gp GasPolicy, numGlobals uint64) (out string, r
144144

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

221221
for i, f := range m.Base.FunctionIndexSpace {
222222
//fmt.Printf("Compiling function %d (%+v) with %d locals\n", i, f.Sig, len(f.Body.Locals))
223-
d, err := disasm.Disassemble(f, m.Base)
223+
d, err := disasm.NewDisassembly(f, m.Base)
224224
if err != nil {
225225
panic(err)
226226
}

compiler/serialize.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,10 @@ func (c *SSAFunctionCompiler) Serialize() []byte {
722722
binary.Write(buf, binary.LittleEndian, uint32(v))
723723
}
724724

725-
case "current_memory":
725+
case "memory.size":
726726
binary.Write(buf, binary.LittleEndian, opcodes.CurrentMemory)
727727

728-
case "grow_memory":
728+
case "memory.grow":
729729
binary.Write(buf, binary.LittleEndian, opcodes.GrowMemory)
730730
binary.Write(buf, binary.LittleEndian, uint32(ins.Values[0]))
731731

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/perlin-network/life
22

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

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

0 commit comments

Comments
 (0)