Compare commits
1 commit
master
...
compiler-i
Author | SHA1 | Date | |
---|---|---|---|
|
304900e765 |
2 changed files with 6 additions and 2 deletions
|
@ -593,7 +593,6 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
|
||||
case *ast.AssignStmt:
|
||||
multiRet := len(n.Rhs) != len(n.Lhs)
|
||||
c.saveSequencePoint(n)
|
||||
// Assign operations are grouped https://github.com/golang/go/blob/master/src/go/types/stmt.go#L160
|
||||
isAssignOp := token.ADD_ASSIGN <= n.Tok && n.Tok <= token.AND_NOT_ASSIGN
|
||||
if isAssignOp {
|
||||
|
@ -708,8 +707,8 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
|
||||
c.processDefers()
|
||||
|
||||
c.saveSequencePoint(n)
|
||||
if len(c.pkgInfoInline) == 0 {
|
||||
c.saveSequencePoint(n)
|
||||
emit.Opcodes(c.prog.BinWriter, opcode.RET)
|
||||
}
|
||||
return nil
|
||||
|
|
|
@ -21,6 +21,11 @@ import (
|
|||
// <inline body of f directly>
|
||||
// }
|
||||
func (c *codegen) inlineCall(f *funcScope, n *ast.CallExpr) {
|
||||
// Save sequence point for the debugger. Not having NOP can result in
|
||||
// one instruction being used by multiple sequence points.
|
||||
c.saveSequencePoint(n)
|
||||
emit.Opcodes(c.prog.BinWriter, opcode.NOP)
|
||||
|
||||
labelSz := len(c.labelList)
|
||||
offSz := len(c.inlineLabelOffsets)
|
||||
c.inlineLabelOffsets = append(c.inlineLabelOffsets, labelSz)
|
||||
|
|
Loading…
Reference in a new issue