Code refactoring (#143)
- simplify code - prealoc slices - check errors in tests - regexp Compile replaced with MustCompile - uint* cannot be negative
This commit is contained in:
parent
9c24bf9139
commit
cdba88b9f2
12 changed files with 35 additions and 26 deletions
|
@ -757,9 +757,6 @@ func (c *codegen) writeJumps() {
|
|||
continue
|
||||
}
|
||||
offset := uint16(c.l[index] - i)
|
||||
if offset < 0 {
|
||||
log.Fatalf("new offset is negative, table list %v", c.l)
|
||||
}
|
||||
binary.LittleEndian.PutUint16(b[j:j+2], offset)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue