Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for unsafeptr (0.24 sec)

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

    	types.TCOMPLEX128: "complex128",
    	types.TFLOAT32:    "float32",
    	types.TFLOAT64:    "float64",
    	types.TBOOL:       "bool",
    	types.TSTRING:     "string",
    	types.TPTR:        "pointer",
    	types.TUNSAFEPTR:  "unsafe.Pointer",
    	types.TSTRUCT:     "struct",
    	types.TINTER:      "interface",
    	types.TCHAN:       "chan",
    	types.TMAP:        "map",
    	types.TARRAY:      "array",
    	types.TSLICE:      "slice",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/expand_calls.go

    	ft := from.Type
    	if offset == 0 {
    		if ft == pt {
    			return from
    		}
    		// This captures common, (apparently) safe cases.  The unsafe cases involve ft == uintptr
    		if (ft.IsPtr() || ft.IsUnsafePtr()) && pt.IsPtr() {
    			return from
    		}
    	}
    	// Simplify, canonicalize
    	for from.Op == OpOffPtr {
    		offset += from.AuxInt
    		from = from.Args[0]
    	}
    	if from == x.sp {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 05:13:40 UTC 2023
    - 31.9K bytes
    - Viewed (0)
Back to top