source: src/Virtual/Tables.h @ 9e27f69

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 9e27f69 was 69c5c00, checked in by Andrew Beach <ajbeach@…>, 4 years ago

Rework exceptions mark_exception -> get_exception_vtable and the needed follow up.

  • Property mode set to 100644
File size: 1.6 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 : Tue Sep  1 14:29:00 2020
13// Update Count     : 0
14//
15
16#include <list>  // for list
17
18class Declaration;
19class StructDecl;
20class Expression;
21
22namespace Virtual {
23
24std::string vtableTypeName( std::string const & type_name );
25std::string instanceName( std::string const & vtable_name );
26std::string vtableInstanceName( std::string const & type_name );
27bool isVTableInstanceName( std::string const & name );
28
29ObjectDecl * makeVtableForward( StructInstType * vtableType );
30/* Create a forward declaration of a vtable of the given type.
31 * vtableType node is consumed.
32 */
33
34ObjectDecl * 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.
41FunctionDecl * 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
46FunctionDecl * makeGetExceptionFunction(
47        ObjectDecl * vtableInstance, Type * exceptType );
48/* Create the definition of the exception virtual function.
49 * exceptType node is consumed.
50 */
51
52}
Note: See TracBrowser for help on using the repository browser.