Skip to content

Commit

Permalink
Bug fix and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoNex committed Oct 17, 2024
1 parent c593fc6 commit 25775b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion internal/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,11 @@ func (b Bytecode) CConsts() *obj.Object {
}

func (b Bytecode) Consts() []obj.Object {
var ret = make([]obj.Object, b.NConsts())
if b.NConsts() == 0 {
return []obj.Object{}
}

var ret = make([]obj.Object, b.NConsts())
cconsts := (*[1 << 28]obj.Object)(unsafe.Pointer(b.consts))[:b.NConsts():b.NConsts()]

for i := 0; i < int(b.NConsts()); i++ {
Expand Down
2 changes: 1 addition & 1 deletion tau.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/NicoNex/tau/internal/vm"
)

const TauVersion = "v2.0.11"
const TauVersion = "v2.0.13"

var ErrParseError = errors.New("error: parse error")

Expand Down

0 comments on commit 25775b5

Please sign in to comment.