source: src/Virtual/Tables.h @ 58b2638

ADTast-experimentalenumforall-pointer-decaypthread-emulationqualifiedEnum
Last change on this file since 58b2638 was b583113, checked in by Andrew Beach <ajbeach@…>, 4 years ago

Recovered the polymorphic CoroutineCancelled? exception. The interface might need a bit of polish.

  • Property mode set to 100644
File size: 2.0 KB
Line 
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 : Wed Apr 21 10:30:00 2021
13// Update Count     : 2
14//
15
16#include <list>  // for list
17
18class Declaration;
19class StructDecl;
20class Expression;
21
22namespace Virtual {
23
24std::string typeIdType( std::string const & type_name );
25std::string typeIdName( std::string const & type_name );
26std::string vtableTypeName( std::string const & type_name );
27std::string instanceName( std::string const & vtable_name );
28std::string vtableInstanceName( std::string const & type_name );
29std::string concurrentDefaultVTableName();
30bool isVTableInstanceName( std::string const & name );
31
32ObjectDecl * makeVtableForward(
33        std::string const & name, StructInstType * vtableType );
34/* Create a forward declaration of a vtable of the given type.
35 * vtableType node is consumed.
36 */
37
38ObjectDecl * makeVtableInstance(
39        std::string const & name,
40        StructInstType * vtableType, Type * objectType,
41        Initializer * init = nullptr );
42/* Create an initialized definition of a vtable.
43 * vtableType and init (if provided) nodes are consumed.
44 */
45
46// Some special code for how exceptions interact with virtual tables.
47FunctionDecl * makeGetExceptionForward( Type * vtableType, Type * exceptType );
48/* Create a forward declaration of the exception virtual function
49 * linking the vtableType to the exceptType. Both nodes are consumed.
50 */
51
52FunctionDecl * makeGetExceptionFunction(
53        ObjectDecl * vtableInstance, Type * exceptType );
54/* Create the definition of the exception virtual function.
55 * exceptType node is consumed.
56 */
57
58ObjectDecl * makeTypeIdInstance( StructInstType const * typeIdType );
59/* Build an instance of the type-id from the type of the type-id.
60 * TODO: Should take the parent type. Currently locked to the exception_t.
61 */
62
63}
Note: See TracBrowser for help on using the repository browser.