| 04-01-2008, 03:33 PM | #1 |
So, scopes got initializers and all, but there was a problem I didn't notice. The reason I made scopes work with InitTrig was that it makes it easy for the optimizer to inline them. Right now I am using ExecuteFunc to call scope initializers (just like with libraries) I think I'll change this to make them a normal call instead, if you currently have heavy initializing in a scope initializer , it might be necessary to move to libraries later. |
| 04-03-2008, 12:52 PM | #2 |
Ye I do, in 2 or 3 triggers. Thanks for heads up. |
| 04-14-2008, 07:59 PM | #3 |
The recent plan is to make a program that would for example convert the gui file into a .j file containing a scope that comprises all of the map's gui garbage. The ExecuteFunc vs. call once again becomes an issue, for GUI triggers it totally makes sense to use calls, but for things like rects and sounds it should be better to make a library, the problem is that library initializers use ExecuteFunc and therefore cannot be inlined, while the optimizer relies on inlining them, a lot of optimization would be gone. Not to mention there are cases in which scopes need ExecuteFunc. I think that vJass needs an optional syntax to specify how the initializer is called. JASS:library aaa initializer init call library aaa initializer init library aaa initializer init execute //just like above default scope aaa initializer init execute scope aaa initializer init scope aaa initializer init call//just like above |
| 04-15-2008, 02:23 AM | #4 |
i remember asking about this before, I did not knwo they had initializers, I always just used the InitTrig, what is the point of an initializers when you can just use the InitTrig?? I remember asking if scopes had them, and you said, if you want them just use libraries, I bet I could find the thread if I searched for it... |
| 04-15-2008, 02:25 AM | #5 |
There's a reason I maintain a whole thread about jasshelper and keep posting a changelog there. |
