Changeset 820 in dev
- Timestamp:
- Aug 7, 2011, 4:30:08 PM (13 years ago)
- Location:
- branches/egtra/ab5.0/abdev
- Files:
-
- 2 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp
r808 r820 325 325 //生成するファイルの相対パスを取得 326 326 char relationalPath[MAX_PATH]; 327 lstrcpy( relationalPath, program.GetOutputFilePath().c_str() );327 strcpy( relationalPath, program.GetOutputFilePath().c_str() ); 328 328 GetRelationalPath( relationalPath, BasicCurDir ); 329 329 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/Diagnose.cpp
r803 r820 78 78 // 静的メソッド 79 79 foreach( const CMethod *pMethod, objClass.GetStaticMethods() ){ 80 80 codeSizeOfClass += pMethod->GetUserProc().GetCodeSize(); 81 81 } 82 82 … … 110 110 // 静的メソッド 111 111 foreach( const CMethod *pMethod, objClass.GetStaticMethods() ){ 112 112 codeSizeOfClass += pMethod->GetUserProc().GetCodeSize(); 113 113 } 114 114 115 if( codeSizeOfClass ){ 116 temporary[0]=0; 117 lstrcat( temporary, "------------------------------------------------------------------\n" ); 118 sprintf( temporary + lstrlen(temporary), "【 %s クラスのコード情報】\n", objClass.GetName().c_str() ); 119 sprintf( temporary + lstrlen(temporary), "class code size: %d bytes\n", codeSizeOfClass ); 120 lstrcat( temporary, "------------------------------------------------------------------\n" ); 121 lstrcat( temporary, "\n" ); 115 if( codeSizeOfClass ) 116 { 117 sprintf(temporary, 118 "------------------------------------------------------------------\n" 119 "【 %s クラスのコード情報】\n" 120 "class code size: %d bytes\n" 121 "------------------------------------------------------------------\n" 122 "\n", 123 objClass.GetName().c_str(), codeSizeOfClass); 122 124 trace_for_size( temporary ); 123 125 } -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp
r750 r820 26 26 } 27 27 28 void AddSourceCode(const char *buffer){ 29 char *temp=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)+8192); 30 lstrcpy(temp,buffer); 31 32 MakeMiddleCode( temp ); 28 void AddSourceCode(const char *buffer) 29 { 30 std::size_t size = std::strlen(buffer) + 8192; 31 std::unique_ptr<char[]> temp(new char[size]); 32 strcpy_s(temp.get(), size, buffer); 33 34 MakeMiddleCode(temp.get()); 33 35 34 36 //最後尾に貼り付け 35 compiler.GetObjectModule().GetSource().Addition( temp ); 36 37 HeapDefaultFree(temp); 37 compiler.GetObjectModule().GetSource().Addition(temp.get()); 38 38 } 39 39 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp
r736 r820 1 1 #include "stdafx.h" 2 2 3 void KillSpaces(char *str1,char *str2){3 void KillSpaces(char const *str1,char *str2){ 4 4 int i,i2,i3,IsStr; 5 5 for(i=0,i2=0,IsStr=0;;i++,i2++){ … … 30 30 } 31 31 } 32 void KillStringSpaces(char *str){ 33 char *s2; 34 35 extern HANDLE hHeap; 36 s2=(char *)HeapAlloc(hHeap,0,lstrlen(str)+1); 37 lstrcpy(s2,str); 38 KillSpaces(s2,str); 39 HeapDefaultFree(s2); 40 return; 32 void KillStringSpaces(char *str) 33 { 34 std::string s2(str); 35 KillSpaces(s2.c_str(), str); 41 36 } 42 37 BOOL RemoveStringQuotes(char *str){ … … 362 357 } 363 358 } 364 const std::string &FormatEscapeSequenceStringToDefaultString( const std::string &source )359 std::string FormatEscapeSequenceStringToDefaultString( const std::string &source ) 365 360 { 366 361 int maxLength = (int)source.size(); -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/common.h
r808 r820 35 35 #define MAX_PARMS 64 36 36 #define MAX_ARRAYDIM 16 37 #define MAX_HASH 3276138 37 39 38 … … 297 296 298 297 // StrOperation.cpp 299 void KillSpaces(c har *str1,char *str2);298 void KillSpaces(const char *str1,char *str2); 300 299 void KillStringSpaces(char *str); 301 300 BOOL RemoveStringQuotes(char *str); … … 310 309 char GetEndXXXCommand(char es); 311 310 void GetDefaultNameFromES(char es,char *name); 312 const std::string &FormatEscapeSequenceStringToDefaultString( const std::string &source );311 std::string FormatEscapeSequenceStringToDefaultString( const std::string &source ); 313 312 bool IsFileExist(const char *path); 314 313 BOOL ShortPathToLongPath(char ShortPath[MAX_PATH],char *LongPath); … … 364 363 void SplitGenericClassInstance( const char *fullName, char *className, Jenga::Common::Strings &typeParameters, bool isDefiningClass = false, Jenga::Common::Strings *pTypeParameterBaseClassNames = NULL ); 365 364 int JumpStatement(const char *source, int &pos); 365 366 //MakePeHdr.cpp 366 367 void MakeExe(); 367 368 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/stdafx.h
r809 r820 30 30 #include <boost/format.hpp> 31 31 #include <boost/optional.hpp> 32 #include <boost/numeric/conversion/cast.hpp> 33 #include <boost/range.hpp> 34 #include <boost/range/algorithm.hpp> 32 35 #include <boost/serialization/serialization.hpp> 33 36 #include <boost/serialization/nvp.hpp> -
branches/egtra/ab5.0/abdev/ab-common.props
r818 r820 11 11 <ItemDefinitionGroup> 12 12 <ClCompile> 13 <AdditionalIncludeDirectories>$(SolutionDir)ab_common\include;$(SolutionDir)..;$(SolutionDir)..\cpplibs;$(SolutionDir)..\cpplibs\boost;$(SolutionDir)..\cpplibs\WTL80\include;$(SolutionDir)abdev-impl;$(SolutionDir); %(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>13 <AdditionalIncludeDirectories>$(SolutionDir)ab_common\include;$(SolutionDir)..;$(SolutionDir)..\cpplibs;$(SolutionDir)..\cpplibs\boost;$(SolutionDir)..\cpplibs\WTL80\include;$(SolutionDir)abdev-impl;$(SolutionDir);$(SolutionDir)BasicCompiler_Common\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 14 14 </ClCompile> 15 15 </ItemDefinitionGroup> -
branches/egtra/ab5.0/abdev/ab-test/ab-test.vcxproj
r818 r820 158 158 <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> 159 159 </ClCompile> 160 <ClCompile Include="Type.cpp" /> 160 161 </ItemGroup> 161 162 <ItemGroup> -
branches/egtra/ab5.0/abdev/ab-test/ab-test.vcxproj.filters
r818 r820 36 36 <Filter>Source Files</Filter> 37 37 </ClCompile> 38 <ClCompile Include="Type.cpp"> 39 <Filter>Source Files</Filter> 40 </ClCompile> 38 41 </ItemGroup> 39 42 </Project> -
branches/egtra/ab5.0/abdev/ab_common/ab_common.vcxproj
r807 r820 160 160 <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> 161 161 </ClCompile> 162 <ClCompile Include="src\Lexical\Class.cpp" />163 162 <ClCompile Include="src\Lexical\Const.cpp" /> 164 163 <ClCompile Include="src\Lexical\DataTable.cpp" /> 165 164 <ClCompile Include="src\Lexical\Delegate.cpp" /> 166 <ClCompile Include="src\Lexical\Interface.cpp" />167 <ClCompile Include="src\Lexical\Member.cpp" />168 165 <ClCompile Include="src\Lexical\Meta.cpp" /> 169 <ClCompile Include="src\Lexical\Method.cpp" />170 <ClCompile Include="src\Lexical\Namespace.cpp" />171 <ClCompile Include="src\Lexical\NamespaceSupporter.cpp" />172 <ClCompile Include="src\Lexical\NativeCode.cpp" />173 166 <ClCompile Include="src\Lexical\ObjectModule.cpp"> 174 167 <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> … … 183 176 </PrecompiledHeader> 184 177 </ClCompile> 185 <ClCompile Include="src\Lexical\Parameter.cpp" />186 <ClCompile Include="src\Lexical\Procedure.cpp" />187 178 <ClCompile Include="src\Lexical\Source.cpp" /> 188 <ClCompile Include="src\Lexical\Symbol.cpp" />189 <ClCompile Include="src\Lexical\Template.cpp" />190 <ClCompile Include="src\Lexical\Type.cpp" />191 179 <ClCompile Include="src\Lexical\TypeDef.cpp" /> 192 180 <ClCompile Include="src\Lexical\Variable.cpp" /> -
branches/egtra/ab5.0/abdev/ab_common/ab_common.vcxproj.filters
r807 r820 37 37 <Filter>Source Files</Filter> 38 38 </ClCompile> 39 <ClCompile Include="src\Lexical\Class.cpp">40 <Filter>Source Files\Lexical</Filter>41 </ClCompile>42 39 <ClCompile Include="src\Lexical\Const.cpp"> 43 40 <Filter>Source Files\Lexical</Filter> … … 49 46 <Filter>Source Files\Lexical</Filter> 50 47 </ClCompile> 51 <ClCompile Include="src\Lexical\Interface.cpp">52 <Filter>Source Files\Lexical</Filter>53 </ClCompile>54 <ClCompile Include="src\Lexical\Member.cpp">55 <Filter>Source Files\Lexical</Filter>56 </ClCompile>57 48 <ClCompile Include="src\Lexical\Meta.cpp"> 58 <Filter>Source Files\Lexical</Filter>59 </ClCompile>60 <ClCompile Include="src\Lexical\Method.cpp">61 <Filter>Source Files\Lexical</Filter>62 </ClCompile>63 <ClCompile Include="src\Lexical\Namespace.cpp">64 <Filter>Source Files\Lexical</Filter>65 </ClCompile>66 <ClCompile Include="src\Lexical\NamespaceSupporter.cpp">67 <Filter>Source Files\Lexical</Filter>68 </ClCompile>69 <ClCompile Include="src\Lexical\NativeCode.cpp">70 49 <Filter>Source Files\Lexical</Filter> 71 50 </ClCompile> … … 73 52 <Filter>Source Files\Lexical</Filter> 74 53 </ClCompile> 75 <ClCompile Include="src\Lexical\Parameter.cpp">76 <Filter>Source Files\Lexical</Filter>77 </ClCompile>78 <ClCompile Include="src\Lexical\Procedure.cpp">79 <Filter>Source Files\Lexical</Filter>80 </ClCompile>81 54 <ClCompile Include="src\Lexical\Source.cpp"> 82 <Filter>Source Files\Lexical</Filter>83 </ClCompile>84 <ClCompile Include="src\Lexical\Symbol.cpp">85 <Filter>Source Files\Lexical</Filter>86 </ClCompile>87 <ClCompile Include="src\Lexical\Template.cpp">88 <Filter>Source Files\Lexical</Filter>89 </ClCompile>90 <ClCompile Include="src\Lexical\Type.cpp">91 55 <Filter>Source Files\Lexical</Filter> 92 56 </ClCompile> -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Type.h
r816 r820 1 #include <boost/foreach.hpp> 1 2 #pragma once 2 3 … … 101 102 } 102 103 103 in line int GetBasicType() const104 int GetBasicType() const 104 105 { 105 106 return basicType; -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
r803 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 #include <algorithm> 3 5 #include <boost/checked_delete.hpp> -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp
r750 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 Interface::Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters ) -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Member.cpp
r640 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
r803 r820 37 37 { 38 38 // 名前空間 39 BOOST_FOREACH( NamespaceScopes &namespaceScopes, meta.namespaceScopesCollection)39 foreach (NamespaceScopes const &namespaceScopes, meta.namespaceScopesCollection) 40 40 { 41 41 if( !this->namespaceScopesCollection.IsExist( namespaceScopes ) ) -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Method.cpp
r816 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 #include <stdexcept> 3 5 -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Namespace.cpp
r810 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 #include <algorithm> 3 5 -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp
r750 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 using namespace ActiveBasic::Common::Lexical; -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp
r750 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 #define BREAK_EIP(checkEip) (obp+0x00401000>=checkEip) -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp
r708 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 Parameter::Parameter( const std::string &varName, const Type &type, bool isRef, const std::string initValue ) -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp
r803 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Source.cpp
r769 r820 945 945 return true; 946 946 } 947 948 int SourceCodePosition::GetRelationalObjectModuleIndex() const949 {950 if( this->IsNothing() )951 {952 _ASSERTE( false );953 throw;954 }955 956 return relationalObjectModuleIndex;957 }958 bool SourceCodePosition::IsNothing() const959 {960 if( this->relationalObjectModuleIndex == -1 && this->pos == -1 )961 {962 return true;963 }964 965 if( this->relationalObjectModuleIndex == -1 || this->pos == -1 )966 {967 _ASSERTE( false );968 throw;969 }970 971 return false;972 } -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp
r752 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 using namespace ActiveBasic::Common::Lexical; -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Template.cpp
r640 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 ExpandedTemplateClass::~ExpandedTemplateClass() -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
r750 r820 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 4 #include "Lexical/Type.h" 2 5 3 6 const int Type::basicTypeList[] = { -
branches/egtra/ab5.0/abdev/compiler-impl/compiler-impl.vcxproj
r812 r820 123 123 </ItemGroup> 124 124 <ItemGroup> 125 <ClCompile Include="..\ab_common\src\Lexical\Class.cpp" /> 126 <ClCompile Include="..\ab_common\src\Lexical\Interface.cpp" /> 127 <ClCompile Include="..\ab_common\src\Lexical\Member.cpp" /> 128 <ClCompile Include="..\ab_common\src\Lexical\Method.cpp" /> 129 <ClCompile Include="..\ab_common\src\Lexical\Namespace.cpp" /> 130 <ClCompile Include="..\ab_common\src\Lexical\NamespaceSupporter.cpp" /> 131 <ClCompile Include="..\ab_common\src\Lexical\NativeCode.cpp" /> 132 <ClCompile Include="..\ab_common\src\Lexical\Parameter.cpp" /> 133 <ClCompile Include="..\ab_common\src\Lexical\Procedure.cpp" /> 134 <ClCompile Include="..\ab_common\src\Lexical\SourceCodePosition.cpp" /> 135 <ClCompile Include="..\ab_common\src\Lexical\Symbol.cpp" /> 136 <ClCompile Include="..\ab_common\src\Lexical\Template.cpp" /> 137 <ClCompile Include="..\ab_common\src\Lexical\Type.cpp" /> 125 138 <ClCompile Include="..\BasicCompiler_Common\src\LexicalAnalyzer_TypeDef.cpp" /> 126 139 <ClCompile Include="stdafx.cpp"> -
branches/egtra/ab5.0/abdev/compiler-impl/compiler-impl.vcxproj.filters
r812 r820 14 14 <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> 15 15 </Filter> 16 <Filter Include="ab-common"> 17 <UniqueIdentifier>{c6cc4c5f-347b-412e-9ece-ea2fb71478fd}</UniqueIdentifier> 18 </Filter> 19 <Filter Include="ab-common\Lexical"> 20 <UniqueIdentifier>{4e746032-dca6-4ee9-bd86-92987085f55b}</UniqueIdentifier> 21 </Filter> 16 22 </ItemGroup> 17 23 <ItemGroup> … … 27 33 <Filter>Source Files</Filter> 28 34 </ClCompile> 35 <ClCompile Include="..\ab_common\src\Lexical\Type.cpp"> 36 <Filter>ab-common\Lexical</Filter> 37 </ClCompile> 38 <ClCompile Include="..\ab_common\src\Lexical\Class.cpp"> 39 <Filter>ab-common\Lexical</Filter> 40 </ClCompile> 41 <ClCompile Include="..\ab_common\src\Lexical\Method.cpp"> 42 <Filter>ab-common\Lexical</Filter> 43 </ClCompile> 44 <ClCompile Include="..\ab_common\src\Lexical\Symbol.cpp"> 45 <Filter>ab-common\Lexical</Filter> 46 </ClCompile> 47 <ClCompile Include="..\ab_common\src\Lexical\Interface.cpp"> 48 <Filter>ab-common\Lexical</Filter> 49 </ClCompile> 50 <ClCompile Include="..\ab_common\src\Lexical\Namespace.cpp"> 51 <Filter>ab-common\Lexical</Filter> 52 </ClCompile> 53 <ClCompile Include="..\ab_common\src\Lexical\Member.cpp"> 54 <Filter>ab-common\Lexical</Filter> 55 </ClCompile> 56 <ClCompile Include="..\ab_common\src\Lexical\Template.cpp"> 57 <Filter>ab-common\Lexical</Filter> 58 </ClCompile> 59 <ClCompile Include="..\ab_common\src\Lexical\NamespaceSupporter.cpp"> 60 <Filter>ab-common\Lexical</Filter> 61 </ClCompile> 62 <ClCompile Include="..\ab_common\src\Lexical\Procedure.cpp"> 63 <Filter>ab-common\Lexical</Filter> 64 </ClCompile> 65 <ClCompile Include="..\ab_common\src\Lexical\Parameter.cpp"> 66 <Filter>ab-common\Lexical</Filter> 67 </ClCompile> 68 <ClCompile Include="..\ab_common\src\Lexical\NativeCode.cpp"> 69 <Filter>ab-common\Lexical</Filter> 70 </ClCompile> 71 <ClCompile Include="..\ab_common\src\Lexical\SourceCodePosition.cpp"> 72 <Filter>ab-common\Lexical</Filter> 73 </ClCompile> 29 74 </ItemGroup> 30 75 </Project>
Note:
See TracChangeset
for help on using the changeset viewer.