Changeset 79 in dev for BasicCompiler32/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
  • BasicCompiler32/Compile_Func.cpp

    r78 r79  
    340340    pUserProc->Using();
    341341}
    342 void Opcode_Func_SizeOf(const char *Parameter){
    343     LONG_PTR lpIndex;
    344     int type = GetTypeFixed(Parameter,&lpIndex);
    345 
    346     int size;
    347     if( type == DEF_OBJECT ){
    348         CClass *pClass = (CClass *)lpIndex;
    349         size = pClass->GetSize();
    350     }
    351     else{
    352         size=GetTypeSize(type,lpIndex);
    353     }
     342void Opcode_Func_SizeOf( const string &typeName ){
     343    Type tempType;
     344    if( !Type::StringToType( typeName, tempType ) ){
     345        SetError(3,typeName,cp);
     346        return;
     347    }
     348
     349    int typeSize = ( tempType.IsObject() ) ?
     350        tempType.GetClass().GetSize() : tempType.GetSize();
    354351
    355352    //mov eax,size
    356     op_mov_RV( REG_EAX, size );
     353    op_mov_RV( REG_EAX, typeSize );
    357354}
    358355void Opcode_Func_VarPtr( const char *Parameter, Type &resultType, bool isCallOn ){
Note: See TracChangeset for help on using the changeset viewer.