Changeset 106 in dev for BasicCompiler32
- Timestamp:
- May 4, 2007, 5:04:50 PM (18 years ago)
- Location:
- BasicCompiler32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Var.cpp
r104 r106 352 352 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss){ 353 353 int i; 354 char variable[VN_SIZE] ,member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];354 char variable[VN_SIZE]; 355 355 356 356 if(NameBuffer[0]=='.'){ … … 360 360 else lstrcpy(variable,NameBuffer); 361 361 362 // 名前空間を分離 363 char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE]; 364 Smoothie::Meta::namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName ); 365 366 // 先頭オブジェクトまたはクラス名と入れ子メンバに分割 362 367 CClass::RefType refType; 363 if( FormatUseProcReturnObject( variable, VarName, array, refType, member ) ){ 364 // 戻り値オブジェクトのメンバを直接参照しているとき 365 //例: func().member 366 367 void *pInfo; 368 int idProc=GetProc(VarName,(void **)&pInfo); 369 370 if(idProc){ 371 pRelativeVar->dwKind=VAR_DIRECTMEM; 372 373 Type type; 374 375 376 //////////////// 377 // 呼び出し 378 //////////////// 379 380 CallProc(idProc,pInfo,VarName,array,type); 381 382 //戻り値をecxにコピー 383 op_mov_RR( REG_ECX, REG_EAX ); 384 385 386 if(!_member_offset( 387 isErrorEnabled, 388 isWriteAccess, 389 type.GetClass(), 390 member,pRelativeVar,resultType,0)) return false; 391 392 return true; 393 } 394 } 395 396 397 lstrcpy(VarName,variable); 398 GetVarFormatString(VarName,array,lpPtrOffset,member,refType); 368 char member[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE]; 369 GetVarFormatString(simpleName,array,lpPtrOffset,member,refType); 370 371 // 名前空間を分離していた場合は結合 372 char VarName[VN_SIZE]; 373 if( namespaceStr[0] ){ 374 sprintf( VarName, "%s.%s", namespaceStr, simpleName ); 375 } 376 else{ 377 lstrcpy( VarName, simpleName ); 378 } 399 379 400 380 const int *pSubScripts; -
BasicCompiler32/NumOpe.cpp
r103 r106 272 272 return TermMemberOpe( leftType.GetClass(), baseType, resultType, termFull, termLeft, member ); 273 273 } 274 globalArea: 274 275 275 276 … … 289 290 // グローバル属性エリア 290 291 ///////////////////////////////////////////////////////////////// 291 globalArea:292 292 293 293 const int useReg = REG_EAX;
Note:
See TracChangeset
for help on using the changeset viewer.