Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for NoXPos (0.09 sec)

  1. src/cmd/internal/src/xpos_test.go

    // license that can be found in the LICENSE file.
    
    package src
    
    import (
    	"testing"
    	"unsafe"
    )
    
    func TestNoXPos(t *testing.T) {
    	var tab PosTable
    	if tab.Pos(NoXPos) != NoPos {
    		t.Errorf("failed to translate NoXPos to Pos using zero PosTable")
    	}
    }
    
    func TestConversion(t *testing.T) {
    	b1 := NewFileBase("b1", "b1")
    	b2 := NewFileBase("b2", "b2")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/export.go

    func importfunc(s *types.Sym, t *types.Type) {
    	fn := ir.NewFunc(src.NoXPos, src.NoXPos, s, t)
    	importsym(fn.Nname)
    }
    
    // importvar declares symbol s as an imported variable with type t.
    func importvar(s *types.Sym, t *types.Type) {
    	n := ir.NewNameAt(src.NoXPos, s, t)
    	n.Class = ir.PEXTERN
    	importsym(n)
    }
    
    func importsym(name *ir.Name) {
    	sym := name.Sym()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:28 UTC 2023
    - 838 bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/universe.go

    	}
    
    	s := types.BuiltinPkg.Lookup("true")
    	s.Def = ir.NewConstAt(src.NoXPos, s, types.UntypedBool, constant.MakeBool(true))
    
    	s = types.BuiltinPkg.Lookup("false")
    	s.Def = ir.NewConstAt(src.NoXPos, s, types.UntypedBool, constant.MakeBool(false))
    
    	s = Lookup("_")
    	types.BlankSym = s
    	ir.BlankNode = ir.NewNameAt(src.NoXPos, s, types.Types[types.TBLANK])
    	s.Def = ir.BlankNode
    
    	s = types.BuiltinPkg.Lookup("_")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/abiutilsaux_test.go

    	"cmd/internal/src"
    	"fmt"
    	"strings"
    	"testing"
    	"text/scanner"
    )
    
    func mkParamResultField(t *types.Type, s *types.Sym, which ir.Class) *types.Field {
    	field := types.NewField(src.NoXPos, s, t)
    	n := ir.NewNameAt(src.NoXPos, s, t)
    	n.Class = which
    	field.Nname = n
    	return field
    }
    
    // mkstruct is a helper routine to create a struct type with fields
    // of the types specified in 'fieldtypes'.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 18:34:00 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/numberlines.go

    		if firstPosIndex == -1 { // Effectively empty block, check block's own Pos, consider preds.
    			line := src.NoXPos
    			for _, p := range b.Preds {
    				pbi := p.Block().ID
    				if !endlines[pbi].SameFileAndLine(line) {
    					if line == src.NoXPos {
    						line = endlines[pbi]
    						continue
    					} else {
    						line = src.NoXPos
    						break
    					}
    
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 14 21:26:13 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/universe.go

    	IsComplex[TCOMPLEX64] = true
    	IsComplex[TCOMPLEX128] = true
    }
    
    func makeErrorInterface() *Type {
    	sig := NewSignature(FakeRecv(), nil, []*Field{
    		NewField(src.NoXPos, nil, Types[TSTRING]),
    	})
    	method := NewField(src.NoXPos, LocalPkg.Lookup("Error"), sig)
    	return NewInterface([]*Field{method})
    }
    
    // makeComparableInterface makes the predefined "comparable" interface in the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/export_test.go

    		fn := ir.NewFunc(src.NoXPos, src.NoXPos, pkg.Lookup("function"), types.NewSignature(nil, nil, nil))
    		fn.DeclareParams(true)
    		fn.LSym = &obj.LSym{Name: "my/import/path.function"}
    
    		c.fe = TestFrontend{
    			t:    c.tb,
    			ctxt: c.config.ctxt,
    			f:    fn,
    		}
    	}
    	return c.fe
    }
    
    func (c *Conf) Temp(typ *types.Type) *ir.Name {
    	n := ir.NewNameAt(src.NoXPos, &types.Sym{Name: "aFakeAuto"}, typ)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 21:19:39 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/builtin.go

    	typs[107] = types.NewArray(typs[0], 3)
    	typs[108] = types.NewStruct([]*types.Field{types.NewField(src.NoXPos, Lookup("enabled"), typs[6]), types.NewField(src.NoXPos, Lookup("pad"), typs[107]), types.NewField(src.NoXPos, Lookup("cgo"), typs[6]), types.NewField(src.NoXPos, Lookup("alignme"), typs[24])})
    	typs[109] = newSig(params(typs[1], typs[3], typs[3]), nil)
    	typs[110] = newSig(params(typs[1], typs[3]), nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  9. src/cmd/internal/src/xpos.go

    // positions using a lookup table.
    
    package src
    
    // XPos is a more compact representation of Pos.
    type XPos struct {
    	index int32
    	lico
    }
    
    // NoXPos is a valid unknown position.
    var NoXPos XPos
    
    // IsKnown reports whether the position p is known.
    // XPos.IsKnown() matches Pos.IsKnown() for corresponding
    // positions.
    func (p XPos) IsKnown() bool {
    	return p.index != 0 || p.Line() != 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/noder/posmap.go

    func (m *posMap) makeXPos(pos syntax.Pos) src.XPos {
    	// Predeclared objects (e.g., the result parameter for error.Error)
    	// do not have a position.
    	if !pos.IsKnown() {
    		return src.NoXPos
    	}
    
    	posBase := m.makeSrcPosBase(pos.Base())
    	return base.Ctxt.PosTable.XPos(src.MakePos(posBase, pos.Line(), pos.Col()))
    }
    
    // makeSrcPosBase translates from a *syntax.PosBase to a *src.PosBase.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 27 03:43:35 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top