Ignore:
Timestamp:
Jul 12, 2007, 2:57:04 AM (17 years ago)
Author:
dai_9181
Message:

コード全体のリファクタリングを実施

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/src/smoothie/LexicalScoping.cpp

    r186 r205  
    11#include <jenga/include/smoothie/LexicalScoping.h>
    22#include <jenga/include/smoothie/SmoothieException.h>
    3 #include <jenga/include/smoothie/Variable.h>
    4 #include <jenga/include/smoothie/Procedure.h>
    53
    64
     
    5452    ppScopes[level] = CreateScope( level, addr, TypeOfStatement );
    5553}
    56 void CLexicalScopes::End(){
    57     if( level <= 0 ){
    58         SmoothieException::Throw();
    59         return;
    60     }
    61 
    62     //デストラクタを呼ぶ
    63     CallDestructorsOfScopeEnd();
    64 
    65     Variables &vars = UserProc::IsGlobalAreaCompiling()?
    66         globalVars :
    67         UserProc::CompilingUserProc().localVars;
    68 
    69     //使用済みローカル変数の生存チェックを外す
    70     BOOST_FOREACH( Variable *pVar, vars ){
    71         if(pVar->bLiving&&pVar->ScopeLevel==level){
    72             pVar->bLiving=0;
    73             extern int obp;
    74             pVar->ScopeEndAddress=obp;
    75         }
    76     }
    77 
    78 
    79     //スコープ抜け出しスケジュール
    80     ppScopes[level]->RunScheduleOfBreak();
    81 
    82 
    83     //スコープレベルを下げる
    84     delete ppScopes[level];
    85     level--;
    86 }
    8754
    8855int CLexicalScopes::GetNowLevel(){
Note: See TracChangeset for help on using the changeset viewer.