Changeset 128 in dev for BasicCompiler64
- Timestamp:
- May 18, 2007, 4:42:36 AM (18 years ago)
- Location:
- BasicCompiler64
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/BasicCompiler.vcproj
r127 r128 157 157 RuntimeLibrary="1" 158 158 UsePrecompiledHeader="0" 159 PrecompiledHeaderFile=".\ Debug/BasicCompiler.pch"160 AssemblerListingLocation=".\ Debug/"161 ObjectFile=".\ Debug/"162 ProgramDataBaseFileName=".\ Debug/"159 PrecompiledHeaderFile=".\SmallDebug/BasicCompiler.pch" 160 AssemblerListingLocation=".\SmallDebug/" 161 ObjectFile=".\SmallDebug/" 162 ProgramDataBaseFileName=".\SmallDebug/" 163 163 BrowseInformation="0" 164 164 WarningLevel="3" … … 188 188 IgnoreDefaultLibraryNames="" 189 189 GenerateDebugInformation="false" 190 ProgramDatabaseFile=".\ Debug/BasicCompiler64.pdb"190 ProgramDatabaseFile=".\SmallDebug/BasicCompiler64.pdb" 191 191 SubSystem="2" 192 192 TargetMachine="0" -
BasicCompiler64/Compile_Calc.cpp
r116 r128 227 227 } 228 228 229 if( varType.IsObject() && Smoothie::Meta::blittableTypes.IsExist( calcType ) ){ 230 // Blittable型をオブジェクトとして扱う 231 vector<UserProc *> userProcs; 232 Smoothie::Meta::blittableTypes.GetClass( calcType ).EnumStaticMethod( "_Create", userProcs ); 233 if( userProcs.size() != 1 ){ 234 SetError(); 235 return; 236 } 237 UserProc *pUserProc = userProcs[0]; 238 239 // mov rcx, rax 240 op_mov_RR( REG_RCX, REG_RAX ); 241 242 // call System.[TypeClass]._Create 243 op_call( pUserProc ); 244 245 calcType = pUserProc->ReturnType(); 246 } 229 247 230 248 ///////////////////////////////// -
BasicCompiler64/Compile_Statement.cpp
r122 r128 94 94 bool isLiteral; 95 95 BOOL bUseHeap; 96 bool result = TermOpe( leftTerm, Type(), resultType, isLiteral, &bUseHeap, NULL, true );96 bool result = TermOpe( leftTerm, Type(), resultType, isLiteral, &bUseHeap, false, NULL, true ); 97 97 98 98 delete pobj_reg; -
BasicCompiler64/NumOpe.cpp
r122 r128 224 224 return false; 225 225 } 226 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName, bool isProcedureCallOnly ){226 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool isWantObject, bool *pIsClassName, bool isProcedureCallOnly ){ 227 227 char parameter[VN_SIZE]; 228 228 … … 252 252 bool isClassName = false; 253 253 Type leftType; 254 if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, &isClassName ) ){ 254 if( GetTermType( termLeft, leftType, isLiteral, &isClassName ) ){ 255 if( isClassName == false && Smoothie::Meta::blittableTypes.IsExist( leftType ) ){ 256 // 左側のオブジェクト部分がBlittable型のとき 257 258 char temporary[VN_SIZE]; 259 lstrcpy( temporary, termLeft ); 260 sprintf( termLeft, "%s(%s)", 261 Smoothie::Meta::blittableTypes.Find( leftType ).GetCreateStaticMethodFullName().c_str(), 262 temporary ); 263 } 264 } 265 266 if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, true, &isClassName ) ){ 255 267 goto globalArea; 256 268 } … … 705 717 //型名 706 718 if( Type::StringToType( term, resultType ) ){ 719 720 if( resultType.IsObject() ){ 721 if( resultType.GetClass().IsBlittableType() ){ 722 // Blittable型のときは基本型として扱う 723 // ※ただし、コンパイル中のメソッドがBlittable型クラスに属していないこと 724 if( UserProc::IsLocalAreaCompiling() 725 && UserProc::CompilingUserProc().HasParentClass() 726 && UserProc::CompilingUserProc().GetParentClass().IsBlittableType() ) 727 { 728 // コンパイル中のメソッドがBlittable型クラスに属している 729 } 730 else{ 731 resultType = resultType.GetClass().GetBlittableType(); 732 } 733 } 734 } 735 707 736 resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST ); 708 737 } -
BasicCompiler64/Opcode.h
r122 r128 251 251 252 252 //NumOpe.cpp 253 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName = NULL, bool isProcedureCallOnly = false ); 253 bool TermOpe( 254 const char *term, 255 const Type &baseType, 256 Type &resultType, 257 bool &isLiteral, 258 BOOL *pbUseHeap, 259 bool isWantObject = false, 260 bool *pIsClassName = NULL, 261 bool isProcedureCallOnly = false ); 254 262 bool NumOpe( int *pReg, 255 263 const char *Command,
Note:
See TracChangeset
for help on using the changeset viewer.