aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/ortho_nodes.common.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-10-17 06:18:36 +0200
committerTristan Gingold <tgingold@free.fr>2018-10-21 08:03:37 +0200
commited7ad157dbecc784bb2df44684442e88431db561 (patch)
tree491533354ca2add405e08869f66c1c74622f97d7 /src/ortho/ortho_nodes.common.ads
parent13000af67c96c2a3417fa321daa3fbf50165f54f (diff)
downloadghdl-ed7ad157dbecc784bb2df44684442e88431db561.tar.gz
ghdl-ed7ad157dbecc784bb2df44684442e88431db561.tar.bz2
ghdl-ed7ad157dbecc784bb2df44684442e88431db561.zip
Rework translation of unbounded and complex types.
Diffstat (limited to 'src/ortho/ortho_nodes.common.ads')
-rw-r--r--src/ortho/ortho_nodes.common.ads20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/ortho/ortho_nodes.common.ads b/src/ortho/ortho_nodes.common.ads
index d0f22b720..30e44d6fd 100644
--- a/src/ortho/ortho_nodes.common.ads
+++ b/src/ortho/ortho_nodes.common.ads
@@ -28,10 +28,12 @@ package ORTHO_NODES is
type O_Tnode is private;
type O_Snode is private;
type O_Dnode is private;
+ type O_Gnode is private;
type O_Fnode is private;
O_Cnode_Null : constant O_Cnode;
O_Dnode_Null : constant O_Dnode;
+ O_Gnode_Null : constant O_Gnode;
O_Enode_Null : constant O_Enode;
O_Fnode_Null : constant O_Fnode;
O_Lnode_Null : constant O_Lnode;
@@ -177,17 +179,17 @@ package ORTHO_NODES is
-- Get the address of a subprogram.
function New_Subprogram_Address (Subprg : O_Dnode; Atype : O_Tnode)
- return O_Cnode;
+ return O_Cnode;
-- Get the address of LVALUE.
-- ATYPE must be a type access whose designated type is the type of LVALUE.
-- FIXME: what about arrays.
- function New_Global_Address (Decl : O_Dnode; Atype : O_Tnode)
+ function New_Global_Address (Lvalue : O_Gnode; Atype : O_Tnode)
return O_Cnode;
-- Same as New_Address but without any restriction.
- function New_Global_Unchecked_Address (Decl : O_Dnode; Atype : O_Tnode)
- return O_Cnode;
+ function New_Global_Unchecked_Address (Lvalue : O_Gnode; Atype : O_Tnode)
+ return O_Cnode;
-------------------
-- Expressions --
@@ -286,12 +288,15 @@ package ORTHO_NODES is
-- base type of ARR.
-- INDEX must be of the type of the array index.
function New_Slice (Arr : O_Lnode; Res_Type : O_Tnode; Index : O_Enode)
- return O_Lnode;
+ return O_Lnode;
-- Get an element of a record or a union.
-- Type of REC must be a record or a union type.
function New_Selected_Element (Rec : O_Lnode; El : O_Fnode)
- return O_Lnode;
+ return O_Lnode;
+
+ function New_Global_Selected_Element (Rec : O_Gnode; El : O_Fnode)
+ return O_Gnode;
-- Reference an access.
-- Type of ACC must be an access type.
@@ -318,6 +323,9 @@ package ORTHO_NODES is
-- Get an lvalue from a declaration.
function New_Obj (Obj : O_Dnode) return O_Lnode;
+ -- Get a global lvalue from a declaration.
+ function New_Global (Decl : O_Dnode) return O_Gnode;
+
-- Return a pointer of type RTPE to SIZE bytes allocated on the stack.
function New_Alloca (Rtype : O_Tnode; Size : O_Enode) return O_Enode;