ADTast-experimentalenumforall-pointer-decaypthread-emulationqualifiedEnum
Last change
on this file since d7e9c12 was
7583c02,
checked in by Fangren Yu <f37yu@…>, 4 years ago
|
partially improve #226: resolver environment size reduced to O(n)
generated code still has exponential size. should cache resolved implicits
and reuse thunks to reduce generated code size.
assertion fails cannot exit early and may have a minor performance
reduction.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2015 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 | // RenameVars.h -- |
---|
8 | // |
---|
9 | // Author : Richard C. Bilson |
---|
10 | // Created On : Sun May 17 12:10:28 2015 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Sat Jul 22 09:33:54 2017 |
---|
13 | // Update Count : 4 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include <list> // for list |
---|
19 | #include <map> // for map |
---|
20 | #include <string> // for string |
---|
21 | |
---|
22 | #include "SynTree/SynTree.h" // for Visitor Nodes |
---|
23 | #include "SynTree/Visitor.h" // for Visitor |
---|
24 | |
---|
25 | namespace ast { |
---|
26 | class Type; |
---|
27 | } |
---|
28 | |
---|
29 | namespace ResolvExpr { |
---|
30 | /// Provides a consistent renaming of forall type names in a hierarchy by prefixing them with a unique "level" ID |
---|
31 | void renameTyVars( Type * ); |
---|
32 | |
---|
33 | enum RenameMode { |
---|
34 | GEN_USAGE, // for type in VariableExpr |
---|
35 | GEN_EXPR_ID // for type in decl |
---|
36 | }; |
---|
37 | const ast::Type * renameTyVars( const ast::Type *, RenameMode mode = GEN_USAGE, bool reset = true ); |
---|
38 | |
---|
39 | |
---|
40 | /// resets internal state of renamer to avoid overflow |
---|
41 | void resetTyVarRenaming(); |
---|
42 | |
---|
43 | |
---|
44 | } // namespace ResolvExpr |
---|
45 | |
---|
46 | // Local Variables: // |
---|
47 | // tab-width: 4 // |
---|
48 | // mode: c++ // |
---|
49 | // compile-command: "make install" // |
---|
50 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.