callerlocation

package
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package callerlocation avoids redundant compiler-generated location records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	Kind, Function, File string
	Line                 int
}

Location identifies a runtime update before target-specific ABI lowering.

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

Tracker follows append-only IR emission. Its zero value is ready to use. A different block, location or intervening call requires a fresh record.

func (*Tracker) Checkpoint

func (t *Tracker) Checkpoint(last llvm.Value)

Checkpoint includes the newly emitted record in the checked prefix.

func (*Tracker) Repeated

func (t *Tracker) Repeated(block llvm.BasicBlock, last llvm.Value, location Location, debug llvm.DebugLoc) bool

Repeated checks only the instructions appended since the last checkpoint. It always advances the checkpoint to last, regardless of the result. Linear scanning requires a live checkpoint at or before last in this block; reset the tracker after IR rewrites. Reaching the block head returns false. Calls (including inline assembly) and terminators are conservative barriers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL