Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for OLITERAL (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/cmd/compile/internal/typecheck/const.go

    		return n
    	}
    
    	if t == nil || !ir.OKForConst[t.Kind()] {
    		t = defaultType(n.Type())
    	}
    
    	switch n.Op() {
    	default:
    		base.Fatalf("unexpected untyped expression: %v", n)
    
    	case ir.OLITERAL:
    		v := ConvertVal(n.Val(), t, explicit)
    		if v.Kind() == constant.Unknown {
    			n = ir.NewConstExpr(n.Val(), n)
    			break
    		}
    		n = ir.NewConstExpr(v, n)
    		n.SetType(t)
    		return n
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/expr.go

    		return l, r, nil
    	}
    
    	// no DefaultLit for left
    	// the outer context gives the type
    	t = l.Type()
    	if (l.Type() == types.UntypedFloat || l.Type() == types.UntypedComplex) && r.Op() == ir.OLITERAL {
    		t = types.UntypedInt
    	}
    	return l, r, t
    }
    
    // tcArith typechecks operands of a binary arithmetic expression.
    // The result of tcArith MUST be assigned back to original operands,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/complit.go

    	case ir.OSTRUCTLIT:
    		n := n.(*ir.CompLitExpr)
    		for _, r := range n.List {
    			r := r.(*ir.StructKeyExpr)
    			if !isStaticCompositeLiteral(r.Value) {
    				return false
    			}
    		}
    		return true
    	case ir.OLITERAL, ir.ONIL:
    		return true
    	case ir.OCONVIFACE:
    		// See staticassign's OCONVIFACE case for comments.
    		n := n.(*ir.ConvExpr)
    		val := ir.Node(n)
    		for val.Op() == ir.OCONVIFACE {
    			val = val.(*ir.ConvExpr).X
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ir/fmt.go

    	OCOMPLIT:          8,
    	OCONVIFACE:        8,
    	OCONVNOP:          8,
    	OCONV:             8,
    	OCOPY:             8,
    	ODELETE:           8,
    	OGETG:             8,
    	OLEN:              8,
    	OLITERAL:          8,
    	OMAKESLICE:        8,
    	OMAKESLICECOPY:    8,
    	OMAKE:             8,
    	OMAPLIT:           8,
    	OMAX:              8,
    	OMIN:              8,
    	ONAME:             8,
    	ONEW:              8,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
Back to top