effectplan

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package effectplan performs whole-project call-graph analysis for backend effects that remain intentionally absent from TypeRB source signatures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ORMOperation

func ORMOperation(intrinsic string, fails types.Type) bool

ORMOperation identifies intrinsics that may execute database work. It is shared by TypeScript suspension and portable execution-scope propagation.

Types

type Options

type Options struct {
	Intrinsic       func(string, types.Type) bool
	WebNext         bool
	CaptureLambdas  bool
	PassToFunctions bool
}

Options chooses effect roots while retaining one call-graph model.

type Plan

type Plan struct {
	Methods          map[*ir.Method]bool
	Lambdas          map[*ir.Lambda]bool
	Calls            map[*ir.Call]bool
	EnumCalls        map[*ir.EnumCall]bool
	Expressions      map[ir.Expression]bool
	Iterations       map[*ir.Iterate]bool
	StructuredBlocks map[*ir.StructuredBlock]bool
	// contains filtered or unexported fields
}

Plan records the declarations and expressions that transitively reach one of the backend effects selected by Options.

func Analyze

func Analyze(programs []*ir.Program, options Options) *Plan

func ExecutionScope

func ExecutionScope(programs []*ir.Program) *Plan

ExecutionScope computes the functions that must receive the compiler-owned cancellation/deadline scope. The list contains operations whose native implementations can observe cancellation, plus web runtime boundaries that forward a child scope.

func (*Plan) Method

func (p *Plan) Method(module, owner, name string) bool

Method reports whether a named project method transitively reaches an effect root. Integrations use this stable identity when dispatch code is generated outside the module that owns the method.

Jump to

Keyboard shortcuts

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