Changeset 427 in dev


Ignore:
Timestamp:
Mar 10, 2008, 7:09:39 PM (16 years ago)
Author:
dai_9181
Message:

[426]を64bit版にマージ。

Location:
trunk/abdev/BasicCompiler64
Files:
2 edited

Legend:

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

    r425 r427  
    2020    if( lstrcmpi( FuncName, "_System_GetBp" ) == 0 )    return FUNC_SYSTEM_GET_BP;
    2121    if( lstrcmpi( FuncName, "_System_GetSp" ) == 0 )    return FUNC_SYSTEM_GET_SP;
     22    if( lstrcmp( FuncName, "_System_New" ) == 0 )       return FUNC_SYSTEM_NEW;
    2223    if( lstrcmpi( FuncName, "GetDouble" ) == 0 )        return FUNC_GETDOUBLE;
    2324    if( lstrcmpi( FuncName, "GetSingle" ) == 0 )        return FUNC_GETSINGLE;
     
    470471}
    471472
     473void Opcode_Func_System_New( const char *parameter, Type &resultType, bool isCallOn )
     474{
     475    if( !compiler.StringToType( parameter, resultType ) )
     476    {
     477        SetError();
     478        return;
     479    }
     480    if( !resultType.IsObject() )
     481    {
     482        SetError();
     483        return;
     484    }
     485
     486    if( isCallOn )
     487    {
     488        Type tempResultType;
     489        if( !Operator_New( parameter, resultType, tempResultType ) )
     490        {
     491            return;
     492        }
     493
     494        if( !resultType.Equals( tempResultType ) )
     495        {
     496            SetError();
     497        }
     498    }
     499}
     500
    472501void Opcode_Func_GetPtrData( const char *Parameter, const int type ){
    473502    int reg=REG_RAX;
     
    537566            resultType.SetBasicType( DEF_INT64 );
    538567            break;
     568        case FUNC_SYSTEM_NEW:
     569            Opcode_Func_System_New( Parameter, resultType, isCallOn );
     570            break;
    539571
    540572        case FUNC_GETDOUBLE:
  • trunk/abdev/BasicCompiler64/FunctionValue.h

    r359 r427  
    2020#define FUNC_SYSTEM_GET_BP  0x0625
    2121#define FUNC_SYSTEM_GET_SP  0x0626
     22#define FUNC_SYSTEM_NEW     0x0627
     23
    2224//ポインタ
    2325#define FUNC_GETDOUBLE      0x0630
Note: See TracChangeset for help on using the changeset viewer.