Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,682 for posTable (0.15 sec)

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

    	"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")
    	b3 := NewLinePragmaBase(MakePos(b1, 10, 0), "b3", "b3", 123, 0)
    
    	var tab PosTable
    	for _, want := range []Pos{
    		NoPos,
    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/internal/src/xpos.go

    }
    
    // AtColumn1 returns the same location but shifted to column 1.
    func (p XPos) AtColumn1() XPos {
    	p.lico = p.lico.atColumn1()
    	return p
    }
    
    // A PosTable tracks Pos -> XPos conversions and vice versa.
    // Its zero value is a ready-to-use PosTable.
    type PosTable struct {
    	baseList []*PosBase
    	indexMap map[*PosBase]int
    	nameMap  map[string]int // Maps file symbol name to index for debug information.
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. src/cmd/internal/obj/line_test.go

    		{src.MakePos(lfile, 10, 0), "linedir:102"}, // 102 == 100 + (10 - (7+1))
    	}
    
    	for _, test := range tests {
    		fileIndex, line := ctxt.getFileIndexAndLine(ctxt.PosTable.XPos(test.pos))
    
    		file := "??"
    		if fileIndex >= 0 {
    			file = ctxt.PosTable.FileTable()[fileIndex]
    		}
    		got := fmt.Sprintf("%s:%d", file, line)
    
    		if got != test.want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  4. src/cmd/internal/obj/plist.go

    		return
    	}
    	s.NewFuncInfo()
    	if s.OnList() {
    		ctxt.Diag("%s: symbol %s redeclared", ctxt.PosTable.Pos(start), s.Name)
    		return
    	}
    	if strings.HasPrefix(s.Name, `"".`) {
    		ctxt.Diag("%s: unqualified symbol name: %s", ctxt.PosTable.Pos(start), s.Name)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/cmd/internal/src/pos.go

    func (p Pos) AbsFilename() string { return p.base.AbsFilename() }
    
    // FileIndex returns the file index of the position's base's absolute
    // filename within the PosTable that it was registered.
    func (p Pos) FileIndex() int { return p.base.FileIndex() }
    
    func (p Pos) String() string {
    	return p.Format(true, true)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  6. src/cmd/internal/obj/objfile.go

    			return
    		}
    		if strings.HasPrefix(s.Name, `"".`) {
    			w.ctxt.Diag("unqualified symbol name: %v", s.Name)
    		}
    		w.AddString(s.Name)
    	})
    
    	// All filenames are in the postable.
    	for _, f := range w.ctxt.PosTable.FileTable() {
    		w.AddString(filepath.ToSlash(f))
    	}
    }
    
    // cutoff is the maximum data section size permitted by the linker
    // (see issue #9862).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 24K bytes
    - Viewed (0)
  7. src/cmd/internal/obj/sym.go

    func (ctxt *Link) traverseSyms(flag traverseFlag, fn func(*LSym)) {
    	fnNoNil := func(s *LSym) {
    		if s != nil {
    			fn(s)
    		}
    	}
    	lists := [][]*LSym{ctxt.Text, ctxt.Data}
    	files := ctxt.PosTable.FileTable()
    	for _, list := range lists {
    		for _, s := range list {
    			if flag&traverseDefs != 0 {
    				fn(s)
    			}
    			if flag&traverseRefs != 0 {
    				for _, r := range s.R {
    					fnNoNil(r.Sym)
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 14:41:10 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/deadcode.go

    	if f.RegAlloc != nil {
    		for i := range live {
    			live[i] = true
    		}
    		return
    	}
    
    	// Record all the inline indexes we need
    	var liveInlIdx map[int]bool
    	pt := f.Config.ctxt.PosTable
    	for _, b := range f.Blocks {
    		for _, v := range b.Values {
    			i := pt.Pos(v.Pos).Base().InliningIndex()
    			if i < 0 {
    				continue
    			}
    			if liveInlIdx == nil {
    				liveInlIdx = map[int]bool{}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 00:29:01 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  9. src/cmd/internal/obj/link.go

    	funchash           map[string]*LSym // name -> sym mapping for ABIInternal syms
    	statichash         map[string]*LSym // name -> sym mapping for static syms
    	PosTable           src.PosTable
    	InlTree            InlTree // global inlining tree used by gc/inl.go
    	DwFixups           *DwarfFixupTable
    	Imports            []goobj.ImportedPkg
    	DiagFunc           func(string, ...interface{})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/dwarfgen/dwinl.go

    // calls C calls D" and all three callees are inlined (B, C, and D),
    // the index for a node from the inlined body of D will refer to the
    // call to D from C. Whew.
    func posInlIndex(xpos src.XPos) int {
    	pos := base.Ctxt.PosTable.Pos(xpos)
    	if b := pos.Base(); b != nil {
    		ii := b.InliningIndex()
    		if ii >= 0 {
    			return ii
    		}
    	}
    	return -1
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:45:07 UTC 2024
    - 12.8K bytes
    - Viewed (0)
Back to top