Y-Less
18b6df7c12
Merge branch 'dev' into __addrof
2019-11-07 01:35:51 +01:00
Amyr Ahmady
d3c0cf6bae
remove emit
keyword
2019-10-01 17:30:00 +03:30
Daniel_Cortez
1d3b2319fd
Implement operator '__addressof'
2019-09-18 19:50:28 +07:00
Daniel_Cortez
65070b6563
Allow symbols to be referenced from outside functions
2019-09-13 19:33:07 +07:00
Daniel_Cortez
ef49529b50
Symbol suggestions: distinguish native functions and Pawn functions
2019-09-13 19:31:35 +07:00
Zeex
c9b3e44bcb
Merge pull request #378 from Y-Less/Branch_pragma_nodestruct
...
Branch pragma nodestruct
2019-06-17 10:58:07 +06:00
Stanislav Gromov
0cb9fb3ff6
Misc. minor fixes ( #423 )
...
* Misc. minor fixes
* Fix OOB array access in encode_cell()
* Fix memory leaks in plungequalifiedfile()
* Remove redundant NULL pointer checks
* Fix invalid uses of realloc()
* Remove 'do_switch()'
* Don't use 'strlen()' to identify empty strings
* Other minor fixes
* Fix incorrect error message when compression is ineffective
* Add macro 'strempty' to identify empty strings
2019-06-17 02:57:49 +02:00
Zeex
e645ffceef
Merge pull request #397 from Daniel-Cortez/suggestions-fix
...
More fixes related to suggestions
2019-06-16 12:48:26 +06:00
Daniel_Cortez
86f2b783f8
__emit: Do not allow to pass references (passed by reference function arguments) to 'stor.s.pri/alt', 'inc.s', 'dec.s' and 'zero.s'
2019-04-28 18:51:44 +07:00
Daniel_Cortez
32528e701a
__emit: Code cleanup
2019-04-28 18:51:27 +07:00
Yashas
797fdfc06b
Revert "force sc_tokens
size and token enumeration size to match"
...
This reverts commit d60ef405c9f3eca13dd7e505c8c330ec0241ff02.
2019-01-19 13:29:00 +05:30
Daniel_Cortez
b411e5a7bc
Switch from symbol subtypes to symbol subtype flags
...
The new system should be more flexible as it allows to combine symbol subtypes.
2018-12-31 21:44:10 +07:00
Yashas
d60ef405c9
force sc_tokens
size and token enumeration size to match
2018-12-31 10:34:38 +05:30
Yashas
01c2dcaeb4
change tINCLUDE
to toINCLUDE
2018-12-25 21:03:44 +05:30
Yashas
dadc182aba
rename flgDEPRECATED
to flagDEPRECATED
2018-12-25 21:02:20 +05:30
Yashas
a9970bb452
remove the unused tDBLCOLON
token
2018-12-25 20:59:51 +05:30
Yashas
1c0992cd03
use enum
for defining tokens
2018-12-24 11:39:57 +05:30
Y-Less
9a16724b6a
Write .lst
after the second pass. ( #375 )
2018-10-24 10:07:00 +01:00
Y_Less
4dd38ffd82
#pragma nodestruct var, names
2018-10-04 15:27:59 +02:00
Daniel_Cortez
bc04b2ef04
Show suggestions for mistyped identifiers ( #353 )
2018-09-29 07:03:44 +06:00
Zeex
16995c5ee1
Whitespace cleanup
2018-08-11 23:12:45 +06:00
Adrian Graber
0c9ddcfad1
Don't generate function preamble on naked functions
2018-07-08 18:00:15 +02:00
Yashas
fd4369e67b
debug info for index tagmm warnings
...
This commit makes the compiler display debug information for "index" tag mismatch warnings.
2018-05-08 09:43:34 +05:30
Zeex
892744313d
Merge pull request #255 from Daniel-Cortez/constvalue-opt
...
Memoize the last node in constvalue lists
2018-04-22 19:19:43 +06:00
Daniel_Cortez
9ca1b4a61e
Redo constvalue list optimisation
2018-02-22 03:51:42 +07:00
Daniel_Cortez
1dac1a2d70
emit: Make the compiler tell it expects "any value" for arguments of type 'any'
2018-02-12 12:31:44 +07:00
Daniel_Cortez
3c252211f0
emit: Minor adjustments
2018-02-12 12:31:41 +07:00
Daniel_Cortez
fdae3827f2
emit: Minor fixes/adjustments
2018-02-01 03:11:31 +07:00
Daniel_Cortez
a19b740a28
emit: Allow the use of labels in arguments of type 'any'
2018-02-01 02:49:59 +07:00
Daniel_Cortez
f0a1d3ead0
emit: Add new argument type: 'non-negative integer'
2018-02-01 02:49:58 +07:00
Daniel_Cortez
ca01cbdf7d
emit: Redo instruction output
2018-02-01 02:49:58 +07:00
Yashas
345b415d55
debug info for tagmismatch warnings
...
This commit adds useful information to the "tag mismatch" warning.
2018-01-18 21:41:26 +05:30
Daniel_Cortez
30e1ef9389
Memoize the last node in constvalue lists
2018-01-12 23:30:04 +07:00
Daniel_Cortez
8b3583e7b5
Replace the hashmap implementation with a hashtable by Mattias Gustavsson
2018-01-07 02:35:08 +07:00
Daniel_Cortez
939c06011d
emit/__emit: Another syntax change
2017-12-10 03:51:19 +07:00
Daniel_Cortez
d5691209d6
emit/__emit: Move the "anti-optimisation" workaround to 'emit_parse_line()'
...
Conflicts:
source/compiler/sc1.c
2017-12-06 21:52:51 +07:00
Daniel_Cortez
59428b0c39
emit/__emit: Code cleanup, misc. adjustments
2017-12-06 17:42:30 +07:00
Daniel_Cortez
907c4b610e
emit/__emit: Syntax change
2017-11-29 21:52:05 +07:00
Daniel_Cortez
7f9be67497
emit/__emit: Change the argument order in 'outinstr()'
...
Now the function takes the array itself before the array size, as the argument handlers in sc1.c do.
2017-11-18 23:43:32 +07:00
Daniel_Cortez
912376b658
emit/__emit: Check if the argument of instruction 'call' is a Pawn function
2017-11-17 20:03:50 +07:00
Daniel_Cortez
abe9c965dc
emit/__emit: Make type mismatch errors more informative
...
Example:
main()
{
new x;
emit load.pri x
}
Before this commit:
error 017: undefined symbol "x"
After:
error 001: expected token: "-data offset-", but found "-local variable-"
2017-11-17 20:03:50 +07:00
Daniel_Cortez
d15c11f420
Fix OPHANDLER_CALL-related warnings issued by clang on non-x86 targets
2017-11-11 20:50:07 +07:00
Daniel_Cortez
06feab9224
emit/__emit: Code cleanup
2017-11-11 20:50:07 +07:00
Zeex
735291fd64
Merge branch 'performance'
2017-10-28 05:18:36 +06:00
Zeex
4a5e02ef29
Clean up global declarations
2017-10-28 05:05:37 +06:00
Y_Less
f1da832ae9
-E warnings as errors.
2017-10-24 21:18:07 +02:00
Zeex
237d89e7e4
Merge branch 'performance' of https://github.com/maddinat0r/pawn into performance
2017-10-24 08:38:47 +06:00
Zeex
bf514bcd7d
Increase size of literal queue buffer
2017-10-23 08:00:33 +06:00
Zeex
a99e649a6b
Group sequences of repeating literals into one write
...
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).
2017-10-22 12:36:55 +06:00
Daniel_Cortez
aa9f589bf5
Memoize the address of the '__line' symbol instead of searching for it in loctab/glbtab every new line
2017-10-20 23:02:34 +07:00