source: src/Virtual/Tables.h @ 1c01c58

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since 1c01c58 was 1c01c58, checked in by Andrew Beach <ajbeach@…>, 17 months ago

Rather large commit to get coroutine cancellation working.

This includes what you would expect, like new code in exceptions and a new
test, but it also includes a bunch of other things.

New coroutine state, currently just marks that the stack was cancelled. New
helpers for checking code structure and generating vtables. Changes to the
coroutine interface so resume may throw exceptions on cancellation, plus the
exception type that is thrown. Changes to the coroutine keyword generation to
generate exception code for each type of coroutine.

  • 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
29/// Converts exceptions into regular structures.
30//void ( std::list< Declaration * > & translationUnit );
31
32ObjectDecl * makeVtableForward( StructInstType * );
33ObjectDecl * makeVtableForward( StructDecl *, std::list< Expression * > && );
34/* Create a forward definition of a vtable of the given type.
35 *
36 * Instead of the virtual table type you may provide the declaration and all
37 * the forall parameters.
38 */
39
40ObjectDecl * makeVtableInstance( StructInstType *, Type *, Initializer * );
41ObjectDecl * makeVtableInstance(
42        StructDecl *, std::list< Expression * > &&, Type *, Initializer * );
43/* Create an initialized definition of a vtable.
44 *
45 * The parameters are the virtual table type (or the base declaration and the
46 * forall parameters), the object type and optionally an initializer.
47 *
48 * Instead of the virtual table type you may provide the declaration and all
49 * the forall parameters.
50 */
51
52}
Note: See TracBrowser for help on using the repository browser.