Changeset 570 in dev for trunk/ab5.0/abdev/compiler_x86


Ignore:
Timestamp:
May 6, 2008, 8:31:52 PM (16 years ago)
Author:
dai_9181
Message:

Variables::DuplicateCheck、Variables::BackSearchメソッドにnowScopeLevelパラメータを追加した。

File:
1 edited

Legend:

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

    r561 r570  
    393393        //////////////////
    394394
    395         const Variable *pVar = compiler.GetCompilingUserProc().GetLocalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     395        const Variable *pVar = compiler.GetCompilingUserProc().GetLocalVars().BackSearch(
     396            LexicalAnalyzer::FullNameToSymbol( VarName ),
     397            compiler.codeGenerator.lexicalScopes.GetNowLevel()
     398        );
    396399        if( pVar ){
    397400            //ポインタ変数の場合
     
    573576        /////////////////////
    574577
    575         pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     578        pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch(
     579            LexicalAnalyzer::FullNameToSymbol( VarName ),
     580            compiler.codeGenerator.lexicalScopes.GetNowLevel()
     581        );
    576582        if( pVar ){
    577583            goto GlobalOk;
     
    11041110        /////////////////
    11051111
    1106         if( compiler.GetCompilingUserProc().GetLocalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( VarName ) ) ){
     1112        if( compiler.GetCompilingUserProc().GetLocalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( VarName ), compiler.codeGenerator.lexicalScopes.GetNowLevel() ) ){
    11071113            //2重定義のエラー
    11081114            compiler.errorMessenger.Output(15,VarName,cp);
Note: See TracChangeset for help on using the changeset viewer.