- Timestamp:
- Jul 19, 2021, 4:03:19 PM (5 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
- Children:
- f9b68d6
- Parents:
- 12a1013 (diff), fcaa1e4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/AST
- Files:
-
- 7 edited
-
Convert.cpp (modified) (3 diffs)
-
Fwd.hpp (modified) (1 diff)
-
Pass.hpp (modified) (1 diff)
-
Pass.impl.hpp (modified) (1 diff)
-
Print.cpp (modified) (1 diff)
-
Type.hpp (modified) (2 diffs)
-
Visitor.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r12a1013 r63bde81 9 9 // Author : Thierry Delisle 10 10 // Created On : Thu May 09 15::37::05 2019 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Mar 12 18:43:51202113 // Update Count : 3 611 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jul 14 16:15:00 2021 13 // Update Count : 37 14 14 // 15 15 … … 1356 1356 } 1357 1357 1358 const ast::Type * visit( const ast::VTableType * node ) override final { 1359 return visitType( node, new VTableType{ 1360 cv( node ), 1361 get<Type>().accept1( node->base ) 1362 } ); 1363 } 1364 1358 1365 const ast::Type * visit( const ast::VarArgsType * node ) override final { 1359 1366 return visitType( node, new VarArgsType{ cv( node ) } ); … … 2799 2806 } 2800 2807 2808 virtual void visit( const VTableType * old ) override final { 2809 visitType( old, new ast::VTableType{ 2810 GET_ACCEPT_1( base, Type ), 2811 cv( old ) 2812 } ); 2813 } 2814 2801 2815 virtual void visit( const AttrType * ) override final { 2802 2816 assertf( false, "AttrType deprecated in new AST." ); -
src/AST/Fwd.hpp
r12a1013 r63bde81 117 117 class TupleType; 118 118 class TypeofType; 119 class VTableType; 119 120 class VarArgsType; 120 121 class ZeroType; -
src/AST/Pass.hpp
r12a1013 r63bde81 213 213 const ast::Type * visit( const ast::TupleType * ) override final; 214 214 const ast::Type * visit( const ast::TypeofType * ) override final; 215 const ast::Type * visit( const ast::VTableType * ) override final; 215 216 const ast::Type * visit( const ast::VarArgsType * ) override final; 216 217 const ast::Type * visit( const ast::ZeroType * ) override final; -
src/AST/Pass.impl.hpp
r12a1013 r63bde81 1873 1873 1874 1874 //-------------------------------------------------------------------------- 1875 // VTableType 1876 template< typename core_t > 1877 const ast::Type * ast::Pass< core_t >::visit( const ast::VTableType * node ) { 1878 VISIT_START( node ); 1879 1880 VISIT( 1881 maybe_accept( node, &VTableType::base ); 1882 ) 1883 1884 VISIT_END( Type, node ); 1885 } 1886 1887 //-------------------------------------------------------------------------- 1875 1888 // VarArgsType 1876 1889 template< typename core_t > -
src/AST/Print.cpp
r12a1013 r63bde81 1416 1416 } 1417 1417 1418 virtual const ast::Type * visit( const ast::VTableType * node ) override final { 1419 preprint( node ); 1420 os << "vtable for "; 1421 safe_print( node->base ); 1422 1423 return node; 1424 } 1425 1418 1426 virtual const ast::Type * visit( const ast::VarArgsType * node ) override final { 1419 1427 preprint( node ); -
src/AST/Type.hpp
r12a1013 r63bde81 10 10 // Created On : Thu May 9 10:00:00 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Jul 23 14:15:00 202013 // Update Count : 612 // Last Modified On : Wed Jul 14 15:54:00 2021 13 // Update Count : 7 14 14 // 15 15 … … 491 491 }; 492 492 493 /// Virtual Table Type `vtable(T)` 494 class VTableType final : public Type { 495 public: 496 ptr<Type> base; 497 498 VTableType( const Type * b, CV::Qualifiers q = {} ) : Type(q), base(b) {} 499 500 const Type * accept( Visitor & v ) const override { return v.visit( this ); } 501 private: 502 VTableType * clone() const override { return new VTableType{ *this }; } 503 MUTATE_FRIEND 504 }; 505 493 506 /// GCC built-in varargs type 494 507 class VarArgsType final : public Type { -
src/AST/Visitor.hpp
r12a1013 r63bde81 105 105 virtual const ast::Type * visit( const ast::TupleType * ) = 0; 106 106 virtual const ast::Type * visit( const ast::TypeofType * ) = 0; 107 virtual const ast::Type * visit( const ast::VTableType * ) = 0; 107 108 virtual const ast::Type * visit( const ast::VarArgsType * ) = 0; 108 109 virtual const ast::Type * visit( const ast::ZeroType * ) = 0;
Note:
See TracChangeset
for help on using the changeset viewer.