Ignore:
Timestamp:
May 10, 2008, 12:19:15 PM (16 years ago)
Author:
dai_9181
Message:

[530][583]を64bit版にマージ。

File:
1 edited

Legend:

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

    r514 r584  
    209209    ////////////////////////////
    210210
    211     const CMember *pMember = objClass.FindDynamicMember( VarName );
     211    const Member *pMember = objClass.FindDynamicMember( VarName );
    212212    if( !pMember )
    213213    {
     
    220220
    221221    //アクセシビリティをチェック
    222     if(&objClass==compiler.pCompilingClass){
     222    if( compiler.IsCompilingClass() && &objClass == &compiler.GetCompilingClass() ){
    223223        //同一クラスオブジェクトの場合はプライベートアクセスを容認する
    224224        if(pMember->IsNoneAccess()){
     
    412412
    413413
    414     if( UserProc::IsLocalAreaCompiling() ){
     414    if( compiler.IsLocalAreaCompiling() ){
    415415        //////////////////
    416416        // ローカル変数
    417417        //////////////////
    418418
    419         const Variable *pVar = UserProc::CompilingUserProc().GetLocalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     419        const Variable *pVar = compiler.GetCompilingUserProc().GetLocalVars().BackSearch(
     420            LexicalAnalyzer::FullNameToSymbol( VarName ),
     421            compiler.codeGenerator.lexicalScopes.GetNowLevel()
     422        );
    420423        if( pVar ){
    421424            //ポインタ変数の場合
     
    470473    }
    471474
    472 
    473     if(compiler.pCompilingClass){
     475    if( compiler.IsCompilingClass() ){
    474476        //////////////////////
    475477        // クラスメンバの参照
     
    482484            pRelativeVar->dwKind=VAR_DIRECTMEM;
    483485
    484             resultType.SetType( DEF_OBJECT, compiler.pCompilingClass );
     486            resultType.SetType( DEF_OBJECT, &compiler.GetCompilingClass() );
    485487            return true;
    486488        }
     
    494496            //クラス内の動的メンバを参照するとき(通常)
    495497
    496             if( !compiler.pCompilingClass->HasDynamicMember( VarName ) )
     498            if( !compiler.GetCompilingClass().HasDynamicMember( VarName ) )
    497499            {
    498500                goto NonClassMember;
     
    502504        //Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき
    503505        //(コンストラクタ、デストラクタ内を除く)
    504         const CMethod *pMethod = compiler.GetObjectModule().meta.GetClasses().GetNowCompilingMethodInfo();
     506        const CMethod *pMethod = &compiler.GetCompilingUserProc().GetMethod();
    505507        if( isWriteAccess &&
    506508            pMethod->IsConst() &&
    507             compiler.pCompilingClass->IsCompilingConstructor() == false &&
    508             compiler.pCompilingClass->IsCompilingDestructor() == false
     509            compiler.GetCompilingClass().IsCompilingConstructor() == false &&
     510            compiler.GetCompilingClass().IsCompilingDestructor() == false
    509511            ){
    510512                compiler.errorMessenger.Output(131, NULL, cp );
     
    518520            isErrorEnabled,
    519521            isWriteAccess,
    520             Type( DEF_OBJECT, *compiler.pCompilingClass ),
     522            Type( DEF_OBJECT, compiler.GetCompilingClass() ),
    521523            variable,
    522524            pRelativeVar,
     
    536538
    537539        char temporary[VN_SIZE];
    538         if( UserProc::IsLocalAreaCompiling() ){
     540        if( compiler.IsLocalAreaCompiling() ){
    539541            GetNowStaticVarFullName(VarName,temporary);
    540542
     
    578580        }
    579581
    580         if(compiler.pCompilingClass){
     582        if( compiler.IsCompilingClass() ){
    581583            //自身のクラスから静的メンバを参照する場合
    582584            char temp2[VN_SIZE];
    583             sprintf(temp2,"%s.%s",compiler.pCompilingClass->GetName().c_str(),VarName);
     585            sprintf(temp2,"%s.%s",compiler.GetCompilingClass().GetName().c_str(),VarName);
    584586            pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( temp2 ) );
    585587            if( pVar ){
     
    592594        /////////////////////
    593595
    594         pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     596        pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch(
     597            LexicalAnalyzer::FullNameToSymbol( VarName ),
     598            compiler.codeGenerator.lexicalScopes.GetNowLevel()
     599        );
    595600        if( pVar ){
    596601            goto GlobalOk;
     
    806811
    807812            int i = 0;
    808             BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
     813            BOOST_FOREACH( Member *pMember, objClass.GetDynamicMembers() ){
    809814                if(InitBuf[i]=='\0'){
    810815                    compiler.errorMessenger.Output(41,0,cp);
     
    968973
    969974            int i = 0;
    970             BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
     975            BOOST_FOREACH( Member *pMember, objClass.GetDynamicMembers() ){
    971976                if(InitBuf[i]=='\0'){
    972977                    compiler.errorMessenger.Output(41,0,cp);
     
    11001105void dim( char *VarName, const Subscripts &subscripts, const Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlags)
    11011106{
    1102     if( UserProc::IsGlobalAreaCompiling() ){
     1107    if( compiler.IsGlobalAreaCompiling() ){
    11031108        /////////////////////////
    11041109        // グローバル変数
     
    11121117        /////////////////
    11131118
    1114         if( UserProc::CompilingUserProc().GetLocalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( VarName ) ) ){
     1119        if( compiler.GetCompilingUserProc().GetLocalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( VarName ), compiler.codeGenerator.lexicalScopes.GetNowLevel() ) ){
    11151120            //2重定義のエラー
    11161121            compiler.errorMessenger.Output(15,VarName,cp);
     
    11201125        bool isConst = ( dwFlags & DIMFLAG_CONST ) ? true:false;
    11211126
    1122         Variable *pVar = new Variable( VarName, type, isConst, false, ConstractParameter, false );
     1127        Variable *pVar = new Variable(
     1128            ActiveBasic::Compiler::LexicalAnalyzer::FullNameToSymbol( VarName ),
     1129            type,
     1130            isConst,
     1131            false,
     1132            ConstractParameter,
     1133            false
     1134        );
    11231135
    11241136        if( subscripts.size() > 0 ){
     
    11361148
    11371149        // 変数を追加
    1138         UserProc::CompilingUserProc().GetLocalVars().push_back( pVar );
     1150        compiler.GetCompilingUserProc().GetLocalVars().push_back( pVar );
    11391151
    11401152        //アラインメントを考慮
     
    11531165                // 呼び出し側のオフセットズレを考慮する
    11541166
    1155                 if( 0 == ( UserProc::CompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE/*ret分*/ ) % alignment ){
     1167                if( 0 == ( compiler.GetCompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE /* ret分 */ ) % alignment ){
    11561168                    AllLocalVarSize += PTR_SIZE;
    11571169                }
Note: See TracChangeset for help on using the changeset viewer.