• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

jassAid

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,097
attachment.php

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

  • jassAid.png
    jassAid.png
    6.6 KB · Views: 298
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
To realize the features, function calls to natives and stuff have to be wrapped, that counts for the blizzard.j as well. That's why the needed parts are transfered and the map is injected an empty blizzard.j. I do not have the numbers at the moment but ofc the mpq compression shrinks it down, yet the transformations jassAid does are at least O(n) partially so that may consume more than the blizzard.j part in larger maps.
 
Status
Not open for further replies.
Top