Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for newAssignStmt (0.17 sec)

  1. src/cmd/compile/internal/walk/compare.go

    		// We still need to use cmpl and cmpr, in case they contain
    		// an expression which might panic. See issue 23837.
    		a1 := typecheck.Stmt(ir.NewAssignStmt(base.Pos, ir.BlankNode, cmpl))
    		a2 := typecheck.Stmt(ir.NewAssignStmt(base.Pos, ir.BlankNode, cmpr))
    		init.Append(a1, a2)
    	}
    	return finishCompare(n, expr, init)
    }
    
    func walkCompareInterface(n *ir.BinaryExpr, init *ir.Nodes) ir.Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/staticinit/sched.go

    		// use conv to ensure r is assignable to l (#13263).
    		dst := ir.Node(l)
    		if loff != 0 || !types.Identical(typ, l.Type()) {
    			dst = ir.NewNameOffsetExpr(base.Pos, l, loff, typ)
    		}
    		s.append(ir.NewAssignStmt(base.Pos, dst, typecheck.Conv(r, typ)))
    		return true
    
    	case ir.ONIL:
    		return true
    
    	case ir.OLITERAL:
    		if ir.IsZero(r) {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/parser.go

    		// expr
    		pos := p.pos()
    		switch p.tok {
    		case _AssignOp:
    			// lhs op= rhs
    			op := p.op
    			p.next()
    			return p.newAssignStmt(pos, op, lhs, p.expr())
    
    		case _IncOp:
    			// lhs++ or lhs--
    			op := p.op
    			p.next()
    			return p.newAssignStmt(pos, op, lhs, nil)
    
    		case _Arrow:
    			// lhs <- rhs
    			s := new(SendStmt)
    			s.pos = pos
    			p.next()
    			s.Chan = lhs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/expr.go

    	}
    	return cheapExpr(n, init)
    }
    
    func copyExpr(n ir.Node, t *types.Type, init *ir.Nodes) ir.Node {
    	l := typecheck.TempAt(base.Pos, ir.CurFunc, t)
    	appendWalkStmt(init, ir.NewAssignStmt(base.Pos, l, n))
    	return l
    }
    
    func walkAddString(n *ir.AddStringExpr, init *ir.Nodes) ir.Node {
    	c := len(n.List)
    
    	if c < 2 {
    		base.Fatalf("walkAddString count %d too small", c)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/typecheck.go

    	if !ir.Any(*np, func(n ir.Node) bool { return n.Op() != ir.ONEW && callOrChan(n) }) {
    		return
    	}
    
    	tmp := TempAt(base.Pos, ir.CurFunc, (*np).Type())
    	as := ir.NewAssignStmt(base.Pos, tmp, *np)
    	as.PtrInit().Append(Stmt(ir.NewDecl(n.Pos(), ir.ODCL, tmp)))
    	*np = tmp
    
    	n.PtrInit().Append(Stmt(as))
    }
    
    // RewriteMultiValueCall rewrites multi-valued f() to use temporaries,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/switch.go

    					base.Fatalf("unhandled type switch case %v", ncase.List[0])
    				}
    				val.SetType(caseVar.Type())
    				val.SetTypecheck(1)
    			}
    			l := []ir.Node{
    				ir.NewDecl(ncase.Pos(), ir.ODCL, caseVar),
    				ir.NewAssignStmt(ncase.Pos(), caseVar, val),
    			}
    			typecheck.Stmts(l)
    			sw.Compiled.Append(l...)
    		}
    		sw.Compiled.Append(ncase.Body...)
    		sw.Compiled.Append(br)
    	}
    
    	walkStmtList(sw.Compiled)
    	sw.Tag = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
Back to top