Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for defaultlit2 (0.35 sec)

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

    			}
    		}
    
    		list.Append(cas.Body.Take()...)
    		list.Append(ir.NewBranchStmt(base.Pos, ir.OBREAK, nil))
    
    		var r ir.Node
    		if cond != nil {
    			cond = typecheck.Expr(cond)
    			cond = typecheck.DefaultLit(cond, nil)
    			r = ir.NewIfStmt(base.Pos, cond, list, nil)
    		} else {
    			r = ir.NewBlockStmt(base.Pos, list)
    		}
    
    		init = append(init, r)
    	}
    
    	if dflt != nil {
    		ir.SetPos(dflt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/walk.go

    	}
    	n.SetTypecheck(1)
    
    	if n.X == nil || n.Y == nil {
    		return n
    	}
    
    	lt := n.X.Type()
    	rt := n.Y.Type()
    	if lt == nil || rt == nil {
    		return n
    	}
    
    	if ir.IsBlank(n.X) {
    		n.Y = typecheck.DefaultLit(n.Y, nil)
    		return n
    	}
    
    	if !types.Identical(lt, rt) {
    		n.Y = typecheck.AssignConv(n.Y, lt, "assignment")
    		n.Y = walkExpr(n.Y, init)
    	}
    	types.CalcSize(n.Y.Type())
    
    	return n
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/subr.go

    		case types.TPTR,
    			types.TFUNC,
    			types.TMAP,
    			types.TCHAN,
    			types.TINTER,
    			types.TSLICE:
    			return ir.OCONVNOP, ""
    		}
    	}
    
    	// 6. rule about untyped constants - already converted by DefaultLit.
    
    	// 7. Any typed value can be assigned to the blank identifier.
    	if dst.Kind() == types.TBLANK {
    		return ir.OCONVNOP, ""
    	}
    
    	return ir.OXXX, ""
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/order.go

    //
    //	n.Left = o.addrTemp(n.Left)
    func (o *orderState) addrTemp(n ir.Node) ir.Node {
    	if n.Op() == ir.OLITERAL || n.Op() == ir.ONIL {
    		// TODO: expand this to all static composite literal nodes?
    		n = typecheck.DefaultLit(n, nil)
    		types.CalcSize(n.Type())
    		vstat := readonlystaticname(n.Type())
    		var s staticinit.Schedule
    		s.StaticAssign(vstat, 0, n, n.Type())
    		if s.Out != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
Back to top