Changeset 128 in dev for BasicCompiler32
- Timestamp:
- May 18, 2007, 4:42:36 AM (18 years ago)
- Location:
- BasicCompiler32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Calc.cpp
r116 r128 619 619 620 620 621 if( varType.IsObject() && Smoothie::Meta::blittableTypes.IsExist( calcType ) ){ 622 // Blittable型をオブジェクトとして扱う 623 vector<UserProc *> userProcs; 624 Smoothie::Meta::blittableTypes.GetClass( calcType ).EnumStaticMethod( "_Create", userProcs ); 625 if( userProcs.size() != 1 ){ 626 SetError(); 627 return; 628 } 629 UserProc *pUserProc = userProcs[0]; 630 631 // call System.[TypeClass]._Create 632 op_call( pUserProc ); 633 634 // push eax 635 op_push( REG_EAX ); 636 637 calcType = pUserProc->ReturnType(); 638 } 639 621 640 622 641 ///////////////////////////////// -
BasicCompiler32/Compile_Statement.cpp
r122 r128 90 90 bool isLiteral; 91 91 BOOL bUseHeap; 92 bool result = TermOpe( leftTerm, Type(), resultType, isLiteral, &bUseHeap, NULL, true ); 93 92 bool result = TermOpe( leftTerm, Type(), resultType, isLiteral, &bUseHeap, false, NULL, true ); 94 93 if( result ){ 95 94 -
BasicCompiler32/NumOpe.cpp
r122 r128 227 227 return false; 228 228 } 229 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName, bool isProcedureCallOnly ){229 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool isWantObject, bool *pIsClassName, bool isProcedureCallOnly ){ 230 230 char parameter[VN_SIZE]; 231 231 … … 255 255 bool isClassName = false; 256 256 Type leftType; 257 if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, &isClassName ) ){ 257 if( GetTermType( termLeft, leftType, isLiteral, &isClassName ) ){ 258 if( isClassName == false && Smoothie::Meta::blittableTypes.IsExist( leftType ) ){ 259 // 左側のオブジェクト部分がBlittable型のとき 260 261 char temporary[VN_SIZE]; 262 lstrcpy( temporary, termLeft ); 263 sprintf( termLeft, "%s(%s)", 264 Smoothie::Meta::blittableTypes.Find( leftType ).GetCreateStaticMethodFullName().c_str(), 265 temporary ); 266 } 267 } 268 269 if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, true, &isClassName ) ){ 258 270 goto globalArea; 259 271 } -
BasicCompiler32/Opcode.h
r122 r128 102 102 //NumOpe.cpp 103 103 void PushReturnValue(int type); 104 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName = NULL, bool isProcedureCallOnly = false ); 104 bool TermOpe( 105 const char *term, 106 const Type &baseType, 107 Type &resultType, 108 bool &isLiteral, 109 BOOL *pbUseHeap, 110 bool isWantObject = false, 111 bool *pIsClassName = NULL, 112 bool isProcedureCallOnly = false ); 105 113 bool NumOpe( int reg, 106 114 const char *expression,
Note:
See TracChangeset
for help on using the changeset viewer.