Not long ago, I wrote the DWScript JavaScript Smart-Linker did not eliminate unused virtual methods, well that limitation is now gone.
A virtual method that is never called, in its base class nor any of its subclasses, will now be eliminated.
In the small game Nickel Iron which was used as illustration, that further reduces the generated output by almost 10% to just 92 kB “raw”, or 23 kB compressed. The gains come from not just the unused implementations being removed, but also a reduction in the size of the various VMTs.
So is the smartlinker an integral part of the JS codegen, or could it be used for DWS in general?
@Mason Wheeler
It’s part of the CodeGen base (not specific to JS), it’s not of use for Delphi-side script execution at the moment, but it can be of use for future/alternative CodeGens.
Where do i find some license info, do i have to pay for every copy of my program i sell?
Sorry to put this comment on the wrong blog entry, but Sampling Profiler entries have closed comments and I don’t have your contact information.
Just a suggestion to the SamplingProfiler if you are going to do some more work on it some time:
Your samples should also collect callstack at every sample point, traverse it and push sample count to all underlying element positions.