Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A batch of improvements for the '__emit' operator #421

Merged
merged 21 commits into from
Jun 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4c8d56c
__emit: Issue an error if the stack offset/data address is not a mult…
Daniel-Cortez Nov 24, 2018
00e3e00
__emit: Don't accept numeric constants for arguments of type 'data of…
Daniel-Cortez Nov 24, 2018
e93817b
__emit: Display proper argument type names in error messages for argu…
Daniel-Cortez Nov 24, 2018
4c79811
__emit: Don't mark functions as uWRITTEN
Daniel-Cortez Nov 24, 2018
f6c9db9
__emit: Properly display error messages on type mismatch for argument…
Daniel-Cortez Nov 24, 2018
1ad1448
__emit: Take in account local symbols for arguments of type 'function'
Daniel-Cortez Nov 25, 2018
9fb9bbb
__emit: Allow expressions for arguments of type 'shift'
Daniel-Cortez Nov 25, 2018
69a573a
__emit: Remove index check for opcodes 'lctrl' and 'sctrl'
Daniel-Cortez Nov 25, 2018
3c1ac1e
__emit: Fix crash on attempt to reference a native
Daniel-Cortez Nov 26, 2018
32528e7
__emit: Code cleanup
Daniel-Cortez Dec 27, 2018
86f2b78
__emit: Do not allow to pass references (passed by reference function…
Daniel-Cortez Dec 29, 2018
6277969
__emit: Display the type of passed-by-reference arrays in error messa…
Daniel-Cortez Dec 30, 2018
4b490e8
Fix potential buffer overrun in #emit and __emit
Daniel-Cortez Jan 1, 2019
40dace7
__emit: Change the format of errors related to invalid use of the '-'…
Daniel-Cortez Apr 3, 2019
3c370ff
__emit: Fix previously undetected error case related to invalid use o…
Daniel-Cortez Apr 3, 2019
4c260e6
__emit: Allow negative offsets for arguments of type 'local variable'
Daniel-Cortez Apr 4, 2019
2cfcd21
__emit: Implement pseudo-opcodes
Daniel-Cortez May 28, 2019
dfefdf3
__emit: Add tests
Daniel-Cortez May 28, 2019
8394b5a
__emit: Make sure the opcode table is sorted
Daniel-Cortez Jun 3, 2019
991eed9
__emit: Remove excessive local block
Daniel-Cortez Jun 7, 2019
5c4e0c2
__emit: Fix undefined behavior
Daniel-Cortez Jun 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions source/compiler/sc.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,14 @@ enum {
tLABEL,
tSTRING,
/* argument types for emit/__emit */
teANY , /* any value */
teANY, /* any value */
teNUMERIC, /* integer/rational number */
teDATA , /* data (variable name or address) */
teDATA, /* data (variable name or address) */
teLOCAL, /* local variable (name or offset) */
teREFERENCE, /* function argument passed by reference */
teFUNCTN, /* Pawn function */
teNATIVE, /* native function */
teNONNEG , /* nonnegative integer */
teNONNEG, /* nonnegative integer */
/* for assigment to "lastst" only (see SC1.C) */
tEXPR,
tENDLESS, /* endless loop */
Expand Down Expand Up @@ -920,9 +921,9 @@ SC_VDECL FILE *outf; /* file written to */
SC_VDECL jmp_buf errbuf; /* target of longjmp() on a fatal error */

/* Possible entries for "emit_flags"
* Bits: 0 (epmBLOCK) multiline ('{}' block) syntax
* 1 (epmEXPR) used within an expression
* 2 (epmGLOBAL) used outside of a function
* Bits: 0 (efBLOCK) multiline ('()' block) syntax
* 1 (efEXPR) used within an expression
* 2 (efGLOBAL) used outside of a function
*/
#define efBLOCK 1
#define efEXPR 2
Expand Down
Loading