html

package
v0.0.0-...-ecbd380 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT, BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncHTML

func FuncHTML(f *ir.Func, phase string) string

Types

type ByTopo

type ByTopo []FuncLines

ByTopo sorts topologically: target function is on top, followed by inlined functions sorted by filename and line numbers.

func (ByTopo) Len

func (x ByTopo) Len() int

func (ByTopo) Less

func (x ByTopo) Less(i, j int) bool

func (ByTopo) Swap

func (x ByTopo) Swap(i, j int)

type FuncLines

type FuncLines struct {
	Filename    string
	StartLineno uint
	Lines       []string
}

FuncLines contains source code for a function to be displayed in sources column.

type HTMLWriter

type HTMLWriter struct {
	Func *ir.Func
	// contains filtered or unexported fields
}

func NewHTMLWriter

func NewHTMLWriter(path string, f *ir.Func) *HTMLWriter

func (*HTMLWriter) Close

func (w *HTMLWriter) Close()

func (*HTMLWriter) Fatalf

func (w *HTMLWriter) Fatalf(msg string, args ...interface{})

Fatalf reports an error and exits.

func (*HTMLWriter) Logf

func (w *HTMLWriter) Logf(msg string, args ...interface{})

Logf calls the (w *HTMLWriter).Func's Logf method passing along a msg and args.

func (*HTMLWriter) Printf

func (w *HTMLWriter) Printf(msg string, v ...interface{})

func (*HTMLWriter) WriteAST

func (w *HTMLWriter) WriteAST(phase string, buf *bytes.Buffer)

func (*HTMLWriter) WriteColumn

func (w *HTMLWriter) WriteColumn(phase, title, class, html string)

WriteColumn writes raw HTML in a column headed by title. It is intended for pre- and post-compilation log output.

func (*HTMLWriter) WriteMultiTitleColumn

func (w *HTMLWriter) WriteMultiTitleColumn(phase string, titles []string, class, html string)

func (*HTMLWriter) WritePhase

func (w *HTMLWriter) WritePhase(phase, title string)

WritePhase writes f in a column headed by title. phase is used for collapsing columns and should be unique across the table.

func (*HTMLWriter) WriteSources

func (w *HTMLWriter) WriteSources(phase string, fn string, lines []string, startline int)

WriteSources writes lines as source code in a column headed by title. phase is used for collapsing columns and should be unique across the table.

func (*HTMLWriter) WriteString

func (w *HTMLWriter) WriteString(s string)

type IRDecorator

type IRDecorator struct {
	Asm bool
}

IRDecorator emits an HTML version of the IR

func (IRDecorator) Begin

func (dec IRDecorator) Begin(out io.Writer, what interface{})

func (IRDecorator) BeginLabel

func (ss IRDecorator) BeginLabel(out io.Writer, what interface{})

func (IRDecorator) End

func (dec IRDecorator) End(out io.Writer, what interface{})

func (IRDecorator) EndLabel

func (ss IRDecorator) EndLabel(out io.Writer, what interface{})

func (IRDecorator) SSAForm

func (dec IRDecorator) SSAForm() bool

func (IRDecorator) WrapLabel

func (dec IRDecorator) WrapLabel(str string, what interface{}) string

func (IRDecorator) WrapOp

func (dec IRDecorator) WrapOp(str string, vop ir.Op) string

func (IRDecorator) WrapRef

func (dec IRDecorator) WrapRef(str string, what interface{}) string

func (IRDecorator) WrapType

func (dec IRDecorator) WrapType(str string) string

Jump to

Keyboard shortcuts

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