Changeset 2a301ff for src/SymTab/GenImplicitCall.cpp
- Timestamp:
- Aug 31, 2023, 11:31:15 PM (2 years ago)
- Branches:
- master
- Children:
- 950c58e
- Parents:
- 92355883 (diff), 686912c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/GenImplicitCall.cpp
r92355883 r2a301ff 16 16 #include "GenImplicitCall.hpp" 17 17 18 #include "AST/Copy.hpp" // for deepCopy 18 19 #include "AST/Decl.hpp" // for ObjectDecl 19 20 #include "AST/Expr.hpp" // for ConstantExpr, UntypedExpr,... … … 115 116 std::string cmp, update; 116 117 118 const ast::Expr * dimension = deepCopy( array->dimension ); 117 119 if ( forward ) { 118 120 // generate: for ( int i = 0; i < N; ++i ) 119 121 begin = ast::ConstantExpr::from_int( loc, 0 ); 120 end = array->dimension;122 end = dimension; 121 123 cmp = "?<?"; 122 124 update = "++?"; … … 124 126 // generate: for ( int i = N-1; i >= 0; --i ) 125 127 begin = ast::UntypedExpr::createCall( loc, "?-?", 126 { array->dimension, ast::ConstantExpr::from_int( loc, 1 ) } );128 { dimension, ast::ConstantExpr::from_int( loc, 1 ) } ); 127 129 end = ast::ConstantExpr::from_int( loc, 0 ); 128 130 cmp = "?>=?";
Note:
See TracChangeset
for help on using the changeset viewer.