Changeset 637 in dev for trunk/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- Jun 11, 2008, 10:10:26 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/BreakPoint.cpp
r636 r637 104 104 int i3; 105 105 for(i3=0;i3<(int)oldSourceLines.size()-1;i3++){ 106 if(oldSourceLines[i3].GetSourceCodePos ()==tempCp) break;106 if(oldSourceLines[i3].GetSourceCodePosition().GetPos()==tempCp) break; 107 107 } 108 108 if(i3==oldSourceLines.size()-1){ -
trunk/ab5.0/abdev/BasicCompiler_Common/Compile.cpp
r636 r637 747 747 } 748 748 749 compiler.codeGenerator.NextSourceLine( compiler.GetCurrentRelationalObjectModuleIndexForSource() );749 compiler.codeGenerator.NextSourceLine( SourceCodePosition( compiler.GetCurrentRelationalObjectModuleIndexForSource(), cp ) ); 750 750 751 751 if(Command[0]==1){ -
trunk/ab5.0/abdev/BasicCompiler_Common/Debug.cpp
r636 r637 121 121 int i3; 122 122 for(i3=0;i3<(int)oldSourceLines.size()-1;i3++){ 123 if(oldSourceLines[i3].GetSourceCodePos ()==tempCp) break;123 if(oldSourceLines[i3].GetSourceCodePosition().GetPos()==tempCp) break; 124 124 } 125 125 if(i3==oldSourceLines.size()-1){ -
trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r636 r637 141 141 BOOST_FOREACH( const SourceLine &sourceLine, oldSourceLines ) 142 142 { 143 *(long *)(buffer+i2) = sourceLine.GetLineNum();144 i2+=sizeof(long);145 146 143 *(long *)(buffer+i2) = sourceLine.GetNativeCodePos(); 147 144 i2+=sizeof(long); 148 145 149 *(long *)(buffer+i2) = sourceLine.GetRelationalObjectModuleIndex();150 i2+=sizeof(long);151 152 *(long *)(buffer+i2) = sourceLine.GetSourceCodePos();153 i2+=sizeof(long);154 155 146 *(long *)(buffer+i2) = sourceLine.GetCodeType(); 147 i2+=sizeof(long); 148 149 *(long *)(buffer+i2) = sourceLine.GetSourceCodePosition().GetRelationalObjectModuleIndex(); 150 i2+=sizeof(long); 151 152 *(long *)(buffer+i2) = sourceLine.GetSourceCodePosition().GetPos(); 156 153 i2+=sizeof(long); 157 154 … … 245 242 i2+=sizeof(long); 246 243 for(i3=0;i3<maxLineInfoNum;i3++){ 247 int lineNum = *(long *)(buffer+i2);248 i2+=sizeof(long);249 250 244 int nativeCodePos = *(long *)(buffer+i2); 251 245 i2+=sizeof(long); 252 246 253 int sourceIndex = *(long *)(buffer+i2); 247 DWORD sourceLineType = *(DWORD *)(buffer+i2); 248 i2+=sizeof(long); 249 250 int relationalObjectModuleIndex = *(long *)(buffer+i2); 254 251 i2+=sizeof(long); 255 252 256 253 int sourceCodePos = *(long *)(buffer+i2); 257 i2+=sizeof(long);258 259 DWORD sourceLineType = *(DWORD *)(buffer+i2);260 254 i2+=sizeof(long); 261 255 262 256 _oldSourceLines.push_back( 263 257 SourceLine( 264 lineNum,265 258 nativeCodePos, 266 sourceIndex, 267 sourceCodePos, 268 sourceLineType 259 sourceLineType, 260 SourceCodePosition( relationalObjectModuleIndex, sourceCodePos ) 269 261 ) 270 262 ); -
trunk/ab5.0/abdev/BasicCompiler_Common/VarList.cpp
r636 r637 620 620 else 621 621 { 622 pobj_dti->lpdwCp[i3]=oldSourceLines[i2].GetSourceCodePos ();623 pobj_dti->relationalObjectModuleIndexes[i3]=oldSourceLines[i2].Get RelationalObjectModuleIndex();622 pobj_dti->lpdwCp[i3]=oldSourceLines[i2].GetSourceCodePosition().GetPos(); 623 pobj_dti->relationalObjectModuleIndexes[i3]=oldSourceLines[i2].GetSourceCodePosition().GetRelationalObjectModuleIndex(); 624 624 } 625 625 } -
trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp
r632 r637 962 962 963 963 Variable *pVar = new Variable( 964 compiler.GetNamespaceSupporter().GetLivingNamespaceScopes(), 965 name, 964 Symbol( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes(), name ), 966 965 type, 967 966 isConst, -
trunk/ab5.0/abdev/BasicCompiler_Common/include/CodeGenerator.h
r597 r637 241 241 } 242 242 243 void NextSourceLine( int currentSourceIndex ) 244 { 245 extern int cp; 246 pNativeCode->NextSourceLine( currentSourceIndex, cp ); 243 void NextSourceLine( const SourceCodePosition &sourceCodePosition ) 244 { 245 pNativeCode->NextSourceLine( sourceCodePosition ); 247 246 } 248 247 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r636 r637 50 50 51 51 // メタ情報 52 this->GetObjectModule().StaticLink( *pStaticLibrary );52 this->GetObjectModule().StaticLink( *pStaticLibrary, this->IsSll() ); 53 53 } 54 54 } -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
r632 r637 117 117 118 118 //クラスを追加 119 CClass *pClass = new CClass( namespaceScopes, importedNamespaces, temporary);119 CClass *pClass = new CClass( Symbol( namespaceScopes, temporary ), importedNamespaces ); 120 120 if( classes.IsExist( pClass ) ) 121 121 { … … 575 575 //関数ハッシュへ登録 576 576 UserProc *pUserProc = new UserProc( 577 NamespaceScopes(),577 Symbol( NamespaceScopes(), methodName ), 578 578 NamespaceScopesCollection(), 579 methodName,580 579 Procedure::Function, 581 580 false, … … 1434 1433 // クラスをコピー 1435 1434 CClass *pNewClass = new CClass( 1436 _class .GetNamespaceScopes(),1435 _class, 1437 1436 _class.GetImportedNamespaces(), 1438 _class.GetName(),1439 1437 _class.GetClassType(), 1440 1438 _class.GetFormalGenericTypes(), -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp
r600 r637 74 74 75 75 //定数を追加 76 consts.Add( namespaceScopes, temporary, NextValue);76 consts.Add( Symbol( namespaceScopes, temporary ), NextValue); 77 77 } 78 78 } … … 178 178 if( StaticCalculation(false, expression, 0, &i64data, resultType) ) 179 179 { 180 consts.Add( namespaceScopes, name, i64data, resultType );180 consts.Add( Symbol( namespaceScopes, name ), i64data, resultType ); 181 181 } 182 182 } … … 185 185 // 定数マクロ 186 186 const char *params = temporary + i2; 187 if( !constMacros.Add( namespaceScopes, name, params ) )187 if( !constMacros.Add( Symbol( namespaceScopes, name ), params ) ) 188 188 { 189 189 compiler.errorMessenger.Output( 1, NULL, i ); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Delegate.cpp
r625 r637 115 115 } 116 116 117 delegates.Put( new Delegate( namespaceScopes, importedNamespaces, name, procKind, paramStr, returnTypeName, nowLine ) );117 delegates.Put( new Delegate( Symbol( namespaceScopes, name ), importedNamespaces, procKind, paramStr, returnTypeName, nowLine ) ); 118 118 } 119 119 } … … 131 131 const Delegate &dg = *delegates.Iterator_GetNext(); 132 132 133 if( !dg.isTargetObjectModule)133 if( dg.IsExternal() ) 134 134 { 135 135 // 静的リンクライブラリの場合は飛ばす(既にインスタンスが定義済みであるため) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Procedure.cpp
r632 r637 156 156 157 157 //ソースコードの位置 158 userProc.SetSourceCodePosition( SourceCodePosition( compiler.Get ObjectModule().GetName(), nowLine ) );158 userProc.SetSourceCodePosition( SourceCodePosition( compiler.GetCurrentRelationalObjectModuleIndexForSource(), nowLine ) ); 159 159 160 160 //パラメータ … … 286 286 287 287 //ソースコードの位置 288 pProc->SetSourceCodePosition( SourceCodePosition( compiler.Get ObjectModule().GetName(), nowLine ) );288 pProc->SetSourceCodePosition( SourceCodePosition( compiler.GetCurrentRelationalObjectModuleIndexForSource(), nowLine ) ); 289 289 290 290 //パラメータ … … 615 615 } 616 616 617 UserProc *pUserProc = new UserProc( namespaceScopes, importedNamespaces, temporary, kind, isMacro, isCdecl, isExport );617 UserProc *pUserProc = new UserProc( Symbol( namespaceScopes, temporary ), importedNamespaces, kind, isMacro, isCdecl, isExport ); 618 618 pUserProc->SetParentClass( pobj_c ); 619 619 … … 737 737 738 738 // オブジェクトを生成 739 DllProc *pDllProc = new DllProc( namespaceScopes, procName, kind, isCdecl, dllFileName, alias );739 DllProc *pDllProc = new DllProc( Symbol( namespaceScopes, procName ), kind, isCdecl, dllFileName, alias ); 740 740 741 741 // パラメータを解析 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_TypeDef.cpp
r546 r637 75 75 typeDefs.push_back( 76 76 TypeDef( 77 namespaceScopes, 78 temporary, 77 Symbol( namespaceScopes, temporary ), 79 78 pTemp, 80 79 baseType … … 176 175 typeDefs.push_back( 177 176 TypeDef( 178 namespaceScopes, 179 temporary, 177 Symbol( namespaceScopes, temporary ), 180 178 "Long", 181 179 baseType -
trunk/ab5.0/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp
r589 r637 21 21 while(classes.Iterator_HasNext()){ 22 22 CClass &objClass = *classes.Iterator_GetNext(); 23 if( objClass. isTargetObjectModule == false)23 if( objClass.IsExternal() ) 24 24 { 25 25 // 静的リンクライブラリの場合は飛ばす(既にインスタンスが定義済みであるため)
Note:
See TracChangeset
for help on using the changeset viewer.