- Joined
- Aug 18, 2009
- Messages
- 4,097
jassAid is a tool for postproc, aiming to provide low-level jass services by transforming your map script file.
Current features are:
- merges the blizzard.j to the war3map.j
- a dependency walker kicks out unreachable functions and globals (using the "main" and "config" functions as entry points), it sorts the references to avoid wrong declaration orders, please do not use evil ExecuteFunc calls with dynamic argument
- call cycles are replaced by TriggerEvaluates with global argument passing similar to what jasshelper does (however, since you most likely have a precompiler like jasshelper or wurstscript, it may throw an error or handles these cycles on their own anyway)
- injection of public debug functions that perform external outputs (PreloadGenEnd), the next release of postproc includes a logTracker console application that can read it while wc3 is running in parallel (no more error msg spamming inside wc3)
- error messages may have tracebacks, that is, it currently does not track every function call and line but the thread invocations it passes
- thread break detection (not sure if this is 100% safe)
- the contents of the "main" function are moved to a generated "mainSub" function and it is called in a protected shell at the end of the "main" function, jassAid's core initializers are placed before that
- some malicious functions/scenarios are averted/marked like invoking the "Player" function with an index out of bounds
As mentioned, jassAid is applied to plain jass in order to keep it independent. Therefore it should be run after precompilers did their work. However, you may want to use the debug functions, insert calls of them into your code. This is why these public functions need to be announced to jasshelper, wurstscript and co.. The method for doing this pretty universally is to inject these functions as new natives into the common.j and then use the new common.j when calling the precompiler. jassAid provides an extra tool to add the natives to a common.j.
The first jassAid version is released with next postproc release, probably next weekend.
Attachments
Last edited: