Changeset 436 in dev for trunk/abdev/BasicCompiler64/CParameter.cpp
- Timestamp:
- Mar 15, 2008, 3:33:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/CParameter.cpp
r331 r436 65 65 int reg = REG_RAX; 66 66 Type calcType; 67 NumOpe( ®, Parms[i2], dummyType, calcType ); 67 bool isNeedHeapFreeStructure; 68 NumOpe( ®, Parms[i2], dummyType, calcType, &isNeedHeapFreeStructure ); 68 69 69 70 if( !calcType.IsStruct() ){ … … 86 87 i2); 87 88 88 if( result ){ 89 if( result ) 90 { 89 91 useTempParameters[i2] = true; 92 isNeedFreeStructures[i2] = isNeedHeapFreeStructure; 90 93 useTempObject = true; 91 94 … … 109 112 // 構造体の一時メモリ 110 113 111 //メモリを解放する 112 113 pobj_sf->pop( REG_RCX ); 114 115 //call free 116 extern const UserProc *pSub_free; 117 compiler.codeGenerator.op_call(pSub_free); 118 } 119 else{ 114 if( isNeedFreeStructures[i2] ) 115 { 116 //メモリを解放する 117 118 pobj_sf->pop( REG_RCX ); 119 120 //call free 121 extern const UserProc *pSub_free; 122 compiler.codeGenerator.op_call(pSub_free); 123 } 124 else 125 { 126 pobj_sf->pop(); 127 } 128 } 129 else 130 { 120 131 pobj_sf->pop(); 121 132 pobj_sf->pop(); … … 148 159 149 160 Type calcType; 150 BOOL bUseHeap;161 bool isNeedHeapFreeStructure; 151 162 int temp_reg=REG_RAX; 152 163 NumOpe( &temp_reg, … … 154 165 baseType, 155 166 calcType, 156 & bUseHeap);167 &isNeedHeapFreeStructure ); 157 168 158 169 … … 169 180 baseType, 170 181 calcType, 171 &RelativeVar, bUseHeap);182 &RelativeVar,isNeedHeapFreeStructure); 172 183 173 184 … … 282 293 temp_reg=reg; 283 294 284 BOOL bCalcUseHeap;285 295 Type calcType; 286 if( !NumOpe( &temp_reg, Parms[i2], dummyType, calcType, &bCalcUseHeap ) ){ 296 bool isNeedHeapFreeStructure; 297 if( !NumOpe( &temp_reg, Parms[i2], dummyType, calcType, &isNeedHeapFreeStructure ) ){ 287 298 break; 288 299 } … … 294 305 !dummyType.GetClass().IsEqualsOrSubClass( &calcType.GetClass() ) ){ 295 306 //キャスト演算子のオーバーロードに対応する 296 CallCastOperatorProc( reg, calcType, bCalcUseHeap,dummyType );307 CallCastOperatorProc( reg, calcType, isNeedHeapFreeStructure,dummyType ); 297 308 } 298 309 }
Note:
See TracChangeset
for help on using the changeset viewer.