Changeset 392 in dev for trunk/abdev
- Timestamp:
- Feb 20, 2008, 7:44:27 PM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r370 r392 389 389 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 390 390 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 391 pVar-> bLiving=TRUE;391 pVar->isLiving = true; 392 392 393 393 pUserProc->GetLocalVars().push_back( pVar ); -
trunk/abdev/BasicCompiler32/Compile_Var.cpp
r370 r392 1128 1128 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 1129 1129 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 1130 pVar-> bLiving=TRUE;1130 pVar->isLiving = true; 1131 1131 1132 1132 //エラー用 … … 1163 1163 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 1164 1164 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 1165 pVar-> bLiving=TRUE;1165 pVar->isLiving = true; 1166 1166 1167 1167 if(InitBuf[0]){ -
trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp
r370 r392 344 344 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 345 345 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 346 pVar-> bLiving=TRUE;346 pVar->isLiving = true; 347 347 348 348 pUserProc->GetLocalVars().push_back( pVar ); -
trunk/abdev/BasicCompiler64/Compile_Var.cpp
r370 r392 1140 1140 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 1141 1141 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 1142 pVar-> bLiving=TRUE;1142 pVar->isLiving = true; 1143 1143 1144 1144 //エラー用 … … 1175 1175 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 1176 1176 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 1177 pVar-> bLiving=TRUE;1177 pVar->isLiving = true; 1178 1178 1179 1179 if(InitBuf[0]){ -
trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
r370 r392 968 968 pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() ); 969 969 pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() ); 970 pVar-> bLiving=TRUE;970 pVar->isLiving = true; 971 971 972 972 //エラー用 -
trunk/abdev/BasicCompiler_Common/include/Variable.h
r288 r392 208 208 209 209 210 BOOL bLiving;210 bool isLiving; 211 211 int source_code_address; 212 212 -
trunk/abdev/BasicCompiler_Common/src/LexicalScope.cpp
r290 r392 76 76 77 77 //使用済みローカル変数の生存チェックを外す 78 BOOST_FOREACH( Variable *pVar, (*pVars) ){ 79 if(pVar->bLiving&&pVar->GetScopeLevel()==level){ 80 pVar->bLiving=0; 78 BOOST_FOREACH( Variable *pVar, (*pVars) ) 79 { 80 if( pVar->isLiving && pVar->GetScopeLevel() == level ) 81 { 82 pVar->isLiving = false; 81 83 pVar->SetScopeEndAddress( compiler.codeGenerator.GetNativeCodeSize() ); 82 84 } … … 115 117 116 118 //同一レベルのレキシカルスコープのみを検知 117 if( !pVar->bLiving) continue;119 if( !pVar->isLiving ) continue; 118 120 if( pVar->GetScopeLevel() != GetNowLevel() ) continue; 119 121 -
trunk/abdev/BasicCompiler_Common/src/Meta.cpp
r288 r392 88 88 if( pVar->GetScopeLevel() == 0 ) 89 89 { 90 pVar-> bLiving = TRUE;90 pVar->isLiving = true; 91 91 } 92 92 -
trunk/abdev/BasicCompiler_Common/src/Variable.cpp
r288 r392 34 34 for( int i=(int)this->size()-1; i>=0 ; i-- ){ 35 35 const Variable *pVar = (*this)[i]; 36 if( pVar-> bLiving //現在のスコープで有効なもの36 if( pVar->isLiving //現在のスコープで有効なもの 37 37 && pVar->GetScopeLevel() == compiler.codeGenerator.lexicalScopes.GetNowLevel() //現在のスコープと同一レベル 38 38 ) … … 51 51 for( int i=(int)this->size()-1; i>=0 ; i-- ){ 52 52 const Variable *pVar = (*this)[i]; 53 if( pVar-> bLiving //現在のスコープで有効なもの53 if( pVar->isLiving //現在のスコープで有効なもの 54 54 && pVar->GetScopeLevel() <= compiler.codeGenerator.lexicalScopes.GetNowLevel() //現在のスコープレベルを超さないもの(Returnによる解放処理中を考慮) 55 55 ){
Note:
See TracChangeset
for help on using the changeset viewer.