Changes in src/SynTree/Expression.h [0b00df0:2f86ddf]
- File:
-
- 1 edited
-
src/SynTree/Expression.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r0b00df0 r2f86ddf 21 21 #include <memory> // for allocator, unique_ptr 22 22 #include <string> // for string 23 #include <vector> // for vector24 23 25 24 #include "BaseSyntaxNode.h" // for BaseSyntaxNode … … 39 38 /// but subject to decay-to-pointer and type parameter renaming 40 39 struct ParamEntry { 41 ParamEntry(): decl( 0 ), actualType( 0 ), formalType( 0 ), expr( 0 ) /*, inferParams( new InferredParams )*/{}42 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr ) /*, inferParams( new InferredParams )*/{}40 ParamEntry(): decl( 0 ), actualType( 0 ), formalType( 0 ), expr( 0 ), inferParams( new InferredParams ) {} 41 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr ), inferParams( new InferredParams ) {} 43 42 ParamEntry( const ParamEntry & other ); 44 43 ParamEntry( ParamEntry && other ); … … 51 50 Type * formalType; 52 51 Expression * expr; 53 //std::unique_ptr< InferredParams > inferParams;52 std::unique_ptr< InferredParams > inferParams; 54 53 }; 55 54 … … 60 59 TypeSubstitution * env; 61 60 bool extension = false; 62 InferredParams inferParams; ///< Post-resolution inferred parameter slots 63 std::vector<UniqueId> resnSlots; ///< Pre-resolution inferred parameter slots 64 65 // xxx - should turn inferParams+resnSlots into a union to save some memory 61 InferredParams inferParams; 66 62 67 63 Expression(); … … 77 73 bool get_extension() const { return extension; } 78 74 Expression * set_extension( bool exten ) { extension = exten; return this; } 75 76 InferredParams & get_inferParams() { return inferParams; } 79 77 80 78 // move other's inferParams to this … … 593 591 class ImplicitCopyCtorExpr : public Expression { 594 592 public: 595 ApplicationExpr * callExpr; 596 std::list< ObjectDecl * > tempDecls; 597 std::list< ObjectDecl * > returnDecls; 598 std::list< Expression * > dtors; 593 ApplicationExpr * callExpr = nullptr; 599 594 600 595 ImplicitCopyCtorExpr( ApplicationExpr * callExpr ); 601 596 ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ); 602 597 virtual ~ImplicitCopyCtorExpr(); 603 604 ApplicationExpr * get_callExpr() const { return callExpr; }605 void set_callExpr( ApplicationExpr * newValue ) { callExpr = newValue; }606 607 std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }608 std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }609 std::list< Expression * > & get_dtors() { return dtors; }610 598 611 599 virtual ImplicitCopyCtorExpr * clone() const { return new ImplicitCopyCtorExpr( * this ); }
Note:
See TracChangeset
for help on using the changeset viewer.