wazevo(ssa): resets nextVariable (#1834)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
@@ -201,6 +201,7 @@ func (b *builder) ReturnBlock() BasicBlock {
|
||||
|
||||
// Init implements Builder.Reset.
|
||||
func (b *builder) Init(s *Signature) {
|
||||
b.nextVariable = 0
|
||||
b.currentSignature = s
|
||||
resetBasicBlock(b.returnBlk)
|
||||
b.instructionsPool.Reset()
|
||||
@@ -222,10 +223,6 @@ func (b *builder) Init(s *Signature) {
|
||||
}
|
||||
b.basicBlocksPool.Reset()
|
||||
|
||||
for i := Variable(0); i < b.nextVariable; i++ {
|
||||
b.variables[i] = typeInvalid
|
||||
}
|
||||
|
||||
for v := ValueID(0); v < b.nextValueID; v++ {
|
||||
delete(b.valueAnnotations, v)
|
||||
delete(b.valueIDAliases, v)
|
||||
|
||||
@@ -3,7 +3,7 @@ package ssa
|
||||
type Type byte
|
||||
|
||||
const (
|
||||
typeInvalid Type = 1 + iota
|
||||
typeInvalid Type = iota
|
||||
|
||||
// TODO: add 8, 16 bit types when it's needed for optimizations.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user