Ignore:
Timestamp:
Nov 6, 2007, 2:35:15 AM (17 years ago)
Author:
dai_9181
Message:

Try-Catchを試験的に実装。
(まだ下記の動作しか実装していません)
・Try
・Catch(パラメータ無し)
・Throw(パラメータ無し)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/Compile_Func.cpp

    r357 r358  
    2020    if( lstrcmpi( FuncName, "_System_GetNowScopeCatchAddresses" ) == 0 )return FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS;
    2121    if( lstrcmpi( FuncName, "_System_GetBp" ) == 0 )    return FUNC_SYSTEM_GET_BP;
     22    if( lstrcmpi( FuncName, "_System_GetSp" ) == 0 )    return FUNC_SYSTEM_GET_SP;
    2223    if( lstrcmpi( FuncName, "GetDouble" ) == 0 )        return FUNC_GETDOUBLE;
    2324    if( lstrcmpi( FuncName, "GetSingle" ) == 0 )        return FUNC_GETSINGLE;
     
    582583    compiler.codeGenerator.op_mov_RR(REG_EAX,REG_EBP);
    583584}
     585void Opcode_Func_System_Get_Sp()
     586{
     587    //mov eax,esp
     588    compiler.codeGenerator.op_mov_RR(REG_EAX,REG_ESP);
     589}
    584590
    585591void Opcode_Func_GetPtrData(const char *Parameter,const int type){
     
    679685        case FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS:
    680686            if( isCallOn ) Exception::Opcode_Func_System_GetNowScopeCatchAddress();
    681             resultType.SetBasicType( DEF_LONG );
     687            resultType.SetBasicType( DEF_PTR_VOID );
    682688            break;
    683689        case FUNC_SYSTEM_GET_BP:
     
    685691            resultType.SetBasicType( DEF_LONG );
    686692            break;
     693        case FUNC_SYSTEM_GET_SP:
     694            if( isCallOn ) Opcode_Func_System_Get_Sp();
     695            resultType.SetBasicType( DEF_LONG );
     696            break;
    687697
    688698        case FUNC_GETDOUBLE:
Note: See TracChangeset for help on using the changeset viewer.