2012-12-26 18:15:40 +00:00
|
|
|
GMQCC is quite feature complete. But that doesn't address the fact that
|
2012-12-16 22:52:17 +00:00
|
|
|
it can be improved. This is a list of things that we'd like to support
|
2012-12-16 22:48:46 +00:00
|
|
|
in the distant future. When the time comes, we can just select a topic
|
|
|
|
from here and open a ticket for it on the issue tracker. But for the
|
|
|
|
meantime, this is sort of a cultivating flat file database.
|
|
|
|
|
|
|
|
Optimizations:
|
|
|
|
The following are optimizations that can be implemented after the
|
|
|
|
transformation into static-single assignment (SSA).
|
|
|
|
|
|
|
|
Global Value Numbering:
|
|
|
|
Eliminate redundancy by constructing a value graph of the source
|
2012-12-26 18:15:40 +00:00
|
|
|
then determining which values are computed by equivalent expressions.
|
|
|
|
Similar to Common Subexpression Elimination (CSE), however expressions
|
|
|
|
are determined via underlying equivalence, opposed to lexically identical
|
2012-12-16 22:48:46 +00:00
|
|
|
expressions (CSE).
|
|
|
|
|
2012-12-26 18:15:40 +00:00
|
|
|
Spare Conditional Constant Propagation:
|
|
|
|
Simultaneously remove dead code and propagates constants. This is
|
|
|
|
not the same as individual dead code elimination and constant propagation
|
2012-12-16 22:48:46 +00:00
|
|
|
passes. This is multipass.
|
|
|
|
|
|
|
|
The following are optimizations that can be implemented before the
|
|
|
|
transformation into a binary (code generator).
|
|
|
|
|
|
|
|
Code factoring:
|
|
|
|
The process of finding sequences of code that are identical,
|
|
|
|
or can be parameterized or reordered to be identical.
|
|
|
|
Which can be replaced with calls to a shared subroutine. To
|
|
|
|
reduce duplicated code. (Size optimization)
|
|
|
|
|
|
|
|
Language Features:
|
|
|
|
The following are language features that we'd like to see implemented in the
|
|
|
|
future.
|
|
|
|
|
|
|
|
AST Macros:
|
2012-12-26 18:15:40 +00:00
|
|
|
Macros with sanity. Not textual substiution.
|
2012-12-16 22:48:46 +00:00
|
|
|
|
|
|
|
Classes:
|
|
|
|
Like C++, but minus the stupidity:
|
|
|
|
- No type operator overloads
|
|
|
|
- Keep operator overloading for basic operators though.
|
2012-12-26 18:15:40 +00:00
|
|
|
- No inheritance
|
2012-12-16 22:52:17 +00:00
|
|
|
- No virtuals / pure virtuals
|
|
|
|
- Essentially "C structs but with operators" :)
|
2012-12-16 22:48:46 +00:00
|
|
|
|
|
|
|
Arrays:
|
|
|
|
They're currently implemented, but support in the engine
|
|
|
|
plus implicit bounds checks (and ability to turn the bounds
|
2012-12-16 22:52:17 +00:00
|
|
|
checking off)
|
2012-12-16 22:48:46 +00:00
|
|
|
|
|
|
|
Exceptions:
|
|
|
|
I feel like all languages suck at implementing this. This would
|
|
|
|
require support from the engine, but it would help catch bugs. We
|
|
|
|
could make it fast using a neat method of "frame pointers".
|
|
|
|
|
|
|
|
Overloaded Functions:
|
2012-12-16 22:52:17 +00:00
|
|
|
Ability to make individual functions with the same name, but take
|
2012-12-16 22:48:46 +00:00
|
|
|
different amount of arguments or type of arguments.
|
|
|
|
|
2012-12-26 18:15:40 +00:00
|
|
|
Default Argument Substiution:
|
2012-12-16 22:48:46 +00:00
|
|
|
Ability to specify default values for arguments in functions.
|
|
|
|
void foo(string bar, string baz="default");
|
|
|
|
Supplying just one argument will expand the second argument to
|
|
|
|
become "default", otherwise if two arguments are specified then
|
|
|
|
the "default" string is overrode with what ever the user passes.
|
|
|
|
|
|
|
|
Character Type:
|
|
|
|
A char type would be nice to have. Essentially implemented as a
|
|
|
|
string, we can both "get" and "set" indices inside strings with
|
|
|
|
the help of builtin functions.
|
|
|
|
|
|
|
|
{
|
|
|
|
string foo = "test";
|
|
|
|
foo[0] = 'r';
|
|
|
|
|
|
|
|
print("it's time to ", foo);
|
|
|
|
}
|
|
|
|
|
|
|
|
Array Accessor With C-Semantics:
|
2012-12-26 18:15:40 +00:00
|
|
|
Also the ability to use them as array accessors:
|
2012-12-16 22:48:46 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
float hugearray['Z'];
|
|
|
|
|
|
|
|
hugearray['a'] = 100.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
Keep existing "pointer-like" semantics as well. In C arrays
|
|
|
|
simple work as pointers, a[1] -> *(a+1), or 1[a] -> *(1+a)
|
|
|
|
so we should allow both forms of syntax. As well as operand
|
|
|
|
reversal.
|
|
|
|
|
|
|
|
{
|
|
|
|
float h['Z'];
|
|
|
|
*(h+'a') = 100;
|
|
|
|
*('a'+h) = 'a'[h];
|
|
|
|
}
|
|
|
|
|
|
|
|
FTEQCC Inline Assembly:
|
|
|
|
This is still up for debate, mainly because a) it's syntax is
|
|
|
|
just utter crap. b) If we do an assembler, it should be nice.
|
|
|
|
we could provide a -std=fteqcc for the assembler itself :P
|
|
|
|
just like the compiler; although I think that's just insane.
|
|
|
|
|
|
|
|
Please see Assembler below.
|
|
|
|
|
|
|
|
Namespaces:
|
|
|
|
There is already a ticket open on this. They'd work just like C++
|
|
|
|
identically even.
|
|
|
|
|
|
|
|
Standalone QCVM:
|
|
|
|
The following are QCVM additions:
|
|
|
|
|
2012-12-26 18:15:40 +00:00
|
|
|
Proper ASM disassembly:
|
|
|
|
Proper disassembly of compiled .dat files. Annotated if possible
|
2012-12-16 22:48:46 +00:00
|
|
|
when -g (is used during compilation)
|
|
|
|
|
|
|
|
Debugging:
|
2012-12-26 18:15:40 +00:00
|
|
|
A step-through debugger -d (with separate compilation as well)
|
2012-12-16 22:48:46 +00:00
|
|
|
Called -> qcdb Optionally alias to qcvm -d :)
|
|
|
|
|
2012-12-26 18:15:40 +00:00
|
|
|
We should be able to see the assembly and source it matches to
|
2012-12-16 22:48:46 +00:00
|
|
|
and the state of OFS_* and calls.
|
|
|
|
|
|
|
|
Testsuite:
|
2012-12-26 18:15:40 +00:00
|
|
|
The following are things we'd like to see added to the testsuite
|
2012-12-16 22:48:46 +00:00
|
|
|
in the distant future:
|
|
|
|
|
|
|
|
Multithreading:
|
|
|
|
Chances are when we start adding more and more tests, executing
|
|
|
|
them individually will be midly slow (even if that's a whole minute)
|
|
|
|
It would be nice to add a -j paramater to allow multiple threads to
|
|
|
|
be used and so we can execute many tests in parallel.
|
|
|
|
|
|
|
|
Interface:
|
2012-12-26 18:15:40 +00:00
|
|
|
Ability to select individual tests, or set parameters manually
|
2012-12-16 22:48:46 +00:00
|
|
|
opposed to using the static task-template files. (A method to
|
|
|
|
override them rather).
|
|
|
|
|
|
|
|
|
|
|
|
Assembler:
|
|
|
|
Possibly support for a future assembler for QCASM. But we're not
|
2012-12-26 18:15:40 +00:00
|
|
|
entirely sure if it makes sense.
|