compiler: use uint16 for label numbers
As noted in #687 this will make compiler a bit more predictable.
This commit is contained in:
parent
56f87cd44e
commit
5e229d84d4
3 changed files with 33 additions and 27 deletions
|
@ -18,7 +18,7 @@ type funcScope struct {
|
|||
decl *ast.FuncDecl
|
||||
|
||||
// Program label of the scope
|
||||
label int
|
||||
label uint16
|
||||
|
||||
// Local variables
|
||||
locals map[string]int
|
||||
|
@ -35,7 +35,7 @@ type funcScope struct {
|
|||
i int
|
||||
}
|
||||
|
||||
func newFuncScope(decl *ast.FuncDecl, label int) *funcScope {
|
||||
func newFuncScope(decl *ast.FuncDecl, label uint16) *funcScope {
|
||||
return &funcScope{
|
||||
name: decl.Name.Name,
|
||||
decl: decl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue