1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // Tables.h -- |
---|
8 | // |
---|
9 | // Author : Andrew Beach |
---|
10 | // Created On : Mon Aug 31 11:07:00 2020 |
---|
11 | // Last Modified By : Andrew Beach |
---|
12 | // Last Modified On : Tue Sep 1 14:29:00 2020 |
---|
13 | // Update Count : 0 |
---|
14 | // |
---|
15 | |
---|
16 | #include <list> // for list |
---|
17 | |
---|
18 | class Declaration; |
---|
19 | class StructDecl; |
---|
20 | class Expression; |
---|
21 | |
---|
22 | namespace Virtual { |
---|
23 | |
---|
24 | std::string vtableTypeName( std::string const & type_name ); |
---|
25 | std::string instanceName( std::string const & vtable_name ); |
---|
26 | std::string vtableInstanceName( std::string const & type_name ); |
---|
27 | bool isVTableInstanceName( std::string const & name ); |
---|
28 | |
---|
29 | ObjectDecl * makeVtableForward( StructInstType * vtableType ); |
---|
30 | /* Create a forward declaration of a vtable of the given type. |
---|
31 | * vtableType node is consumed. |
---|
32 | */ |
---|
33 | |
---|
34 | ObjectDecl * makeVtableInstance( StructInstType * vtableType, Type * objectType, |
---|
35 | Initializer * init = nullptr ); |
---|
36 | /* Create an initialized definition of a vtable. |
---|
37 | * vtableType and init (if provided) nodes are consumed. |
---|
38 | */ |
---|
39 | |
---|
40 | // Some special code for how exceptions interact with virtual tables. |
---|
41 | FunctionDecl * makeGetExceptionForward( Type * vtableType, Type * exceptType ); |
---|
42 | /* Create a forward declaration of the exception virtual function |
---|
43 | * linking the vtableType to the exceptType. Both nodes are consumed. |
---|
44 | */ |
---|
45 | |
---|
46 | FunctionDecl * makeGetExceptionFunction( |
---|
47 | ObjectDecl * vtableInstance, Type * exceptType ); |
---|
48 | /* Create the definition of the exception virtual function. |
---|
49 | * exceptType node is consumed. |
---|
50 | */ |
---|
51 | |
---|
52 | } |
---|