- added static constant arrays. At the moment they can only be defined inside functions due to lack of dedicated storage inside classes for static data.

- added new VM instructions to access the constant tables with a variable index.
- refactored VMFunctionBuilder's constant tables so that they are not limited to one entry per value. While this works fine for single values, it makes it impossible to store constant arrays in here.
This commit is contained in:
Christoph Oelckers 2016-11-20 18:00:37 +01:00
parent bb25c5faaa
commit 5951a9449c
11 changed files with 413 additions and 106 deletions

View file

@ -103,6 +103,7 @@ enum EZCCTreeNodeType
AST_VectorValue,
AST_DeclFlags,
AST_ClassCast,
AST_StaticArrayStatement,
NUM_AST_NODE_TYPES
};
@ -406,6 +407,13 @@ struct ZCC_Statement : ZCC_TreeNode
{
};
struct ZCC_StaticArrayStatement : ZCC_Statement
{
ZCC_Type *Type;
ENamedName Id;
ZCC_Expression *Values;
};
struct ZCC_CompoundStmt : ZCC_Statement
{
ZCC_Statement *Content;