Changeset 128 in dev for BasicCompiler64/Compile_Calc.cpp


Ignore:
Timestamp:
May 18, 2007, 4:42:36 AM (17 years ago)
Author:
dai_9181
Message:

Blittable型を導入した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Calc.cpp

    r116 r128  
    227227    }
    228228
     229    if( varType.IsObject() && Smoothie::Meta::blittableTypes.IsExist( calcType ) ){
     230        // Blittable型をオブジェクトとして扱う
     231        vector<UserProc *> userProcs;
     232        Smoothie::Meta::blittableTypes.GetClass( calcType ).EnumStaticMethod( "_Create", userProcs );
     233        if( userProcs.size() != 1 ){
     234            SetError();
     235            return;
     236        }
     237        UserProc *pUserProc = userProcs[0];
     238
     239        // mov rcx, rax
     240        op_mov_RR( REG_RCX, REG_RAX );
     241
     242        // call System.[TypeClass]._Create
     243        op_call( pUserProc );
     244
     245        calcType = pUserProc->ReturnType();
     246    }
    229247
    230248    /////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.