optimizer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstantFoldingScissor

type ConstantFoldingScissor struct{}

常量折叠剪刀

func (*ConstantFoldingScissor) Cut

func (s *ConstantFoldingScissor) Cut(node ast.Node) ast.Node

func (*ConstantFoldingScissor) ShouldCut

func (s *ConstantFoldingScissor) ShouldCut(node ast.Node) bool

type DeadCodeScissor

type DeadCodeScissor struct{}

死代码消除剪刀

func (*DeadCodeScissor) Cut

func (s *DeadCodeScissor) Cut(node ast.Node) ast.Node

func (*DeadCodeScissor) ShouldCut

func (s *DeadCodeScissor) ShouldCut(node ast.Node) bool

type Optimizer

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

type Scissor

type Scissor interface {
	Name() string
	ShouldCut(node ast.Node) bool
	Cut(node ast.Node) ast.Node
}

Jump to

Keyboard shortcuts

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