Changeset 14c0f7b for src/SymTab
- Timestamp:
- Jul 31, 2023, 11:25:51 AM (16 months ago)
- Branches:
- master
- Children:
- f496046
- Parents:
- e0332dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/GenImplicitCall.cpp
re0332dd r14c0f7b 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.