Ignore:
Timestamp:
Mar 8, 2007, 2:49:34 AM (17 years ago)
Author:
dai_9181
Message:

すべてのオブジェクトを参照型に切り替えた。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/LexicalScoping.cpp

    r51 r64  
    182182
    183183
    184     int i3,i4;
     184    int i3;
    185185    int indexSystemGC=-1;
    186186    for( i3 = num - 1; i3 >= 0; i3-- ){     //確保したのと逆順序で解放するため、バックサーチにする
     
    197197        if( pVar[i3].ScopeLevel != GetNowLevel() ) continue;
    198198
    199         if(pVar[i3].type==DEF_OBJECT&&pVar[i3].fRef&OBJECT_PARAMETER){
    200             //実態オブジェクトのパラメータを持つとき
    201 
    202             //デストラクタを呼び出す
    203             CMethod *method = pVar[i3].u.pobj_c->GetDestructorMethod();
    204             if( method ){
    205                 Opcode_CallProc("", method->psi,0,pVar[i3].name,DEF_OBJECT);
    206             }
     199        if(pVar[i3].type==DEF_STRUCT&&pVar[i3].fRef&OBJECT_PARAMETER){
     200            //構造体パラメータを持つとき
    207201
    208202            //メモリを解放する
     
    241235            }
    242236        }
     237
     238        /*
     239        TODO: 消す
    243240        else if(pVar[i3].type==DEF_OBJECT&&pVar[i3].fRef==0){
    244241            //デストラクタの呼び出し
     
    285282            }
    286283        }
     284        */
    287285    }
    288286
Note: See TracChangeset for help on using the changeset viewer.