Changeset 205 in dev for trunk/jenga/src/smoothie/LexicalScoping.cpp
- Timestamp:
- Jul 12, 2007, 2:57:04 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/src/smoothie/LexicalScoping.cpp
r186 r205 1 1 #include <jenga/include/smoothie/LexicalScoping.h> 2 2 #include <jenga/include/smoothie/SmoothieException.h> 3 #include <jenga/include/smoothie/Variable.h>4 #include <jenga/include/smoothie/Procedure.h>5 3 6 4 … … 54 52 ppScopes[level] = CreateScope( level, addr, TypeOfStatement ); 55 53 } 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 }87 54 88 55 int CLexicalScopes::GetNowLevel(){
Note:
See TracChangeset
for help on using the changeset viewer.