Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 45 for unsafeptr (0.12 sec)

  1. src/cmd/compile/internal/ssagen/abi.go

    		case types.TINT64, types.TUINT64:
    			wfs[i].Type = obj.WasmI64
    		case types.TFLOAT32:
    			wfs[i].Type = obj.WasmF32
    		case types.TFLOAT64:
    			wfs[i].Type = obj.WasmF64
    		case types.TUNSAFEPTR:
    			wfs[i].Type = obj.WasmPtr
    		default:
    			base.ErrorfAt(f.Pos(), 0, "go:wasmimport %s %s: unsupported parameter type %s", f.WasmImport.Module, f.WasmImport.Name, t.String())
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/subr.go

    			return ir.OSTR2RUNES, ""
    		}
    	}
    
    	// 8. src is a pointer or uintptr and dst is unsafe.Pointer.
    	if (src.IsPtr() || src.IsUintptr()) && dst.IsUnsafePtr() {
    		return ir.OCONVNOP, ""
    	}
    
    	// 9. src is unsafe.Pointer and dst is a pointer or uintptr.
    	if src.IsUnsafePtr() && (dst.IsPtr() || dst.IsUintptr()) {
    		return ir.OCONVNOP, ""
    	}
    
    	// 10. src is a slice and dst is an array or pointer-to-array.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types/size.go

    		t.align = uint8(RegSize)
    		t.floatRegs = 2
    		t.setAlg(ACPLX128)
    
    	case TPTR:
    		w = int64(PtrSize)
    		t.intRegs = 1
    		CheckSize(t.Elem())
    		t.ptrBytes = int64(PtrSize) // See PtrDataSize
    
    	case TUNSAFEPTR:
    		w = int64(PtrSize)
    		t.intRegs = 1
    		t.ptrBytes = int64(PtrSize)
    
    	case TINTER: // implemented as 2 pointers
    		w = 2 * int64(PtrSize)
    		t.align = uint8(PtrSize)
    		t.intRegs = 2
    		expandiface(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 15K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/expr.go

    		base.Fatalf("no type specified for OSLICEHEADER")
    	}
    
    	if !t.IsSlice() {
    		base.Fatalf("invalid type %v for OSLICEHEADER", n.Type())
    	}
    
    	if n.Ptr == nil || n.Ptr.Type() == nil || !n.Ptr.Type().IsUnsafePtr() {
    		base.Fatalf("need unsafe.Pointer for OSLICEHEADER")
    	}
    
    	n.Ptr = Expr(n.Ptr)
    	n.Len = DefaultLit(Expr(n.Len), types.Types[types.TINT])
    	n.Cap = DefaultLit(Expr(n.Cap), types.Types[types.TINT])
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/branchelim.go

    			for i := len(b.Values) - 1; i >= 0; i-- {
    				v := b.Values[i]
    				if !loadAddr.contains(v.ID) {
    					continue
    				}
    				for _, a := range v.Args {
    					if a.Type.IsInteger() || a.Type.IsPtr() || a.Type.IsUnsafePtr() {
    						loadAddr.add(a.ID)
    					}
    				}
    			}
    		}
    		if loadAddr.size() == n {
    			break
    		}
    	}
    
    	change := true
    	for change {
    		change = false
    		for _, b := range f.Blocks {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 30 17:46:51 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/stmt.go

    			// like fixedbugs/issue24491a.go correctly.
    			//
    			// TODO(mdempsky): Limit to static callees with
    			// //go:uintptr{escapes,keepalive}?
    			if arg.Type().IsUintptr() && arg.X.Type().IsUnsafePtr() {
    				visit(&arg.X)
    				return
    			}
    
    		case ir.OARRAYLIT, ir.OSLICELIT, ir.OSTRUCTLIT:
    			// TODO(mdempsky): For very large slices, it may be preferable
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/order.go

    	}
    	var kt *types.Type
    	switch alg {
    	case mapfast32:
    		kt = types.Types[types.TUINT32]
    	case mapfast64:
    		kt = types.Types[types.TUINT64]
    	case mapfast32ptr, mapfast64ptr:
    		kt = types.Types[types.TUNSAFEPTR]
    	case mapfaststr:
    		kt = types.Types[types.TSTRING]
    	}
    	nt := n.Type()
    	switch {
    	case nt == kt:
    		return n
    	case nt.Kind() == kt.Kind(), nt.IsPtrShaped() && kt.IsPtrShaped():
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/assign.go

    	// TODO: &s[s.len] - hn?
    	ix := ir.NewIndexExpr(base.Pos, s, ir.NewBinaryExpr(base.Pos, ir.OSUB, ir.NewUnaryExpr(base.Pos, ir.OLEN, s), l2))
    	ix.SetBounded(true)
    	hp := typecheck.ConvNop(typecheck.NodAddr(ix), types.Types[types.TUNSAFEPTR])
    
    	// hn := l2 * sizeof(elem(s))
    	hn := typecheck.Conv(ir.NewBinaryExpr(base.Pos, ir.OMUL, l2, ir.NewInt(base.Pos, elemtype.Size())), types.Types[types.TUINTPTR])
    
    	clrname := "memclrNoHeapPointers"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/writebarrier.go

    				// calls to newobject, which will have result type
    				// unsafe.Pointer instead. We can't easily infer how large the
    				// allocated memory is, so just skip it.
    				if types.LocalPkg.Path == "runtime" && v.Type.IsUnsafePtr() {
    					continue
    				}
    
    				nptr := v.Type.Elem().Size() / ptrSize
    				if nptr > 64 {
    					nptr = 64
    				}
    				zeroes[mem.ID] = ZeroRegion{base: v, mask: 1<<uint(nptr) - 1}
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:09:14 UTC 2023
    - 23.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/func.go

    	n.Args = []ir.Node{Expr(fp)}
    	return n
    }
    
    // tcUnsafeAdd typechecks an OUNSAFEADD node.
    func tcUnsafeAdd(n *ir.BinaryExpr) *ir.BinaryExpr {
    	n.X = AssignConv(Expr(n.X), types.Types[types.TUNSAFEPTR], "argument to unsafe.Add")
    	n.Y = DefaultLit(Expr(n.Y), types.Types[types.TINT])
    	if n.X.Type() == nil || n.Y.Type() == nil {
    		n.SetType(nil)
    		return n
    	}
    	if !n.Y.Type().IsInteger() {
    		n.SetType(nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top