[Tool/Web/Other] (Partly) reconstructed PAWN compiler
#1

Hi,

about almost a year ago I started trying to reconstruct the modifications by SAMP made to the PAWN compiler. That actually started when I thought that the compiler was quite slow and I tried to find out why, which in fact I did, at least partially (there was a bug in the staging buffer which caused the buffer to be reallocated everytime something was written to it and slowed compilation time down by around 20% (from 9 seconds down to 11-13 in a script I tested, especially had a huge impact on scripts with large global variables)).

So I started with the same version used by SAMP (3.2.3664) and started with fixing that bug and adding (constant) string concatenation (which was used by the script I tested). Later I also changed some other things like strings starting with a # or string indexing ("teststring"[2]) and some other things. However I have to admit that I'm not really familiar with compilers at all, I just tried to understand the PAWN compiler and made the changes where I thought they would be the easiest (so especially the string stuff may look like a quite bad workaround).
Also it's not yet tested that good and not everything that works in the SAMP compiler does work yet (e.g. some preprocessor definitions as they are used in YSI, which seems to be caused by the Ј characters, I didn't look into that any further yet), however many scripts I tried to compile did compile (as long as they don't use YSI).

So this is just a beginning/work-in-progress, that I started and released to probably also get someone who already knows the compiler better to help as well Though the compiler should be already usable for many scripts and cases.
I think it would be good to have the (or a similar) source of the compiler back, because there are a few bugs in the current compiler that could be fixed and also, it could finally be compiled for Linux as well

I created a project on GitHub for this (though I think I made some changes to a header file regarding an issue compiling the compiler on x64 Linux (which caused CELL_MAX to be zero) that aren't in the repo yet):
https://github.com/Fabsch/pawnccsamp
Reply


Messages In This Thread
(Partly) reconstructed PAWN compiler - by Fabsch - 19.08.2013, 16:51
Re: (Partly) reconstructed PAWN compiler - by celice - 19.08.2013, 20:36
Re: (Partly) reconstructed PAWN compiler - by czerwony03 - 19.08.2013, 22:01
Re: (Partly) reconstructed PAWN compiler - by HyDrAtIc - 20.08.2013, 22:47
Re: (Partly) reconstructed PAWN compiler - by Cell_ - 07.09.2013, 18:11
Re: (Partly) reconstructed PAWN compiler - by QuaTTrO - 15.09.2013, 14:55
Re: (Partly) reconstructed PAWN compiler - by leong124 - 21.09.2013, 07:45
Re: (Partly) reconstructed PAWN compiler - by IstuntmanI - 21.09.2013, 07:55
Re: (Partly) reconstructed PAWN compiler - by leong124 - 21.09.2013, 09:12

Forum Jump:


Users browsing this thread: 1 Guest(s)