Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 56 for ITab (0.21 sec)

  1. src/cmd/link/internal/ld/testdata/deadcode/ifacemethod4.go

    type T int
    
    //go:noinline
    func (T) M() {}
    
    type I interface{ M() }
    
    var p *T
    var pp *I
    
    func main() {
    	p = new(T)  // use type T
    	pp = new(I) // use type I
    	*pp = *p    // convert T to I, build itab
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 24 14:38:53 UTC 2021
    - 513 bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typebits/typebits.go

    	case types.TINTER:
    		// struct { Itab *tab;	void *data; }
    		// or, when isnilinter(t)==true:
    		// struct { Type *type; void *data; }
    		if off&int64(types.PtrSize-1) != 0 {
    			base.Fatalf("typebits.Set: invalid alignment, %v", t)
    		}
    		// The first word of an interface is a pointer, but we don't
    		// treat it as such.
    		// 1. If it is a non-empty interface, the pointer points to an itab
    		//    which is always in persistentalloc space.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/rewritedec.go

    }
    func rewriteValuedec_OpITab(v *Value) bool {
    	v_0 := v.Args[0]
    	b := v.Block
    	typ := &b.Func.Config.Types
    	// match: (ITab (IMake itab _))
    	// result: itab
    	for {
    		if v_0.Op != OpIMake {
    			break
    		}
    		itab := v_0.Args[0]
    		v.copyOf(itab)
    		return true
    	}
    	// match: (ITab x:(Load <t> ptr mem))
    	// cond: t.IsInterface()
    	// result: @x.Block (Load <typ.Uintptr> ptr mem)
    	for {
    		x := v_0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testshared/testdata/exe/exe.go

    }
    
    type C struct {
    }
    
    func F() *C {
    	return nil
    }
    
    var slicePtr interface{} = &[]int{}
    
    func main() {
    	defer depBase.ImplementedInAsm()
    	// This code below causes various go.itab.* symbols to be generated in
    	// the executable. Similar code in ../depBase/dep.go results in
    	// exercising https://golang.org/issues/17594
    	reflect.TypeOf(os.Stdout).Elem()
    	runtime.GC()
    	depBase.V = depBase.F() + 1
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 906 bytes
    - Viewed (0)
  5. test/fixedbugs/issue18595.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This test makes sure that itabs are unique.
    // More explicitly, we require that only one itab structure exists for the pair of
    // a given compile-time interface type and underlying concrete type.
    // Ensuring this invariant enables fixes for 18492 (improve type switch code).
    
    package main
    
    type I interface {
    	M()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 20:00:05 UTC 2017
    - 867 bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/walk.go

    		return false
    	})
    }
    
    // itabType loads the _type field from a runtime.itab struct.
    func itabType(itab ir.Node) ir.Node {
    	if itabTypeField == nil {
    		// internal/abi.ITab's Type field
    		itabTypeField = runtimeField("Type", rttype.ITab.OffsetOf("Type"), types.NewPtr(types.Types[types.TUINT8]))
    	}
    	return boundedDotPtr(base.Pos, itab, itabTypeField)
    }
    
    var itabTypeField *types.Field
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ir/symtab.go

    	X86HasSSE41     *obj.LSym
    	// Wasm
    	WasmDiv *obj.LSym
    	// Wasm
    	WasmTruncS *obj.LSym
    	// Wasm
    	WasmTruncU *obj.LSym
    }
    
    // Pkgs holds known packages.
    var Pkgs struct {
    	Go       *types.Pkg
    	Itab     *types.Pkg
    	Runtime  *types.Pkg
    	Coverage *types.Pkg
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 17:02:26 UTC 2023
    - 2K bytes
    - Viewed (0)
  8. src/internal/abi/compiletype.go

    // TFlagOff returns the offset of Type.TFlag for a compilation target with a given ptrSize
    func TFlagOff(ptrSize int) int { return 2*ptrSize + 4 }
    
    // ITabTypeOff returns the offset of ITab.Type for a compilation target with a given ptrSize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 03:01:24 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testshared/testdata/depBase/dep.go

    var V int = 1
    
    var HasMask []string = []string{"hi"}
    
    type HasProg struct {
    	array [1024]*byte
    }
    
    type Dep struct {
    	X int
    }
    
    func (d *Dep) Method() int {
    	// This code below causes various go.itab.* symbols to be generated in
    	// the shared library. Similar code in ../exe/exe.go results in
    	// exercising https://golang.org/issues/17594
    	reflect.TypeOf(os.Stdout).Elem()
    	return 10
    }
    
    func F() int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/convert.go

    		// Implement interface to empty interface conversion:
    		//
    		// var res *uint8
    		// res = (*uint8)(unsafe.Pointer(itab))
    		// if res != nil {
    		//    res = res.type
    		// }
    
    		// Grab its parts.
    		itab := ir.NewUnaryExpr(base.Pos, ir.OITAB, c)
    		itab.SetType(types.Types[types.TUINTPTR].PtrTo())
    		itab.SetTypecheck(1)
    		data := ir.NewUnaryExpr(n.Pos(), ir.OIDATA, c)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
Back to top