Open dreasgrech opened 11 years ago
To decide whether to emit the pointer variable or not, I'm now checking the final list of DIL operations to see if it contains any PtrOps.
If there are any PtrOps still remaining after the entire optimization process, then I emit the pointer variable; otherwise, I don't.
This makes the size of the compiled assembly slightly smaller.
I currently have bug #17 as regards emitting the pointer variable.
If the full constant substitution optimization step is successful, then the pointer initialization and declaration do not need to be emitted in the compiled assembly.
Similarly, if there is no need for the char array (ex: after the string walk, we ended up with only a bunch of WriteLiteralOps), do not emit it.