Changeset 280 in dev for trunk/abdev/BasicCompiler_Common/src
- Timestamp:
- Aug 14, 2007, 8:37:08 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/Meta.cpp
r275 r280 36 36 } 37 37 38 void Meta::StaticLink( Meta &meta, long dataSectionBaseOffset )38 void Meta::StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase ) 39 39 { 40 40 // 名前空間 … … 55 55 56 56 pUserProc->GetNativeCode().ResetDataSectionBaseOffset( dataSectionBaseOffset ); 57 pUserProc->GetNativeCode().ResetSourceIndexes( sourceIndexBase ); 57 58 58 59 this->userProcs.Put( pUserProc ); -
trunk/abdev/BasicCompiler_Common/src/NativeCode.cpp
r276 r280 1 1 #include "stdafx.h" 2 2 3 #include <NativeCode.h> 4 #include <Procedure.h> 3 #include <Compiler.h> 5 4 6 5 #define BREAK_EIP(checkEip) (obp+0x00401000>=checkEip) … … 32 31 sourceLine.GetLineNum(), 33 32 baseOffset + sourceLine.GetNativeCodePos(), 33 sourceLine.GetSourceIndex(), 34 34 sourceLine.GetSourceCodePos(), 35 35 sourceLine.GetCodeType() … … 86 86 sourceLineType |= CODETYPE_SYSTEMPROC; 87 87 } 88 sourceLines.push_back( SourceLine( (long)sourceLines.size(), size, cp, sourceLineType ) ); 88 sourceLines.push_back( 89 SourceLine( 90 (long)sourceLines.size(), 91 size, 92 compiler.GetObjectModule().GetCurrentSourceIndex(), 93 cp, 94 sourceLineType 95 ) 96 ); 89 97 } 90 98 … … 102 110 } 103 111 } 112 void NativeCode::ResetSourceIndexes( long sourceIndexBase ) 113 { 114 BOOST_FOREACH( SourceLine &sourceLine, sourceLines ) 115 { 116 sourceLine.SetSourceIndex( sourceLine.GetSourceIndex() + sourceIndexBase ); 117 } 118 } -
trunk/abdev/BasicCompiler_Common/src/ObjectModule.cpp
r279 r280 14 14 void ObjectModule::StaticLink( ObjectModule &objectModule ) 15 15 { 16 long dataSectionBaseOffset = dataTable.GetSize(); 17 int sourceIndexBase = sources.size(); 18 16 19 // メタ情報を結合 17 meta.StaticLink( objectModule.meta, data Table.GetSize());20 meta.StaticLink( objectModule.meta, dataSectionBaseOffset, sourceIndexBase ); 18 21 19 22 // ネイティブコードを結合 23 objectModule.globalNativeCode.ResetDataSectionBaseOffset( dataSectionBaseOffset ); 24 objectModule.globalNativeCode.ResetSourceIndexes( sourceIndexBase ); 20 25 globalNativeCode.Put( objectModule.globalNativeCode ); 21 globalNativeCode.ResetDataSectionBaseOffset( dataTable.GetSize() );22 26 23 27 // データテーブルを結合 24 28 dataTable.Add( objectModule.dataTable ); 29 30 // ソースコードを結合 31 BOOST_FOREACH( const BasicSource &source, objectModule.sources ) 32 { 33 this->sources.push_back( source ); 34 } 25 35 } 26 36 -
trunk/abdev/BasicCompiler_Common/src/Source.cpp
r279 r280 921 921 } 922 922 923 bool BasicSource::GetLineInfo( int sourceCodePos, int &line, std::string &filePath ) 923 bool BasicSource::GetLineInfo( int sourceCodePos, int &line, std::string &filePath ) const 924 924 { 925 925 int i2,i3,i4,i5; 926 926 927 c har *buffer = GetBuffer();927 const char *buffer = GetBuffer(); 928 928 int i = sourceCodePos; 929 929
Note:
See TracChangeset
for help on using the changeset viewer.