polserver/pol-core/bscript/compiler/codegen
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
..
CodeEmitter.cpp Add code emitter and data emitter (#209) 2020-08-11 20:50:16 +02:00
CodeEmitter.h Add code emitter and data emitter (#209) 2020-08-11 20:50:16 +02:00
CodeGenerator.cpp New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
CodeGenerator.h New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
DataEmitter.cpp Add code emitter and data emitter (#209) 2020-08-11 20:50:16 +02:00
DataEmitter.h Add code emitter and data emitter (#209) 2020-08-11 20:50:16 +02:00
InstructionEmitter.cpp New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
InstructionEmitter.h New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
InstructionGenerator.cpp New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
InstructionGenerator.h New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
ModuleDeclarationRegistrar.cpp New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
ModuleDeclarationRegistrar.h New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00