Add a new "dumpn" pseudo-opcode that dumps N copies of the same value
to the stage buffer. It's basically the same as "dump" but much faster
when dumping the same value a lot of times, for example, when writing
initial values for large arrays.
On my Linux system the time it took to dump a 100000000 cell array went
down from 20 to 8 seconds in Release configuration, i.e. 2.5 times faster!
I haven't profiled further yet (Visual Studio 2017 profiler is broken,
gprof won't output anything (I'm probably doing it wrong), I might try
valgrind later).
static const Test[2][][2] = { { { 9, 8 } }, { { 6, 7 } } };
The above code causes a memory corruption as the compiler does not
correctly calculate the size of the array.
This commit adds code to fix it.
Solves the bug described in issue #117
new [][2][3] = { //default values };
The compiler does not create enough room for the indirection tables and
hence adjust_indirectiontables overwrites the default values leaving the
array wrongly initilized.
Adds a generic code which works for any n-dimensional arrays (n = 1,
2,3,4,5... infinity). The code fixes the issue for any dimension but the
number of dimensions is limited to 4 (sDIMEN_MAX). A review of this code
won't be required if the limit is increased in the future.
Only reparse if the function has a tagged result (old behavior) or a
global variable is passed as one of its arguments at some point before
declaration/definition.
Also warn if need to reparse so that developers are aware of potential
performance hit.
Fixes#131.
__PawnBuild holds the currnt build number. This allows you to detect
which compiler version is used more precisely.
It will be set to 1 on next release and incremented on each subsequent
release.
Closes#132.
As the comment right above those lines states, fread() may return a value
less than the actual file size beacuse of text conversion done by the
system. So why do it?
This fixes a bug on Windows where the compiler couldn't read the contents
of pawn.cfg because of this check. Interestingly enough, it could read the
source files just fine.
Fixes#90