Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for OLITERAL (0.27 sec)

  1. src/cmd/compile/internal/ir/const.go

    	"math/big"
    
    	"cmd/compile/internal/base"
    	"cmd/compile/internal/types"
    	"cmd/internal/src"
    )
    
    // NewBool returns an OLITERAL representing b as an untyped boolean.
    func NewBool(pos src.XPos, b bool) Node {
    	return NewBasicLit(pos, types.UntypedBool, constant.MakeBool(b))
    }
    
    // NewInt returns an OLITERAL representing v as an untyped integer.
    func NewInt(pos src.XPos, v int64) Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 18:53:26 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ir/copy.go

    // (except for shared nodes like ONAME, ONONAME, OLITERAL, and OTYPE).
    // If pos.IsKnown(), it sets the source position of newly allocated Nodes to pos.
    func DeepCopy(pos src.XPos, n Node) Node {
    	var edit func(Node) Node
    	edit = func(x Node) Node {
    		switch x.Op() {
    		case ONAME, ONONAME, OLITERAL, ONIL, OTYPE:
    			return x
    		}
    		x = Copy(x)
    		if pos.IsKnown() {
    			x.SetPos(pos)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:57:57 UTC 2023
    - 1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/staticinit/sched.go

    				return ir.DeepCopy(v.Pos(), v)
    			}
    			return x
    		case ir.ONONAME, ir.OLITERAL, ir.ONIL, ir.OTYPE:
    			return x
    		}
    		x = ir.Copy(x)
    		ir.EditChildrenWithHidden(x, edit)
    
    		// TODO: handle more operations, see details discussion in go.dev/cl/466277.
    		switch x.Op() {
    		case ir.OCONV:
    			x := x.(*ir.ConvExpr)
    			if x.X.Op() == ir.OLITERAL {
    				if x, ok := truncate(x.X, x.Type()); ok {
    					return x
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/typecheck.go

    			return false
    		}
    	}
    
    	return true
    }
    
    func checksliceconst(lo ir.Node, hi ir.Node) bool {
    	if lo != nil && hi != nil && lo.Op() == ir.OLITERAL && hi.Op() == ir.OLITERAL && constant.Compare(lo.Val(), token.GTR, hi.Val()) {
    		base.Errorf("invalid slice index: %v > %v", lo, hi)
    		return false
    	}
    
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/compare.go

    			// constant, invoke the constcmp functions
    			// instead, and arrange for the constant
    			// operand to be the first argument.
    			l, r := n.X, n.Y
    			if r.Op() == ir.OLITERAL {
    				l, r = r, l
    			}
    			constcmp := l.Op() == ir.OLITERAL && r.Op() != ir.OLITERAL
    
    			var fn string
    			var paramType *types.Type
    			switch t.Size() {
    			case 1:
    				fn = "libfuzzerTraceCmp1"
    				if constcmp {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/sym.go

    // for various reasons (historical, convenience).
    type Sym struct {
    	Linkname string // link name
    
    	Pkg  *Pkg
    	Name string // object name
    
    	// The unique ONAME, OTYPE, OPACK, or OLITERAL node that this symbol is
    	// bound to within the current scope. (Most parts of the compiler should
    	// prefer passing the Node directly, rather than relying on this field.)
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:56 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/parser.go

    			if typ, ok := typ.(*IndexExpr); ok {
    				// embedded type T[P1, P2, ...]
    				typ.X = name // name == names[0]
    				tag := p.oliteral()
    				p.addField(styp, pos, nil, typ, tag)
    				break
    			}
    		} else {
    			// T P
    			typ = p.type_()
    		}
    
    		tag := p.oliteral()
    
    		for _, name := range names {
    			p.addField(styp, name.Pos(), name, typ, tag)
    		}
    
    	case _Star:
    		p.next()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/switch.go

    	if cond.Op() == ir.OBYTES2STR && allCaseExprsAreSideEffectFree(sw) {
    		cond := cond.(*ir.ConvExpr)
    		cond.SetOp(ir.OBYTES2STRTMP)
    	}
    
    	cond = walkExpr(cond, sw.PtrInit())
    	if cond.Op() != ir.OLITERAL && cond.Op() != ir.ONIL {
    		cond = copyExpr(cond, cond.Type(), &sw.Compiled)
    	}
    
    	base.Pos = lno
    
    	s := exprSwitch{
    		pos:      lno,
    		exprname: cond,
    	}
    
    	var defaultGoto ir.Node
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/expr.go

    	default:
    		ir.Dump("walk", n)
    		base.Fatalf("walkExpr: switch 1 unknown op %+v", n.Op())
    		panic("unreachable")
    
    	case ir.OGETG, ir.OGETCALLERPC, ir.OGETCALLERSP:
    		return n
    
    	case ir.OTYPE, ir.ONAME, ir.OLITERAL, ir.ONIL, ir.OLINKSYMOFFSET:
    		// TODO(mdempsky): Just return n; see discussion on CL 38655.
    		// Perhaps refactor to use Node.mayBeShared for these instead.
    		// If these return early, make sure to still call
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/staticdata/data.go

    	if n.Op() != ir.ONAME {
    		base.Fatalf("InitConst n op %v", n.Op())
    	}
    	if n.Sym() == nil {
    		base.Fatalf("InitConst nil n sym")
    	}
    	if c.Op() == ir.ONIL {
    		return
    	}
    	if c.Op() != ir.OLITERAL {
    		base.Fatalf("InitConst c op %v", c.Op())
    	}
    	s := n.Linksym()
    	switch u := c.Val(); u.Kind() {
    	case constant.Bool:
    		i := int64(obj.Bool2int(constant.BoolVal(u)))
    		s.WriteInt(base.Ctxt, noff, wid, i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:08:50 UTC 2023
    - 10.3K bytes
    - Viewed (0)
Back to top