Changeset 62 in dev for BasicCompiler64/Compile_Calc.cpp


Ignore:
Timestamp:
Feb 22, 2007, 3:57:56 AM (18 years ago)
Author:
dai_9181
Message:

グローバル変数に対してByRefを指定できるようにした

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Calc.cpp

    r55 r62  
    286286    }
    287287
    288     if( VarType == DEF_OBJECT && VarRelativeVar.dwKind == VAR_REFLOCAL ){
     288    if( VarType == DEF_OBJECT
     289        && (VarRelativeVar.dwKind == VAR_REFLOCAL || VarRelativeVar.dwKind == VAR_REFGLOBAL ) ){
    289290        // 参照型オブジェクトへの代入(初期化)はポインタ変数と同様の処理に値する
    290291        PTR_LEVEL_UP( VarType );
    291292
    292         VarRelativeVar.dwKind = VAR_LOCAL;
     293        if( VarRelativeVar.dwKind == VAR_REFGLOBAL ){
     294            VarRelativeVar.dwKind = VAR_GLOBAL;
     295        }
     296        else if( VarRelativeVar.dwKind == VAR_REFLOCAL ){
     297            VarRelativeVar.dwKind = VAR_LOCAL;
     298        }
    293299
    294300        if( CalcType == DEF_OBJECT ){
Note: See TracChangeset for help on using the changeset viewer.