source: src/Virtual/Tables.h @ 26d944c

ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 26d944c 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
RevLine 
[1c01c58]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
[b583113]12// Last Modified On : Wed Apr 21 10:30:00 2021
13// Update Count     : 2
[1c01c58]14//
15
16#include <list>  // for list
17
18class Declaration;
19class StructDecl;
20class Expression;
21
22namespace Virtual {
23
[ecfd758]24std::string typeIdType( std::string const & type_name );
25std::string typeIdName( std::string const & type_name );
[1c01c58]26std::string vtableTypeName( std::string const & type_name );
27std::string instanceName( std::string const & vtable_name );
28std::string vtableInstanceName( std::string const & type_name );
[b583113]29std::string concurrentDefaultVTableName();
[1c01c58]30bool isVTableInstanceName( std::string const & name );
31
[b583113]32ObjectDecl * makeVtableForward(
33        std::string const & name, StructInstType * vtableType );
[69c5c00]34/* Create a forward declaration of a vtable of the given type.
35 * vtableType node is consumed.
[1c01c58]36 */
37
[b583113]38ObjectDecl * makeVtableInstance(
39        std::string const & name,
40        StructInstType * vtableType, Type * objectType,
[69c5c00]41        Initializer * init = nullptr );
[1c01c58]42/* Create an initialized definition of a vtable.
[69c5c00]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.
[1c01c58]56 */
57
[ecfd758]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
[1c01c58]63}
Note: See TracBrowser for help on using the repository browser.