polserver/pol-core/bscript/compiler/optimizer
Eric Swanson a77ddd028e
New compiler: Add optimized unary expressions (#244)
Adds:
- UnaryOperator: AST node for unary operators -, ++, --, and so forth
- UnaryOperatorOptimizer: optimizes a unary operator with its operand
  - now integer and float negation, and integer inversion
  - later x[y]++ to a single instruction

Also:
- automatically include basic.em, which includes some parameter defaults like -1.

This allows the compiler to generate output for a hello, world script with the exact same .ecl output as the legacy compiler.
2020-08-26 19:24:47 -07:00
..
Optimizer.cpp New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
Optimizer.h New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
ReferencedFunctionGatherer.cpp New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
ReferencedFunctionGatherer.h New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
UnaryOperatorOptimizer.cpp New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
UnaryOperatorOptimizer.h New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00