Skip to content

Releases: dplassgit/d2lang

v0.2

24 Oct 00:35
Compare
Choose a tag to compare
v0.2 Pre-release
Pre-release

v0.2 Changes

Some work was done on a bootstrapped version of the compiler, but it's not complete.

See v4 README

What doesn't work: register spillover, advanced l-values.

New features:

  • Completely removed "MAIN". Closes #223
  • Implemented LONGs. Closes #75.
  • Implemented increment and decrement. Closes #213
  • Implement "short circuit" for AND and OR. Closes #210.

Bug fixes:

  • Fixes bug #249: Don't completely delete foo=bar() if foo is not used
  • Fix block scope by attaching a symbol table to the BlockNode. Closes #169.
  • Fixes #263: when compiling IfOp if the operand is a constant, hard-code the jmp
  • Detect printing of void values as an error. Closes #250
  • Changed literals to a new TokenType: LITERAL. This fixes #211
  • If IAE is thrown, catch it and log as a regular D2 exception in the static checker. Closes #217
  • Make sure the user is not trying to add null to a string, in the type checker and the arithmetic optimizer. Closes #221.
  • Rewrote null string comparison generator. Closes #218. ONCE AND FOR ALL.
  • Double-check for compatible array types, and other places where a symbol might have already been defined. Closes #214.
  • Fixes issue #260: properly compare index to string length.

Optimizations:

  • Fix bug in ConstantPropagationOptimizer: if not incrementing a constant, clear the assignments, just like a transfer. Closes #259.
  • Fix constant propagation optimizer to properly clear the cache when an assignment is seen. Closes #245.
  • Implement TempPropagationOptimizer, which simplifies simple binary operations. Closes #178
  • Include inc and dec as an input to the AdjacentArithmeticOptimizer as i=i+1 and i=i-1. Closes #229
  • Implement optimization for increment then decrement to two nops. Closes #228
  • Expanded AdjacentArithmeticOptimizer to bit and, or, xor. Closes #233.
  • Rewrote parts of constant propagation optimizer - and wound up adding "limited propagation of global constants"! Closes #93

Internal changes:

  • Renamed EQ to ASSIGN.
  • Moved x64-specific code generation code to the x64 directory.
  • Added "--target" command line flag. Right now only x64 works. Closes #232
  • Fix string code generator to use a temp when a string is concatenated with itself. Closes #246.

v0.1

07 Dec 00:07
Compare
Choose a tag to compare
v0.1 Pre-release
Pre-release

Mostly works. What doesn't work: register spillover, advanced l-values, scopes.