Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 387 for IsString (0.13 sec)

  1. src/go/types/sizes.go

    		// StdSizes.Alignof won't be called for them.
    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    	case *TypeParam, *Union:
    		panic("unreachable")
    	}
    	a := s.Sizeof(T) // may be 0 or negative
    	// spec: "For a variable x of any type: unsafe.Alignof(x) is at least 1."
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  2. src/go/types/signature.go

    		if n == 0 {
    			panic("variadic function must have at least one parameter")
    		}
    		core := coreString(params.At(n - 1).typ)
    		if _, ok := core.(*Slice); !ok && !isString(core) {
    			panic(fmt.Sprintf("got %s, want variadic parameter with unnamed slice type or string as core type", core.String()))
    		}
    	}
    	sig := &Signature{recv: recv, params: params, results: results, variadic: variadic}
    	if len(recvTypeParams) != 0 {
    		if recv == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/signature.go

    		if n == 0 {
    			panic("variadic function must have at least one parameter")
    		}
    		core := coreString(params.At(n - 1).typ)
    		if _, ok := core.(*Slice); !ok && !isString(core) {
    			panic(fmt.Sprintf("got %s, want variadic parameter with unnamed slice type or string as core type", core.String()))
    		}
    	}
    	sig := &Signature{recv: recv, params: params, results: results, variadic: variadic}
    	if len(recvTypeParams) != 0 {
    		if recv == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/convert.go

    	}
    	// stringtoslicebyte(*32[byte], string) []byte
    	return mkcall("stringtoslicebyte", n.Type(), init, a, typecheck.Conv(s, types.Types[types.TSTRING]))
    }
    
    // walkStringToBytesTemp walks an OSTR2BYTESTMP node.
    func walkStringToBytesTemp(n *ir.ConvExpr, init *ir.Nodes) ir.Node {
    	// []byte(string) conversion that creates a slice
    	// referring to the actual string bytes.
    	// This conversion is handled later by the backend and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  5. src/go/internal/gcimporter/iimport.go

    	f.SetInt(&mant)
    	if f.Sign() != 0 {
    		f.SetMantExp(&f, int(r.int64()))
    	}
    	return constant.Make(&f)
    }
    
    func (r *importReader) ident() string {
    	return r.string()
    }
    
    func (r *importReader) qualifiedIdent() (*types.Package, string) {
    	name := r.string()
    	pkg := r.pkg()
    	return pkg, name
    }
    
    func (r *importReader) pos() token.Pos {
    	if r.p.version >= 1 {
    		r.posv1()
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/order.go

    				break
    			}
    			fallthrough
    
    		case k == types.TCHAN, k == types.TSTRING:
    			// chan, string, slice, array ranges use value multiple times.
    			// make copy.
    			r := n.X
    
    			if r.Type().IsString() && r.Type() != types.Types[types.TSTRING] {
    				r = ir.NewConvExpr(base.Pos, ir.OCONV, nil, r)
    				r.SetType(types.Types[types.TSTRING])
    				r = typecheck.Expr(r)
    			}
    
    			n.X = o.copyExpr(r)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssagen/ssa.go

    	_ = types.NewPtr(types.NewPtr(types.Types[types.TSTRING]))              // **string
    	_ = types.NewPtr(types.NewSlice(types.Types[types.TINTER]))             // *[]interface{}
    	_ = types.NewPtr(types.NewPtr(types.ByteType))                          // **byte
    	_ = types.NewPtr(types.NewSlice(types.ByteType))                        // *[]byte
    	_ = types.NewPtr(types.NewSlice(types.Types[types.TSTRING]))            // *[]string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  8. api/go1.5.txt

    pkg mime, func ExtensionsByType(string) ([]string, error)
    pkg mime, method (*WordDecoder) Decode(string) (string, error)
    pkg mime, method (*WordDecoder) DecodeHeader(string) (string, error)
    pkg mime, method (WordEncoder) Encode(string, string) string
    pkg mime, type WordDecoder struct
    pkg mime, type WordDecoder struct, CharsetReader func(string, io.Reader) (io.Reader, error)
    pkg mime, type WordEncoder uint8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/func.go

    	if n.X.Type() == nil || n.Y.Type() == nil {
    		n.SetType(nil)
    		return n
    	}
    
    	// copy([]byte, string)
    	if n.X.Type().IsSlice() && n.Y.Type().IsString() {
    		if types.Identical(n.X.Type().Elem(), types.ByteType) {
    			return n
    		}
    		base.Errorf("arguments to copy have different element types: %L and string", n.X.Type())
    		n.SetType(nil)
    		return n
    	}
    
    	if !n.X.Type().IsSlice() || !n.Y.Type().IsSlice() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/switch.go

    		cond = typecheck.Expr(cond)
    		cond = typecheck.DefaultLit(cond, nil)
    	}
    
    	// Given "switch string(byteslice)",
    	// with all cases being side-effect free,
    	// use a zero-cost alias of the byte slice.
    	// Do this before calling walkExpr on cond,
    	// because walkExpr will lower the string
    	// conversion into a runtime call.
    	// See issue 24937 for more discussion.
    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