First program generation
This commit is contained in:
@@ -23,10 +23,12 @@ func Disassemble(prog *vm.Program) (string, error) {
|
||||
|
||||
return fmt.Sprintf(`global_memory_size: %d
|
||||
function_memory_size: %d
|
||||
instruction_limit: %d
|
||||
functions:
|
||||
%s`,
|
||||
prog.GlobalMemorySize,
|
||||
prog.FunctionMemorySize,
|
||||
prog.InstructionLimit,
|
||||
strings.Join(fncs, ""),
|
||||
), nil
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import "gopkg.in/yaml.v2"
|
||||
type program struct {
|
||||
GlobalMemorySize uint64 `yaml:"global_memory_size"`
|
||||
FunctionMemorySize uint64 `yaml:"function_memory_size"`
|
||||
InstructionLimit uint64 `yaml:"instruction_limit"`
|
||||
Functions []function `yaml:"functions"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user