Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for mapfndel (0.12 sec)

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

    	}
    	if mapfast(t) == mapslow || isfat {
    		return typecheck.LookupRuntime(name, t.Key(), t.Elem(), t.Key(), t.Elem())
    	}
    	return typecheck.LookupRuntime(name, t.Key(), t.Elem(), t.Elem())
    }
    
    func mapfndel(name string, t *types.Type) ir.Node {
    	if !t.IsMap() {
    		base.Fatalf("mapfn %v", t)
    	}
    	if mapfast(t) == mapslow {
    		return typecheck.LookupRuntime(name, t.Key(), t.Elem(), t.Key())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/builtin.go

    	map_ := n.Args[0]
    	key := n.Args[1]
    	map_ = walkExpr(map_, init)
    	key = walkExpr(key, init)
    
    	t := map_.Type()
    	fast := mapfast(t)
    	key = mapKeyArg(fast, n, key, false)
    	return mkcall1(mapfndel(mapdelete[fast], t), nil, init, reflectdata.DeleteMapRType(base.Pos, n), map_, key)
    }
    
    // walkLenCap walks an OLEN or OCAP node.
    func walkLenCap(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
    	if isRuneCount(n) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. src/go/types/operand.go

    //
    // variable   <expr> (<untyped kind> <mode>                    )
    // variable   <expr> (               <mode>       of type <typ>)
    //
    // mapindex   <expr> (<untyped kind> <mode>                    )
    // mapindex   <expr> (               <mode>       of type <typ>)
    //
    // value      <expr> (<untyped kind> <mode>                    )
    // value      <expr> (               <mode>       of type <typ>)
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/operand.go

    //
    // variable   <expr> (<untyped kind> <mode>                    )
    // variable   <expr> (               <mode>       of type <typ>)
    //
    // mapindex   <expr> (<untyped kind> <mode>                    )
    // mapindex   <expr> (               <mode>       of type <typ>)
    //
    // value      <expr> (<untyped kind> <mode>                    )
    // value      <expr> (               <mode>       of type <typ>)
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/api.go

    func (tv TypeAndValue) Assignable() bool {
    	return tv.mode == variable || tv.mode == mapindex
    }
    
    // HasOk reports whether the corresponding expression may be
    // used on the rhs of a comma-ok assignment.
    func (tv TypeAndValue) HasOk() bool {
    	return tv.mode == commaok || tv.mode == mapindex
    }
    
    // Instance reports the type arguments and instantiated type for type and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  6. src/reflect/benchmark_test.go

    	}
    
    	for _, tt := range tests {
    		b.Run(tt.label, func(b *testing.B) {
    			b.Run("MapIndex", func(b *testing.B) {
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    					for j := tt.keys.Len() - 1; j >= 0; j-- {
    						tt.m.MapIndex(tt.keys.Index(j))
    					}
    				}
    			})
    			b.Run("SetMapIndex", func(b *testing.B) {
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Nov 19 17:09:03 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  7. src/go/types/api.go

    func (tv TypeAndValue) Assignable() bool {
    	return tv.mode == variable || tv.mode == mapindex
    }
    
    // HasOk reports whether the corresponding expression may be
    // used on the rhs of a comma-ok assignment.
    func (tv TypeAndValue) HasOk() bool {
    	return tv.mode == commaok || tv.mode == mapindex
    }
    
    // Instance reports the type arguments and instantiated type for type and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  8. src/go/types/index.go

    			return false
    		}
    		var key operand
    		check.expr(nil, &key, index)
    		check.assignment(&key, typ.key, "map index")
    		// ok to continue even if indexing failed - map element type is known
    		x.mode = mapindex
    		x.typ = typ.elem
    		x.expr = e.Orig
    		return false
    
    	case *Interface:
    		if !isTypeParam(x.typ) {
    			break
    		}
    		// TODO(gri) report detailed failure cause for better error messages
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  9. src/go/types/assignments.go

    	switch x.mode {
    	case invalid:
    		return Typ[Invalid]
    	case variable, mapindex:
    		// ok
    	default:
    		if sel, ok := x.expr.(*ast.SelectorExpr); ok {
    			var op operand
    			check.expr(nil, &op, sel.X)
    			if op.mode == mapindex {
    				check.errorf(&x, UnaddressableFieldAssign, "cannot assign to struct field %s in map", ExprString(x.expr))
    				return Typ[Invalid]
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/assignments.go

    	switch x.mode {
    	case invalid:
    		return Typ[Invalid]
    	case variable, mapindex:
    		// ok
    	default:
    		if sel, ok := x.expr.(*syntax.SelectorExpr); ok {
    			var op operand
    			check.expr(nil, &op, sel.X)
    			if op.mode == mapindex {
    				check.errorf(&x, UnaddressableFieldAssign, "cannot assign to struct field %s in map", ExprString(x.expr))
    				return Typ[Invalid]
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 16.4K bytes
    - Viewed (0)
Back to top