Ignore:
Timestamp:
May 3, 2008, 6:32:50 PM (16 years ago)
Author:
dai_9181
Message:

Compiler::pCompilingClassメンバをprivateにし、setter/getterにあたるメソッドを用意した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp

    r508 r536  
    194194
    195195    //アクセシビリティをチェック
    196     if(&objClass==compiler.pCompilingClass){
     196    if( compiler.IsCompilingClass() && &objClass == &compiler.GetCompilingClass() ){
    197197        //同一クラスオブジェクトの場合はプライベートアクセスを容認する
    198198        if(pMember->IsNoneAccess()){
     
    447447    }
    448448
    449     if(compiler.pCompilingClass){
     449    if( compiler.IsCompilingClass() ){
    450450        //////////////////////
    451451        // クラスメンバの参照
     
    460460            pRelativeVar->dwKind=VAR_DIRECTMEM;
    461461
    462             resultType.SetType( DEF_OBJECT, compiler.pCompilingClass );
     462            resultType.SetType( DEF_OBJECT, &compiler.GetCompilingClass() );
    463463            return true;
    464464        }
     
    472472            //クラス内の動的メンバを参照するとき(通常)
    473473
    474             if( !compiler.pCompilingClass->HasDynamicMember( VarName ) )
     474            if( !compiler.GetCompilingClass().HasDynamicMember( VarName ) )
    475475            {
    476476                goto NonClassMember;
     
    483483        if( isWriteAccess &&
    484484            pMethod->IsConst() &&
    485             compiler.pCompilingClass->IsCompilingConstructor() == false &&
    486             compiler.pCompilingClass->IsCompilingDestructor() == false
     485            compiler.GetCompilingClass().IsCompilingConstructor() == false &&
     486            compiler.GetCompilingClass().IsCompilingDestructor() == false
    487487            ){
    488488                compiler.errorMessenger.Output(131, NULL, cp );
     
    499499            isErrorEnabled,
    500500            isWriteAccess,
    501             Type( DEF_OBJECT, *compiler.pCompilingClass ),
     501            Type( DEF_OBJECT, compiler.GetCompilingClass() ),
    502502            variable,
    503503            pRelativeVar,
     
    559559        }
    560560
    561         if(compiler.pCompilingClass){
     561        if( compiler.IsCompilingClass() ){
    562562            //自身のクラスから静的メンバを参照する場合
    563563            char temp2[VN_SIZE];
    564             sprintf(temp2,"%s.%s",compiler.pCompilingClass->GetName().c_str(),VarName);
     564            sprintf(temp2,"%s.%s",compiler.GetCompilingClass().GetName().c_str(),VarName);
    565565            pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( temp2 ) );
    566566            if( pVar ){
Note: See TracChangeset for help on using the changeset viewer.