Changeset 183 in dev for trunk/abdev/BasicCompiler64/Compile_Var.cpp
- Timestamp:
- Jun 24, 2007, 6:50:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/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" … … 216 223 217 224 //アクセシビリティをチェック 218 if(&objClass== pobj_CompilingClass){225 if(&objClass==Smoothie::Temp::pCompilingClass){ 219 226 //同一クラスオブジェクトの場合はプライベートアクセスを容認する 220 227 if(pMember->IsNoneAccess()){ … … 388 395 // 名前空間を分離 389 396 char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE]; 390 Smoothie:: meta.namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );397 Smoothie::GetMeta().namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName ); 391 398 392 399 // 先頭オブジェクトまたはクラス名と入れ子メンバに分割 … … 446 453 447 454 448 if( pobj_CompilingClass){455 if(Smoothie::Temp::pCompilingClass){ 449 456 ////////////////////// 450 457 // クラスメンバの参照 … … 457 464 pRelativeVar->dwKind=VAR_DIRECTMEM; 458 465 459 resultType.SetType( DEF_OBJECT, pobj_CompilingClass );466 resultType.SetType( DEF_OBJECT, Smoothie::Temp::pCompilingClass ); 460 467 return true; 461 468 } … … 470 477 471 478 bool isFound = false; 472 BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){479 BOOST_FOREACH( CMember *pMember, Smoothie::Temp::pCompilingClass->GetDynamicMembers() ){ 473 480 if( pMember->GetName() == VarName ){ 474 481 isFound = true; … … 481 488 //Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき 482 489 //(コンストラクタ、デストラクタ内を除く) 483 const CMethod *pMethod = pobj_DBClass->GetNowCompilingMethodInfo();490 const CMethod *pMethod = Smoothie::GetMeta().GetClasses().GetNowCompilingMethodInfo(); 484 491 if( isWriteAccess && 485 492 pMethod->IsConst() && 486 pobj_CompilingClass->IsCompilingConstructor() == false &&487 pobj_CompilingClass->IsCompilingDestructor() == false493 Smoothie::Temp::pCompilingClass->IsCompilingConstructor() == false && 494 Smoothie::Temp::pCompilingClass->IsCompilingDestructor() == false 488 495 ){ 489 496 SetError(131, NULL, cp ); … … 497 504 isErrorEnabled, 498 505 isWriteAccess, 499 * pobj_CompilingClass,506 *Smoothie::Temp::pCompilingClass, 500 507 variable, 501 508 pRelativeVar, … … 541 548 } 542 549 543 int typeDefIndex = Smoothie:: meta.typeDefs.GetIndex( VarName );550 int typeDefIndex = Smoothie::GetMeta().typeDefs.GetIndex( VarName ); 544 551 if( typeDefIndex != -1 ){ 545 552 // TypeDef後の型名だったとき 546 lstrcpy( VarName, Smoothie:: meta.typeDefs[typeDefIndex].GetBaseName().c_str() );553 lstrcpy( VarName, Smoothie::GetMeta().typeDefs[typeDefIndex].GetBaseName().c_str() ); 547 554 } 548 555 … … 557 564 } 558 565 559 if( pobj_CompilingClass){566 if(Smoothie::Temp::pCompilingClass){ 560 567 //自身のクラスから静的メンバを参照する場合 561 568 char temp2[VN_SIZE]; 562 sprintf(temp2,"%s.%s", pobj_CompilingClass->GetName().c_str(),VarName);569 sprintf(temp2,"%s.%s",Smoothie::Temp::pCompilingClass->GetName().c_str(),VarName); 563 570 pVar = globalVars.Find( temp2 ); 564 571 if( pVar ){ … … 844 851 char *temp; 845 852 temp=(char *)i64data; 846 i2= dataTable.AddString( temp );853 i2=Compiler::GetNativeCode().GetDataTable().AddString( temp ); 847 854 HeapDefaultFree(temp); 848 855 … … 994 1001 char *temp; 995 1002 temp=(char *)i64data; 996 i2= dataTable.AddString( temp );1003 i2=Compiler::GetNativeCode().GetDataTable().AddString( temp ); 997 1004 HeapDefaultFree(temp); 998 1005 … … 1086 1093 1087 1094 //レキシカルスコープ 1088 pVar->ScopeLevel= obj_LexScopes.GetNowLevel();1089 pVar->ScopeStartAddress= obj_LexScopes.GetStartAddress();1095 pVar->ScopeLevel=GetLexicalScopes().GetNowLevel(); 1096 pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress(); 1090 1097 pVar->bLiving=TRUE; 1091 1098 … … 1121 1128 1122 1129 //レキシカルスコープ 1123 pVar->ScopeLevel= obj_LexScopes.GetNowLevel();1124 pVar->ScopeStartAddress= obj_LexScopes.GetStartAddress();1130 pVar->ScopeLevel=GetLexicalScopes().GetNowLevel(); 1131 pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress(); 1125 1132 pVar->bLiving=TRUE; 1126 1133
Note:
See TracChangeset
for help on using the changeset viewer.