Changeset 745 in dev for trunk/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- Sep 10, 2008, 1:53:07 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h
r710 r745 164 164 return isUnicode; 165 165 } 166 167 int AddStringToDataTable( const std::string &text ); 166 168 167 169 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r735 r745 76 76 77 77 return globalAreaProcName; 78 } 79 80 int Compiler::AddStringToDataTable( const std::string &text ) 81 { 82 if( this->IsUnicode() ) 83 { 84 return this->GetObjectModule().dataTable.AddWString( Jenga::Common::ToWString( text ) ); 85 } 86 else 87 { 88 return this->GetObjectModule().dataTable.AddString( text ); 89 } 78 90 } 79 91 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTableGenerator.cpp
r591 r745 178 178 179 179 // 文字列バッファをデータ領域へ追加 180 if( compiler.IsUnicode() ) 181 { 182 dataTable.AddWString( Jenga::Common::ToWString( str ) ); 183 } 184 else 185 { 186 dataTable.AddString( str ); 187 } 180 compiler.AddStringToDataTable( str ); 188 181 189 182 return dataTableOffset; … … 239 232 { 240 233 // Charポインタ 241 if( compiler.IsUnicode() ) 242 { 243 strOffset = dataTable.AddWString( Jenga::Common::ToWString( tempParamStr ) ); 244 } 245 else 246 { 247 strOffset = dataTable.AddString( tempParamStr ); 248 } 234 strOffset = compiler.AddStringToDataTable( tempParamStr ); 249 235 } 250 236 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Exception.cpp
r591 r745 196 196 // パラメータのクラス名 197 197 char paramName[VN_SIZE] = ""; 198 int paramNameDataTableOffset = 0;199 198 if( catchScope.GetParamType().IsObject() ) 200 199 { 201 200 lstrcpy( paramName, catchScope.GetParamType().GetClass().GetFullName().c_str() ); 202 201 } 203 if( compiler.IsUnicode() ) 204 { 205 paramNameDataTableOffset = compiler.GetObjectModule().dataTable.AddWString( Jenga::Common::ToWString( paramName ) ); 206 } 207 else 208 { 209 paramNameDataTableOffset = compiler.GetObjectModule().dataTable.AddString( paramName ); 210 } 202 int paramNameDataTableOffset = compiler.AddStringToDataTable( paramName ); 211 203 *((LONG_PTR *)(buffer+pos)) = paramNameDataTableOffset; 212 204 pos += sizeof(LONG_PTR);
Note:
See TracChangeset
for help on using the changeset viewer.