Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for new2 (0.04 sec)

  1. src/runtime/gc_test.go

    //
    //go:noinline
    func moveStackCheck(t *testing.T, new *int, old uintptr) bool {
    	// new should have been updated by the stack move;
    	// old should not have.
    
    	// Capture new's value before doing anything that could
    	// further move the stack.
    	new2 := uintptr(unsafe.Pointer(new))
    
    	t.Logf("old stack pointer %x, new stack pointer %x", old, new2)
    	if new2 == old {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/builtins0.go

    		_ byte = min(1, 'a')
    	)
    }
    
    func new1() {
    	_ = new() // ERROR "not enough arguments"
    	_ = new(1, 2) // ERROR "too many arguments"
    	_ = new("foo" /* ERROR "not a type" */)
    	p := new(float64)
    	_ = new(struct{ x, y int })
    	q := new(*float64)
    	_ = *p == **q
    	new /* ERROR "not used" */ (int)
            _ = &new /* ERROR "cannot take address" */ (int)
    
    	_ = new(int... /* ERROR "invalid use of ..." */ )
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  3. src/runtime/iface.go

    	newN := n * 2                         // make it at most 50% full
    	newN = 1 << sys.Len64(uint64(newN-1)) // round up to a power of 2
    
    	// Allocate the new table.
    	newSize := unsafe.Sizeof(abi.TypeAssertCache{}) + uintptr(newN-1)*unsafe.Sizeof(abi.TypeAssertCacheEntry{})
    	newC := (*abi.TypeAssertCache)(mallocgc(newSize, nil, true))
    	newC.Mask = uintptr(newN - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  4. src/runtime/proc.go

    	checkdead()
    	unlock(&sched.lock)
    
    	for {
    		lock(&newmHandoff.lock)
    		for newmHandoff.newm != 0 {
    			newm := newmHandoff.newm.ptr()
    			newmHandoff.newm = 0
    			unlock(&newmHandoff.lock)
    			for newm != nil {
    				next := newm.schedlink.ptr()
    				newm.schedlink = 0
    				newm1(newm)
    				newm = next
    			}
    			lock(&newmHandoff.lock)
    		}
    		newmHandoff.waiting = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  5. internal/grid/types.go

    	ePool sync.Pool // Elements
    }
    
    // NewArrayOf returns a new ArrayOf.
    // You must provide a function that returns a new instance of T.
    func NewArrayOf[T RoundTripper](newFn func() T) *ArrayOf[T] {
    	return &ArrayOf[T]{
    		ePool: sync.Pool{New: func() any {
    			return newFn()
    		}},
    	}
    }
    
    // New returns a new empty Array.
    func (p *ArrayOf[T]) New() *Array[T] {
    	return &Array[T]{
    		p: p,
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Apr 01 23:42:09 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  6. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/demo/demoSimple/SimpleAnalysisDemo.kt

        externalFunctions = listOf(::newD),
        defaultImports = listOf(DefaultFqName("com.example", "newD"))
    )
    
    
    object SimpleAnalysisDemo {
        @JvmStatic
        fun main(args: Array<String>) {
            printResolutionResults(
                schema.resolve(
                    """
                        val myB = b()
    
                        a = myB
                        val myD = newD("shared")
    
                        val c1 = c(1)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 14 10:08:01 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  7. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/demo/demoSimple/demoTypes.kt

    }
    
    
    class C(var x: Int = 0) {
        @Builder
        fun d(newD: D): C {
            this.d = newD
            return this
        }
    
        @get:Restricted
        var d: D = D()
    
        @get:Restricted
        val y = "test"
    
        @Restricted
        fun f(y: String) = 0
    }
    
    
    class D {
        @get:Restricted
        var id: String = "none"
    }
    
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Feb 06 23:16:59 UTC 2024
    - 949 bytes
    - Viewed (0)
  8. src/runtime/debugcall.go

    		gp.schedlink.set(newg)
    	})
    
    	// Switch to the new goroutine.
    	mcall(func(gp *g) {
    		// Get newg.
    		newg := gp.schedlink.ptr()
    		gp.schedlink = 0
    
    		// Park the calling goroutine.
    		trace := traceAcquire()
    		if trace.ok() {
    			// Trace the event before the transition. It may take a
    			// stack trace, but we won't own the stack after the
    			// transition anymore.
    			trace.GoPark(traceBlockDebugCall, 1)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 20:50:21 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  9. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/sample.kt

    package com.example
    
    
    fun Abc.body() {
        val myB = b()
    
        a = myB
        val myD = newD("shared")
    
        c(1) {
            x = f(y)
            d = myD
        }
        c(2) {
            x = f("another test")
            d = myD
        }
    }
    
    
    object Main {
        @JvmStatic
        fun main(args: Array<String>) {
            val receiver = Abc()
            receiver.body()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 01 13:30:30 UTC 2024
    - 425 bytes
    - Viewed (0)
  10. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/demo/demoSimple/AssignmentResolverDemo.kt

    import org.gradle.internal.declarativedsl.demo.resolve
    
    
    object AssignmentResolverDemo {
        @JvmStatic
        fun main(args: Array<String>) {
            val resolution = schema.resolve(
                """
                val myD = newD("shared")
    
                val c1 = c(1)
                c1.d = myD
                str = c1.d.id
                """.trimIndent()
            )
            printResolutionResults(resolution)
            printResolvedAssignments(resolution)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 02 10:53:44 UTC 2024
    - 647 bytes
    - Viewed (0)
Back to top