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/BasicCompiler64/Compile_Func.cpp

    r357 r358  
    1717    if( lstrcmpi( FuncName, "__delegate_staticmethod_call" ) == 0 )     return FUNC_DELEGATE_STATICMETHOD_CALL;
    1818    if( lstrcmpi( FuncName, "_System_GetNowScopeCatchAddresses" ) == 0 )return FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS;
     19    if( lstrcmpi( FuncName, "_System_GetBp" ) == 0 )    return FUNC_SYSTEM_GET_BP;
     20    if( lstrcmpi( FuncName, "_System_GetSp" ) == 0 )    return FUNC_SYSTEM_GET_SP;
    1921    if( lstrcmpi( FuncName, "GetDouble" ) == 0 )        return FUNC_GETDOUBLE;
    2022    if( lstrcmpi( FuncName, "GetSingle" ) == 0 )        return FUNC_GETSINGLE;
     
    447449    compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RBP);
    448450}
     451void Opcode_Func_System_Get_Sp()
     452{
     453    //mov rax,rsp
     454    compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RSP);
     455}
    449456
    450457void Opcode_Func_GetPtrData( const char *Parameter, const int type ){
     
    501508        case FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS:
    502509            if( isCallOn ) Exception::Opcode_Func_System_GetNowScopeCatchAddress();
    503             resultType.SetBasicType( DEF_LONG );
     510            resultType.SetBasicType( DEF_PTR_VOID );
    504511            break;
    505512        case FUNC_SYSTEM_GET_BP:
    506513            if( isCallOn ) Opcode_Func_System_Get_Bp();
    507             resultType.SetBasicType( DEF_LONG );
     514            resultType.SetBasicType( DEF_INT64 );
     515            break;
     516        case FUNC_SYSTEM_GET_SP:
     517            if( isCallOn ) Opcode_Func_System_Get_Sp();
     518            resultType.SetBasicType( DEF_INT64 );
    508519            break;
    509520
Note: See TracChangeset for help on using the changeset viewer.