optimization

package
v0.0.0-...-65fd79d Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package optimization provides command optimizations that are used by the compiler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptHalfJoin

func OptHalfJoin(cmd command.Command) (command.Command, bool)

OptHalfJoin reduces Joins that are of the form Join(any,nil) or Join(nil,any) to just any. The result is a command and a flag that determines whether the command has been optimized. If that flag is false, then a nil command is returned, and the command, that was passed in, should be used further. Otherwise, proceed to work with the returned command. The input command will not be modified.

Types

type Optimization

type Optimization func(command.Command) (optimized command.Command, ok bool)

Optimization defines a process that optimizes an input command and outputs a modified, optimized version of that command, if the optimization is applicable to the input command. If not, ok=false will be returned.

Jump to

Keyboard shortcuts

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