Table of Contents

Enum Optimizations

Namespace
TableScript
Assembly
TableScript.dll

Enum to enable/disable optimizations

[Flags]
public enum Optimizations

Fields

ConstantBranching = 2

Literal valued conditions in loops will drop a branch completely

ConstantFolding = 1

Expressions with literal values will be computed on compile-time

ConstantPropagation = 256

Substitute known values of variables

DeadCodeElimination = 16

Eliminate unreachable code

DeadFunctionElimination = 8

Eliminate unused functions

DeadStoreElimination = 512

Eliminate unneeded variable stores

Early = ConstantFolding | ConstantBranching | ExpressionSimplification | EarlyOptimizations

Optimize early, useful for shortening source length of imports

EarlyDeadCodeElimination = 64

WARNING: DESTRUCTIVE! Eliminates unreachable code in the early optimization pass before or checking it for errors

EarlyDestructive = Early | EarlyDeadCodeElimination

Optimize early at the expense of ignoring potentially erroneous code, useful for shortening source length of imports

EarlyOptimizations = 32

Optimize before resolving

Experimental = DeadFunctionElimination | ExternalCallExperimental

Experimental optimizations

ExpressionSimplification = 4

Expressions will be simplified

ExternalCall = ConstantFolding | ConstantBranching | ExpressionSimplification | DeadCodeElimination

Useful for when unsued functions will be called from the API

ExternalCallExperimental = ExternalCall | VariableIndexReusing | ConstantPropagation | DeadStoreElimination

Useful for when unsued functions will be called from the API + experimental optimizations

None = 0
Normal = DeadFunctionElimination | ExternalCall

Default profile

VariableIndexReusing = 128

Reuse stack indexes for variables