Commit Graph

73 Commits

Author SHA1 Message Date
David Anderson
4ec992474e Remove some heinous preprocessor directives.
Gone:
 - #emit (bah-roken!)
 - #pragma compress (useless)
 - #pragma library (useless)
2015-01-03 11:41:37 -08:00
David Anderson
b607bfeca9 Reserve 'builtin' as a keyword. 2014-12-12 21:29:28 -08:00
David Anderson
afeae84340 Replace symbol proxies with type symbols.
Proxies were rather hacky and complicated, and only existed as a
workaround for oddities with constructors. This patch replaces them with
actual type symbols, a very tiny step to semantically getting rid of tags.

This greatly simplifies how we implement constructors, and paves the way
for using methodmap symbols in field expressions.

Since non-value symbols are new to spcomp1, we place a rather
pigeonholed check into primary() to make sure non-value symbols don't
escape into expressions.
2014-12-12 10:10:43 -08:00
David Anderson
94bed806fe Reserve many keywords. 2014-12-09 23:04:13 -08:00
David Anderson
9c98edd104 Rename "union" semantics to "typeset". 2014-12-09 22:36:42 -08:00
David Anderson
68e0645813 Add a view_as operator. 2014-11-30 19:08:25 -08:00
David Anderson
157549e119 Fix a bug where aliased constructors of nullable methodmaps could not be used. 2014-11-30 18:56:37 -08:00
David Anderson
9f5c8b60ae Add a "new" keyword for constructing nullable methodmaps. 2014-11-30 18:38:26 -08:00
David Anderson
4bc7b9243a Define 'this' as a keyword. 2014-11-09 13:01:35 -08:00
David Anderson
22df518ab5 Fix a bug where local dynamic array declarations could be mistakenly parsed as old decls (bug 6280). 2014-11-09 00:15:09 -08:00
David Anderson
c228be83d6 Revert "Fix a bug where local dynamic array declarations could be mistakenly parsed as old decls."
This reverts commit 046f167b6e.
2014-11-09 00:15:00 -08:00
David Anderson
046f167b6e Fix a bug where local dynamic array declarations could be mistakenly parsed as old decls (bug 6279). 2014-11-09 00:12:44 -08:00
David Anderson
099f299113 Fix trailing commas in array literals changing the result of sizeof(). 2014-11-08 23:15:23 -08:00
David Anderson
704e9579f7 Fix comparisons of derived tags (bug 6239). 2014-11-08 20:27:39 -08:00
David Anderson
6d507ceb27 Add a special case for assigning a string literal to a char array. 2014-11-08 02:04:11 -08:00
David Anderson
a8796543af Use symbols for fatal errors and bump them by 20 slots. 2014-11-07 17:41:33 -08:00
David Anderson
2c31b99ce3 Move is_new and has_postdims bits out of declinfo and into typeinfo. 2014-11-07 17:05:27 -08:00
David Anderson
d1aa9a3513 Merge branch 'calli-7' 2014-09-07 15:08:51 -07:00
David Anderson
60eb8ca4bd Merge branch 'master' into calli-5
Conflicts:
	public/amtl/am-utility.h
2014-09-07 15:03:28 -07:00
David Anderson
01d1c0c806 Add a flag for warnings-as-errors. 2014-09-03 11:04:25 -07:00
David Anderson
a1b7c32b29 Add a "union" keyword to replace funcenum. 2014-08-28 14:02:08 -07:00
David Anderson
6db4f31a10 Remove weird tag flags. 2014-08-24 20:47:07 -07:00
David Anderson
c4056aea5d Rewrite the assembly pipeline.
This patch uses SmxBuilder from spcomp2 to replace the old assemble()
pipeline. Instead of generating into an old AMX structure, and then
decoding that into SMX, we now directly generate into SMX. This greatly
simplifies code generation and smx building.
2014-08-23 13:25:58 -07:00
David Anderson
a09735a4c7 Remove SC_FUNC and SC_VDEFINE. 2014-08-22 00:53:47 -07:00
David Anderson
29fbbade69 Port sc1 to C++. 2014-08-22 00:38:04 -07:00
David Anderson
48d228e2b1 Port sc2 to C++. 2014-08-22 00:23:02 -07:00
David Anderson
4608050bd2 Port sc3 to C++. 2014-08-22 00:17:00 -07:00
David Anderson
234b4907ed Port sc4 to C++. 2014-08-22 00:12:16 -07:00
David Anderson
9c005d93ed Port sc5 to C++. 2014-08-22 00:09:28 -07:00
David Anderson
261188fd1b Port a bunch of legwork files to C++. 2014-08-21 23:53:11 -07:00
David Anderson
5a4c50ce55 Port sp_symhash to C++. 2014-08-21 23:36:26 -07:00
David Anderson
e5e2c1fa3d Simplify functag handling. 2014-08-20 00:00:24 -07:00
David Anderson
cef9d9d162 Fix returning strings from functions with variadic arguments. 2014-08-17 01:17:10 -07:00
David Anderson
ad376ff0b8 Introduce a typedef keyword. 2014-08-03 21:51:34 -07:00
David Anderson
686890ec10 Clean up the struct syntax and force it to use newdecls. 2014-07-20 12:16:23 -07:00
David Anderson
805b66e539 Fix null not working with comparisons. 2014-07-17 21:18:49 -07:00
David Anderson
2ea9ec50b5 Merge pull request #91 from alliedmodders/bug-6183
Show errors for methods that are unused. (bug 6183)
2014-07-13 11:24:51 -07:00
David Anderson
5dd5b5131b Show errors for methods that are unused. (bug 6183) 2014-07-12 10:28:29 -07:00
David Anderson
3d3e5c40c2 Fix and formalize newline and semicolon behavior in methodmaps. (bug 6175) 2014-07-12 00:07:34 -07:00
David Anderson
02b7f42811 Unkeyword "class", make it contextual. 2014-07-08 00:44:34 -07:00
David Anderson
2ade122cd2 Merge branch 'master' into fix-null-func
Conflicts:
	sourcepawn/compiler/sc5.scp
2014-07-08 00:06:04 -07:00
David Anderson
e57a323dc8 WIP. 2014-07-07 23:31:31 -07:00
David Anderson
44316d63cc Add setters and fix some methodmap bugs. 2014-07-06 23:37:43 -07:00
David Anderson
9ff38bcf80 Add nulls, and more newdecl and type system features.
New null_t type has a constant "null", which can be assigned to objects.
Methodmaps can now be "nullable", accepting null_t types.
The delete keyword now zaps non-const lvalue inputs.
Fixed some newdecl arguments not accepting references.
Allow functag matching to coerce arguments and return values.
Allow functags to accept new-style types as a return value.
2014-07-05 13:20:06 -07:00
David Anderson
680a8e0283 Fix tests. 2014-07-05 00:44:46 -07:00
David Anderson
376eb9725e Add support for new-style declarations in local variables. 2014-07-04 21:16:39 -07:00
David Anderson
58b9fd57b2 Remove unused "no-postdims" flag. 2014-07-04 16:41:38 -07:00
David Anderson
3cf9e56a19 Fix various bugs in global newdecl support. 2014-07-04 14:31:56 -07:00
David Anderson
19815d42c3 Add new-style declaration support for global declarations. 2014-07-04 00:37:39 -07:00
David Anderson
ed4cca0225 Bug fixes. 2014-07-03 00:14:12 -07:00