Changeset 745 in dev
- Timestamp:
- Sep 10, 2008, 1:53:07 AM (16 years ago)
- Location:
- trunk/ab5.0
- Files:
-
- 7 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); -
trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp
r677 r745 873 873 char *temp; 874 874 temp=(char *)i64data; 875 if( compiler.IsUnicode() ) 876 { 877 i2 = compiler.GetObjectModule().dataTable.AddWString( Jenga::Common::ToWString( temp ) ); 878 } 879 else 880 { 881 i2 = compiler.GetObjectModule().dataTable.AddString( temp ); 882 } 875 i2 = compiler.AddStringToDataTable( temp ); 883 876 HeapDefaultFree(temp); 884 877 … … 1069 1062 char *temp; 1070 1063 temp=(char *)i64data; 1071 if( compiler.IsUnicode() ) 1072 { 1073 i2 = compiler.GetObjectModule().dataTable.AddWString( Jenga::Common::ToWString( temp ) ); 1074 } 1075 else 1076 { 1077 i2 = compiler.GetObjectModule().dataTable.AddString( temp ); 1078 } 1064 i2 = compiler.AddStringToDataTable( temp ); 1079 1065 HeapDefaultFree(temp); 1080 1066 -
trunk/ab5.0/abdev/compiler_x86/NumOpe.cpp
r701 r745 963 963 bLiteralCalculation=0; 964 964 965 if( compiler.IsUnicode() ) 966 { 967 i2 = compiler.GetObjectModule().dataTable.AddWString( Jenga::Common::ToWString( std::string( term, i3 ) ) ); 968 } 969 else 970 { 971 i2 = compiler.GetObjectModule().dataTable.AddString( std::string( term, i3 ) ); 972 } 965 i2 = compiler.AddStringToDataTable( std::string( term, i3 ) ); 973 966 974 967 //push DataSize -
trunk/ab5.0/jenga/src/common/String.cpp
r622 r745 39 39 0, 40 40 str.c_str(), static_cast<int>(str.size()) + 1, 41 NULL, 0 ) * 2;41 NULL, 0 ) * 4; 42 42 43 43 LPWSTR pwstr = (LPWSTR)malloc( size );
Note:
See TracChangeset
for help on using the changeset viewer.