Changeset 263 in dev for trunk/abdev/BasicCompiler32
- Timestamp:
- Aug 5, 2007, 3:47:49 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Object.cpp
r259 r263 61 61 if( subs.size() == 1 ){ 62 62 char temporary[VN_SIZE]; 63 sprintf( temporary, " ActiveBasic.Core._System_TypeBase.Search(\"\",\"%s\"))", pobj_c->GetName().c_str() );63 sprintf( temporary, "_System_TypeBase_Search(\"\",\"%s\"))", pobj_c->GetName().c_str() ); 64 64 65 65 Opcode_CallProc(temporary, -
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r261 r263 121 121 }; 122 122 123 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allrem, 178 ) );123 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allrem, 178, false ) ); 124 124 } 125 125 else if( userProc.GetName() == "_aullrem" ){ … … 137 137 }; 138 138 139 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_aullrem, 117 ) );139 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_aullrem, 117, false ) ); 140 140 } 141 141 else if( userProc.GetName() == "_allmul" ){ … … 145 145 }; 146 146 147 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allmul, 52 ) );147 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allmul, 52, false ) ); 148 148 } 149 149 else if( userProc.GetName() == "_alldiv" ){ … … 153 153 }; 154 154 155 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_alldiv, 170 ) );155 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_alldiv, 170, false ) ); 156 156 } 157 157 else if( userProc.GetName() == "_aulldiv" ){ … … 168 168 }; 169 169 170 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_aulldiv, 104 ) );170 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_aulldiv, 104, false ) ); 171 171 } 172 172 else if( userProc.GetName() == "_allshl" ){ … … 176 176 }; 177 177 178 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allshl, 31 ) );178 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allshl, 31, false ) ); 179 179 } 180 180 else if( userProc.GetName() == "_allshr" ){ … … 184 184 }; 185 185 186 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allshr, 33 ) );186 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_allshr, 33, false ) ); 187 187 } 188 188 else if( userProc.GetName() == "_aullshr" ){ … … 208 208 }; 209 209 210 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_aullshr, 31 ) );210 compiler.codeGenerator.PutOld( NativeCode( (const char *)Buffer_aullshr, 31, false ) ); 211 211 } 212 212 else{ … … 744 744 745 745 _compile_proc( &userProc ); 746 746 747 /* 747 748 // ログを履く -
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r261 r263 239 239 240 240 //コードと行番号の関係 241 extern LINEINFO *pLineInfo; 242 extern int MaxLineInfoNum; 243 pLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,1); 244 MaxLineInfoNum=0; 241 extern SourceLines oldSourceLines; 242 oldSourceLines.clear(); 245 243 246 244 … … 887 885 888 886 //機械語コードとBasicコードの関係を整理 889 extern LINEINFO *pLineInfo; 890 extern int MaxLineInfoNum; 887 extern SourceLines oldSourceLines; 891 888 int MinObp,MaxObp; 892 LINEINFO *pTempLineInfo; 893 pTempLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,MaxLineInfoNum*sizeof(LINEINFO)); 894 i2=0; 889 SourceLines tempSourceLines; 895 890 MaxObp=0; 896 891 while(1){ 897 for(i3=0,MinObp=0x0FFFFFFF;i3< MaxLineInfoNum;i3++){898 if( pLineInfo[i3].TopObp<MinObp&&MaxObp<pLineInfo[i3].TopObp){899 MinObp= pLineInfo[i3].TopObp;892 for(i3=0,MinObp=0x0FFFFFFF;i3<(int)oldSourceLines.size();i3++){ 893 if(oldSourceLines[i3].GetNativeCodePos()<MinObp&&MaxObp<oldSourceLines[i3].GetNativeCodePos()){ 894 MinObp=oldSourceLines[i3].GetNativeCodePos(); 900 895 i4=i3; 901 896 } 902 897 } 903 898 if(MinObp==0x0FFFFFFF) break; 904 pTempLineInfo[i2]=pLineInfo[i4]; 905 MaxObp=pTempLineInfo[i2].TopObp; 906 i2++; 907 } 908 HeapDefaultFree(pLineInfo); 909 pLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,i2*sizeof(LINEINFO)); 910 memcpy(pLineInfo,pTempLineInfo,i2*sizeof(LINEINFO)); 911 MaxLineInfoNum=i2; 912 HeapDefaultFree(pTempLineInfo); 899 tempSourceLines.push_back( oldSourceLines[i4] ); 900 MaxObp=tempSourceLines.back().GetNativeCodePos(); 901 } 902 oldSourceLines = tempSourceLines; 913 903 914 904 //デバッグセクションを生成 … … 1216 1206 delete pobj_GlobalVarSchedule; 1217 1207 1218 /* 1208 1219 1209 compiler.linker.SetImageBase( ImageBase ); 1220 1210 compiler.linker.ResolveDataTableSchedules( MemPos_DataSection ); 1221 1211 compiler.linker.ResolveDllProcSchedules( MemPos_CodeSection, MemPos_ImportSection, LookupSize, HintSize ); 1222 1212 compiler.linker.ResolveUserProcSchedules( MemPos_CodeSection ); 1223 compiler.linker.ResolveDataTableSchedules( MemPos_RWSection ); 1224 */ 1213 compiler.linker.ResolveGlobalVarSchedules( MemPos_RWSection ); 1214 1215 if( obp == compiler.linker.GetNativeCode().GetSize() ) 1216 { 1217 //memcpy( OpBuffer, compiler.linker.GetNativeCode().GetCodeBuffer(), compiler.linker.GetNativeCode().GetSize() ); 1218 } 1219 else 1220 { 1221 SetError(); 1222 } 1223 1225 1224 1226 1225
Note:
See TracChangeset
for help on using the changeset viewer.