github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/compile/noder/stmt.go (about)

     1  // Copyright 2021 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package noder
     6  
     7  import (
     8  	"github.com/go-asm/go/cmd/compile/ir"
     9  	"github.com/go-asm/go/cmd/compile/syntax"
    10  )
    11  
    12  // TODO(mdempsky): Investigate replacing with switch statements or dense arrays.
    13  
    14  var branchOps = [...]ir.Op{
    15  	syntax.Break:       ir.OBREAK,
    16  	syntax.Continue:    ir.OCONTINUE,
    17  	syntax.Fallthrough: ir.OFALL,
    18  	syntax.Goto:        ir.OGOTO,
    19  }
    20  
    21  var callOps = [...]ir.Op{
    22  	syntax.Defer: ir.ODEFER,
    23  	syntax.Go:    ir.OGO,
    24  }