Changeset 426 in dev for trunk/abdev/BasicCompiler32
- Timestamp:
- Mar 10, 2008, 7:04:08 PM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Func.cpp
r424 r426 22 22 if( lstrcmpi( FuncName, "_System_GetBp" ) == 0 ) return FUNC_SYSTEM_GET_BP; 23 23 if( lstrcmpi( FuncName, "_System_GetSp" ) == 0 ) return FUNC_SYSTEM_GET_SP; 24 if( lstrcmp( FuncName, "_System_New" ) == 0 ) return FUNC_SYSTEM_NEW; 24 25 if( lstrcmpi( FuncName, "GetDouble" ) == 0 ) return FUNC_GETDOUBLE; 25 26 if( lstrcmpi( FuncName, "GetSingle" ) == 0 ) return FUNC_GETSINGLE; … … 606 607 } 607 608 609 void Opcode_Func_System_New( const char *parameter, Type &resultType, bool isCallOn ) 610 { 611 if( !compiler.StringToType( parameter, resultType ) ) 612 { 613 SetError(); 614 return; 615 } 616 if( !resultType.IsObject() ) 617 { 618 SetError(); 619 return; 620 } 621 622 if( isCallOn ) 623 { 624 Type tempResultType; 625 if( !Operator_New( parameter, resultType, tempResultType ) ) 626 { 627 return; 628 } 629 630 if( !resultType.Equals( tempResultType ) ) 631 { 632 SetError(); 633 } 634 635 //pop eax 636 compiler.codeGenerator.op_pop( REG_EAX ); 637 } 638 } 639 608 640 void Opcode_Func_GetPtrData(const char *Parameter,const int type){ 609 641 Type tempType; … … 716 748 resultType.SetBasicType( DEF_LONG ); 717 749 break; 750 case FUNC_SYSTEM_NEW: 751 Opcode_Func_System_New( Parameter, resultType, isCallOn ); 752 break; 718 753 719 754 case FUNC_GETDOUBLE: -
trunk/abdev/BasicCompiler32/FunctionValue.h
r359 r426 21 21 #define FUNC_SYSTEM_GET_BP 0x0625 22 22 #define FUNC_SYSTEM_GET_SP 0x0626 23 #define FUNC_SYSTEM_NEW 0x0627 23 24 24 25 //ポインタ
Note:
See TracChangeset
for help on using the changeset viewer.