Changeset 405 in dev


Ignore:
Timestamp:
Mar 1, 2008, 1:51:55 AM (16 years ago)
Author:
dai_9181
Message:

[403]を64bitコンパイラにも対応

File:
1 edited

Legend:

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

    r402 r405  
    148148        {
    149149            classType = leftType;
     150
     151            if( classType.IsObject() )
     152            {
     153                // 既にuseRegにオブジェクトポインタが格納されており、それに対するインデクサを呼び出す場合
     154                // ※「プロパティ値として返ってきたオブジェクトインスタンスのインデクサを呼び出す」場合にここにくる
     155
     156                // オブジェクトメンバのポインタは既にraxに入っている
     157            }
    150158        }
    151159        else
    152160        {
    153161            GetMemberType( leftType, VarName, classType, 0, false );
    154         }
    155         if( classType.IsObject() )
    156         {
    157             //オブジェクトポインタをr11にコピー
    158             compiler.codeGenerator.op_mov_RR( REG_R11, useReg );
    159 
    160             if( VarName[0] )
     162
     163            if( classType.IsObject() )
    161164            {
     165                //オブジェクトポインタをr11にコピー
     166                compiler.codeGenerator.op_mov_RR( REG_R11, useReg );
     167
    162168                RELATIVE_VAR relativeVar;
    163169                relativeVar.dwKind=VAR_DIRECTMEM;
     
    177183                }
    178184            }
    179             else
    180             {
    181                 // オブジェクトメンバのポインタは既にraxに入っている
    182             }
    183 
     185        }
     186
     187        if( classType.IsObject() )
     188        {
    184189            //////////////////////////////////////////////////////
    185190            /////    レジスタ資源のバックアップ
     
    243248    char methodName[VN_SIZE], lpPtrOffset[VN_SIZE], parameter[VN_SIZE], dummy[1];
    244249    ReferenceKind refType;
     250    bool isParameterInBracket = false;
    245251    lstrcpy( methodName, member );
    246     GetVarFormatString(methodName,parameter,lpPtrOffset,dummy,refType);
     252    GetVarFormatString( methodName, parameter, lpPtrOffset, dummy, refType, &isParameterInBracket );
    247253
    248254    objClass.EnumDynamicMethodsOrInterfaceMethods( methodName, userProcs );
     
    253259        if( pUserProc )
    254260        {
    255             // TODO: この判定処理は暫定(特に[]サーチを行うところが)
    256             if( pUserProc->Params().size() == 0 && parameter[0] && strstr( termFull, "[" ) )
     261            if(
     262                pUserProc->Params().size() == 0             // 仮引数の個数は0
     263                && parameter[0]                             // 実引数は1つ以上
     264                && pUserProc->ReturnType().IsObject()       // 戻り値がクラス型の場合
     265                && isParameterInBracket )                   // 実引数は[]で囲まれている
    257266            {
     267                // プロパティ値として返ってきたオブジェクトインスタンスのインデクサを呼び出す
     268
     269                // まずはプロパティ値を取得
    258270                TermMemberOpe( leftType, baseType, resultType, termFull, termLeft, methodName );
    259271
     272                // 戻り値のオブジェクトインスタンスのインデクサを呼び出す
    260273                char temporary[VN_SIZE], temp2[VN_SIZE];
    261274                sprintf( temporary, "[%s]", parameter );
Note: See TracChangeset for help on using the changeset viewer.