Changeset 49 in dev for BasicCompiler32
- Timestamp:
- Feb 10, 2007, 6:13:37 AM (18 years ago)
- Location:
- BasicCompiler32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Var.cpp
r40 r49 362 362 extern BOOL bCompilingGlobal; 363 363 int i,RefType; 364 LONG_PTR lpIndex; 364 365 char variable[VN_SIZE],member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE]; 365 366 … … 370 371 else lstrcpy(variable,NameBuffer); 371 372 373 374 if( FormatUseProcReturnObject( variable, VarName, array, RefType, member ) ){ 375 // 戻り値オブジェクトのメンバを直接参照しているとき 376 //例: func().member 377 378 void *pInfo; 379 int idProc=GetProc(VarName,&pInfo); 380 381 if(idProc){ 382 pRelativeVar->dwKind=VAR_DIRECTMEM; 383 384 385 //////////////// 386 // 呼び出し 387 //////////////// 388 389 *pType=CallProc(idProc,pInfo,VarName,array,&lpIndex); 390 391 //戻り値をecxにコピー 392 op_mov_RR( REG_ECX, REG_EAX ); 393 394 395 LONG_PTR lp2; 396 if(!GetMemberOffset( 397 isErrorEnabled, 398 isWriteAccess, 399 (CClass *)lpIndex, 400 member,pType,pRelativeVar,&lp2,0)) return 0; 401 if(plpIndex) *plpIndex=lp2; 402 403 return 1; 404 } 405 } 406 407 372 408 lstrcpy(VarName,variable); 373 409 GetVarFormatString(VarName,array,lpPtrOffset,member,&RefType); 374 410 375 LONG_PTR lpIndex;376 411 int *pSubScripts; 377 412 bool bConst; -
BasicCompiler32/NumOpe.cpp
r41 r49 284 284 285 285 if(idProc){ 286 //閉じカッコ")"に続く文字がNULLでないときはエラーにする 287 if(term[i2+1+i4+1]!='\0') SetError(42,NULL,cp); 286 //閉じカッコ")"に続く文字がNULLでないとき 287 if(term[i2+1+i4+1]!='\0'){ 288 if( term[i2+1+i4+1] == '.' 289 || term[i2+1+i4+1] == 1 && term[i2+1+i4+2] == ESC_PSMEM ){ 290 goto NonProc; 291 } 292 else{ 293 SetError(42,NULL,cp); 294 } 295 } 288 296 289 297 //////////////// … … 351 359 } 352 360 } 361 NonProc: 353 362 354 363 -
BasicCompiler32/Opcode.h
r46 r49 33 33 #define VAR_DIRECTMEM 4 //Direct memory 34 34 35 35 36 extern int cp; 36 37 extern int obp; 37 38 extern char *OpBuffer; 39 40 #define breakpoint OpBuffer[obp++]=(char)0xCC; 41 38 42 39 43 //ラベルアドレス
Note:
See TracChangeset
for help on using the changeset viewer.