Changeset 79 in dev for BasicCompiler64/Compile_Func.cpp


Ignore:
Timestamp:
Mar 25, 2007, 5:58:57 AM (17 years ago)
Author:
dai_9181
Message:

バージョンをβ17にした。
#strictをデフォルトの状態で適用するようにした(#90)。
Dimステートメントにおいて、初期値式とAsが同時に指定されていたとき、As以降も初期値式の一部として捉えるよう、変更(#91)。
GetTypeDef関数を完全廃止。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Func.cpp

    r78 r79  
    185185    pUserProc->Using();
    186186}
    187 void Opcode_Func_SizeOf( const char *Parameter ){
    188     LONG_PTR lpIndex;
    189     int type = GetTypeFixed(Parameter,&lpIndex);
    190 
    191     int size;
    192     if( type == DEF_OBJECT ){
    193         CClass *pClass = (CClass *)lpIndex;
    194         size = pClass->GetSize();
    195     }
    196     else{
    197         size=GetTypeSize(type,lpIndex);
    198     }
     187void Opcode_Func_SizeOf( const string &typeName ){
     188    Type tempType;
     189    if( !Type::StringToType( typeName, tempType ) ){
     190        SetError(3,typeName,cp);
     191        return;
     192    }
     193
     194    int typeSize = ( tempType.IsObject() ) ?
     195        tempType.GetClass().GetSize() : tempType.GetSize();
    199196
    200197    //mov rax,size
    201     op_mov_RV(sizeof(_int64),REG_RAX,size);
     198    op_mov_RV(sizeof(_int64),REG_RAX,typeSize);
    202199}
    203200void Opcode_Func_VarPtr( const char *Parameter, Type &resultType, bool isCallOn ){
Note: See TracChangeset for help on using the changeset viewer.