Changeset 183 in dev for trunk/abdev/BasicCompiler32/Compile_Var.cpp
- Timestamp:
- Jun 24, 2007, 6:50:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Var.cpp
r159 r183 1 #include <jenga/include/smoothie/Smoothie.h> 2 #include <jenga/include/smoothie/LexicalAnalysis.h> 3 4 #include <LexicalScopingImpl.h> 5 #include <CodeGenerator.h> 6 #include <Compiler.h> 7 1 8 #include "../BasicCompiler_Common/common.h" 2 9 #include "Opcode.h" … … 187 194 188 195 //アクセシビリティをチェック 189 if(&objClass== pobj_CompilingClass){196 if(&objClass==Smoothie::Temp::pCompilingClass){ 190 197 //同一クラスオブジェクトの場合はプライベートアクセスを容認する 191 198 if(pMember->IsNoneAccess()){ … … 360 367 // 名前空間を分離 361 368 char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE]; 362 Smoothie:: meta.namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );369 Smoothie::GetMeta().namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName ); 363 370 364 371 // 先頭オブジェクトまたはクラス名と入れ子メンバに分割 … … 417 424 } 418 425 419 if( pobj_CompilingClass){426 if(Smoothie::Temp::pCompilingClass){ 420 427 ////////////////////// 421 428 // クラスメンバの参照 … … 430 437 pRelativeVar->dwKind=VAR_DIRECTMEM; 431 438 432 resultType.SetType( DEF_OBJECT, pobj_CompilingClass );439 resultType.SetType( DEF_OBJECT, Smoothie::Temp::pCompilingClass ); 433 440 return true; 434 441 } … … 443 450 444 451 bool isFound = false; 445 BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){452 BOOST_FOREACH( CMember *pMember, Smoothie::Temp::pCompilingClass->GetDynamicMembers() ){ 446 453 if( pMember->GetName() == VarName ){ 447 454 isFound = true; … … 454 461 //Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき 455 462 //(コンストラクタ、デストラクタ内を除く) 456 const CMethod *pMethod = pobj_DBClass->GetNowCompilingMethodInfo();463 const CMethod *pMethod = Smoothie::GetMeta().GetClasses().GetNowCompilingMethodInfo(); 457 464 if( isWriteAccess && 458 465 pMethod->IsConst() && 459 pobj_CompilingClass->IsCompilingConstructor() == false &&460 pobj_CompilingClass->IsCompilingDestructor() == false466 Smoothie::Temp::pCompilingClass->IsCompilingConstructor() == false && 467 Smoothie::Temp::pCompilingClass->IsCompilingDestructor() == false 461 468 ){ 462 469 SetError(131, NULL, cp ); … … 473 480 isErrorEnabled, 474 481 isWriteAccess, 475 * pobj_CompilingClass,482 *Smoothie::Temp::pCompilingClass, 476 483 variable, 477 484 pRelativeVar, … … 517 524 } 518 525 519 int typeDefIndex = Smoothie:: meta.typeDefs.GetIndex( VarName );526 int typeDefIndex = Smoothie::GetMeta().typeDefs.GetIndex( VarName ); 520 527 if( typeDefIndex != -1 ){ 521 528 // TypeDef後の型名だったとき 522 lstrcpy( VarName, Smoothie:: meta.typeDefs[typeDefIndex].GetBaseName().c_str() );529 lstrcpy( VarName, Smoothie::GetMeta().typeDefs[typeDefIndex].GetBaseName().c_str() ); 523 530 } 524 531 … … 533 540 } 534 541 535 if( pobj_CompilingClass){542 if(Smoothie::Temp::pCompilingClass){ 536 543 //自身のクラスから静的メンバを参照する場合 537 544 char temp2[VN_SIZE]; 538 sprintf(temp2,"%s.%s", pobj_CompilingClass->GetName().c_str(),VarName);545 sprintf(temp2,"%s.%s",Smoothie::Temp::pCompilingClass->GetName().c_str(),VarName); 539 546 pVar = globalVars.Find( Symbol( temp2 ) ); 540 547 if( pVar ){ … … 825 832 char *temp; 826 833 temp=(char *)i64data; 827 i2= dataTable.AddString(temp,lstrlen(temp));834 i2=Compiler::GetNativeCode().GetDataTable().AddString(temp,lstrlen(temp)); 828 835 HeapDefaultFree(temp); 829 836 … … 1015 1022 char *temp; 1016 1023 temp=(char *)i64data; 1017 i2= dataTable.AddString(temp,lstrlen(temp));1024 i2=Compiler::GetNativeCode().GetDataTable().AddString(temp,lstrlen(temp)); 1018 1025 HeapDefaultFree(temp); 1019 1026 … … 1099 1106 1100 1107 //レキシカルスコープ 1101 pVar->ScopeLevel= obj_LexScopes.GetNowLevel();1102 pVar->ScopeStartAddress= obj_LexScopes.GetStartAddress();1108 pVar->ScopeLevel=GetLexicalScopes().GetNowLevel(); 1109 pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress(); 1103 1110 pVar->bLiving=TRUE; 1104 1111 … … 1134 1141 1135 1142 //レキシカルスコープ 1136 pVar->ScopeLevel= obj_LexScopes.GetNowLevel();1137 pVar->ScopeStartAddress= obj_LexScopes.GetStartAddress();1143 pVar->ScopeLevel=GetLexicalScopes().GetNowLevel(); 1144 pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress(); 1138 1145 pVar->bLiving=TRUE; 1139 1146
Note:
See TracChangeset
for help on using the changeset viewer.