Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for addrtaken (0.25 sec)

  1. test/codegen/clobberdead.go

    	// arm64:`MOVW\tR27, command-line-arguments\.x`, `MOVW\tR27, command-line-arguments\.y`, -`MOVW\tR27, command-line-arguments\.z`
    	x, y, z := p1, p2, p3
    	addrTaken(&z)
    	// x is dead at the call (the value of x is loaded before the CALL), y is not
    	// amd64:`MOVL\t\$3735936685, command-line-arguments\.x`, -`MOVL\t\$3735936685, command-line-arguments\.y`
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. test/typeparam/issue49659b.go

    // run
    
    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Testing that AddrTaken logic doesn't cause problems for function instantiations
    
    package main
    
    type A[T interface{ []int | [5]int }] struct {
    	val T
    }
    
    //go:noinline
    func (a A[T]) F() {
    	_ = &a.val[2]
    }
    
    func main() {
    	var x A[[]int]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 492 bytes
    - Viewed (0)
  3. test/fixedbugs/issue20250.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 20250: liveness differed with concurrent compilation
    // due to propagation of addrtaken to outer variables for
    // closure variables.
    
    package p
    
    type T struct {
    	s [2]string
    }
    
    func f(a T) { // ERROR "live at entry to f: a$"
    	var e interface{} // ERROR "stack object e interface \{\}$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 727 bytes
    - Viewed (0)
  4. test/live2.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // liveness tests with inlining ENABLED
    // see also live.go.
    
    package main
    
    // issue 8142: lost 'addrtaken' bit on inlined variables.
    
    func printnl()
    
    //go:noescape
    func useT40(*T40)
    
    type T40 struct {
    	m map[int]int
    }
    
    func newT40() *T40 {
    	ret := T40{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 23:29:33 UTC 2023
    - 953 bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/assign.go

    			// These can't appear in expressions anyway.
    			continue
    		}
    
    		if name.Addrtaken() || !name.OnStack() {
    			// Global variable, heap escaped, or just addrtaken.
    			// Conservatively assume any memory access might alias.
    			memWrite = true
    			continue
    		}
    
    		// Local, non-addrtaken variable.
    		// Assignments can only alias with direct uses of this variable.
    		assigned.Add(name)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/liveness/plive.go

    	// variable" ICEs (issue 19632).
    	switch v.Op {
    	case ssa.OpVarDef, ssa.OpVarLive, ssa.OpKeepAlive:
    		if !n.Used() {
    			return -1, 0
    		}
    	}
    
    	if n.Class == ir.PPARAM && !n.Addrtaken() && n.Type().Size() > int64(types.PtrSize) {
    		// Only aggregate-typed arguments that are not address-taken can be
    		// partially live.
    		lv.partLiveArgs[n] = true
    	}
    
    	var effect liveEffect
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 15:22:22 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/complit.go

    		return false
    	}
    	x := n.X.(*ir.Name)
    	if !types.Identical(n.X.Type(), n.Y.Type()) {
    		// not a special composite literal assignment
    		return false
    	}
    	if x.Addrtaken() {
    		// If x is address-taken, the RHS may (implicitly) uses LHS.
    		// Not safe to do a special composite literal assignment
    		// (which may expand to multiple assignments).
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  8. test/live.go

    }
    
    func f39c() (x [10]*int) {
    	x = [10]*int{}
    	x[0] = new(int) // ERROR "live at call to newobject: x$"
    	printnl()       // ERROR "live at call to printnl: x$"
    	return
    }
    
    // issue 8142: lost 'addrtaken' bit on inlined variables.
    // no inlining in this test, so just checking that non-inlined works.
    
    type T40 struct {
    	m map[int]int
    }
    
    //go:noescape
    func useT40(*T40)
    
    func newT40() *T40 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/order.go

    	// support that (see trybot failures on go.dev/cl/541715, PS1).
    	if ir.IsAddressable(n) {
    		if name, ok := ir.OuterValue(n).(*ir.Name); ok && name.Op() == ir.ONAME {
    			if name.Class == ir.PAUTO && !name.Addrtaken() && ssa.CanSSA(name.Type()) {
    				goto Copy
    			}
    		}
    
    		return n
    	}
    
    Copy:
    	return o.copyExpr(n)
    }
    
    // mapKeyTemp prepares n to be a key in a map runtime call and returns n.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  10. test/live_regabi.go

    }
    
    func f39c() (x [10]*int) {
    	x = [10]*int{}
    	x[0] = new(int) // ERROR "live at call to newobject: x$"
    	printnl()       // ERROR "live at call to printnl: x$"
    	return
    }
    
    // issue 8142: lost 'addrtaken' bit on inlined variables.
    // no inlining in this test, so just checking that non-inlined works.
    
    type T40 struct {
    	m map[int]int
    }
    
    //go:noescape
    func useT40(*T40)
    
    func newT40() *T40 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18.4K bytes
    - Viewed (0)
Back to top