Changeset 47 in dev
- Timestamp:
- Feb 10, 2007, 3:12:04 AM (18 years ago)
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/CParameter.cpp
r46 r47 95 95 if(Parms[i]){ 96 96 TYPEINFO BaseType={ppi[i].type,ppi[i].u.index}; 97 if(Parms[i][0]==1&&Parms[i][1]==ESC_BYVAL){ 98 type=NumOpe_GetType(Parms[i]+2,&BaseType,&lpIndex); 99 type=MAKE_PTR_TYPE(NATURAL_TYPE(type),PTR_LEVEL(type)-1); 100 } 101 else{ 102 type=NumOpe_GetType(Parms[i],&BaseType,&lpIndex); 103 } 97 type=NumOpe_GetType(Parms[i],&BaseType,&lpIndex); 104 98 } 105 99 else{ -
BasicCompiler32/Compile_CallProc.cpp
r46 r47 243 243 psi->bUse=1; 244 244 245 BOOL bStatic=0;245 bool isStatic = false; 246 246 CClass *pobj_c = NULL; 247 247 CMethod *pMethod = NULL; … … 254 254 } 255 255 else{ 256 pobj_c=pobj_DBClass->check(ObjectName); 257 if(pobj_c){ 258 //静的メンバ 259 bStatic=1; 260 } 261 else{ 262 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 263 GetVarType(ObjectName,(LONG_PTR *)&pobj_c,1); 256 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 257 int type = GetVarType(ObjectName,(LONG_PTR *)&pobj_c,0); 258 if(!(NATURAL_TYPE(type)==DEF_OBJECT)){ 259 pobj_c=pobj_DBClass->check(ObjectName); 260 if( pobj_c ){ 261 isStatic = true; 262 } 263 else{ 264 SetError(300,NULL,cp); 265 } 264 266 } 265 267 } … … 281 283 ///////////////////////////////// 282 284 pMethod = NULL; 283 if( ! bStatic ) pMethod = pobj_c->GetMethodInfo( psi );285 if( ! isStatic ) pMethod = pobj_c->GetMethodInfo( psi ); 284 286 if( ! pMethod ){ 285 287 //動的メソッドが取得できなかったときは静的メソッドを当たる … … 291 293 292 294 //静的メンバ 293 bStatic=1;295 isStatic = true; 294 296 } 295 297 … … 337 339 338 340 char temporary[VN_SIZE]={0}; 339 if( psi->pobj_ParentClass&&bStatic==0){341 if( psi->pobj_ParentClass && isStatic == false ){ 340 342 //_System_LocalThis(第一パラメータ)のダミーを作成 341 343 lstrcpy(temporary,"0,"); … … 401 403 402 404 403 if( psi->pobj_ParentClass&&bStatic==0){405 if( psi->pobj_ParentClass && isStatic == false ){ 404 406 ////////////////////////////////////////////////////// 405 407 // メンバ関数の場合 -
BasicCompiler64/CParameter.cpp
r46 r47 94 94 if(Parms[i]){ 95 95 TYPEINFO BaseType={ppi[i].type,ppi[i].u.index}; 96 if(Parms[i][0]==1&&Parms[i][1]==ESC_BYVAL){ 97 type=NumOpe_GetType(Parms[i]+2,&BaseType,&lpIndex); 98 type=MAKE_PTR_TYPE(NATURAL_TYPE(type),PTR_LEVEL(type)-1); 99 } 100 else{ 101 type=NumOpe_GetType(Parms[i],&BaseType,&lpIndex); 102 } 96 type=NumOpe_GetType(Parms[i],&BaseType,&lpIndex); 103 97 } 104 98 else{ -
BasicCompiler64/Compile_CallProc.cpp
r46 r47 246 246 psi->bUse=1; 247 247 248 BOOL bStatic=0;248 bool isStatic = false; 249 249 CClass *pobj_c = NULL; 250 250 CMethod *pMethod = NULL; … … 257 257 } 258 258 else{ 259 pobj_c=pobj_DBClass->check(ObjectName); 260 if(pobj_c){ 261 //静的メンバ 262 bStatic=1; 263 } 264 else{ 265 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 266 GetVarType(ObjectName,(LONG_PTR *)&pobj_c,1); 259 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 260 int type = GetVarType(ObjectName,(LONG_PTR *)&pobj_c,0); 261 if(!(NATURAL_TYPE(type)==DEF_OBJECT)){ 262 pobj_c=pobj_DBClass->check(ObjectName); 263 if( pobj_c ){ 264 isStatic = true; 265 } 266 else{ 267 SetError(300,NULL,cp); 268 } 267 269 } 268 270 } … … 284 286 ///////////////////////////////// 285 287 pMethod = NULL; 286 if( ! bStatic ) pMethod = pobj_c->GetMethodInfo( psi );288 if( ! isStatic ) pMethod = pobj_c->GetMethodInfo( psi ); 287 289 if( ! pMethod ){ 288 290 //動的メソッドが取得できなかったときは静的メソッドを当たる … … 294 296 295 297 //静的メンバ 296 bStatic=1;298 isStatic = true; 297 299 } 298 300 … … 339 341 340 342 char temporary[VN_SIZE]={0}; 341 if( psi->pobj_ParentClass&&bStatic==0){343 if( psi->pobj_ParentClass && isStatic == false ){ 342 344 //_System_LocalThis(第一パラメータ)のダミーを作成 343 345 lstrcpy(temporary,"0,"); … … 413 415 }//////////////////////////////////////////// 414 416 415 if( psi->pobj_ParentClass&&bStatic==0){417 if( psi->pobj_ParentClass && isStatic == false ){ 416 418 //mov rdx,r13 417 419 op_mov_RR(REG_RDX,REG_R13); … … 424 426 425 427 426 if( psi->pobj_ParentClass&&bStatic==0){428 if( psi->pobj_ParentClass && isStatic == false ){ 427 429 /////////////////////////////// 428 430 // メンバ関数の場合 -
BasicCompiler64/Compile_Statement.cpp
r40 r47 71 71 } 72 72 73 if(lstrcmp(buffer,"EnumX.EnumX")==0){ 74 MessageBeep(0); 75 } 73 76 74 77 int idProc; -
BasicCompiler_Common/Enum.cpp
r29 r47 161 161 lstrcpy(buffer+length,"\tEnd Sub\n"); 162 162 length+=lstrlen(buffer+length); 163 sprintf(buffer+length,"\tSub %s(ByRef e As %s)\n",parent->TypeName,parent->TypeName); 164 length+=lstrlen(buffer+length); 165 lstrcpy(buffer+length,"\t\tEnumBase(e.m_Value)\n"); 166 length+=lstrlen(buffer+length); 167 lstrcpy(buffer+length,"\tEnd Sub\n"); 168 length+=lstrlen(buffer+length); 163 169 sprintf(buffer+length,"\tSub %s(value As Long)\n",parent->TypeName); 164 170 length+=lstrlen(buffer+length); … … 233 239 length+=lstrlen(buffer+length); 234 240 241 sprintf(buffer+length,"\tFunction Operator== (ByRef e As %s) As Boolean\n",parent->TypeName); 242 length+=lstrlen(buffer+length); 243 lstrcpy(buffer+length,"\t\tReturn ( e.m_Value = m_Value )\n"); 244 length+=lstrlen(buffer+length); 245 lstrcpy(buffer+length,"\tEnd Function\n"); 246 length+=lstrlen(buffer+length); 247 235 248 lstrcpy(buffer+length,"End Class\n"); 236 249 length+=lstrlen(buffer+length); -
BasicCompiler_Common/hash.cpp
r46 r47 114 114 } 115 115 else{ 116 pobj_c=pobj_DBClass->check(ObjName); 117 if( pobj_c ){ 118 isStatic = true; 119 } 120 else{ 121 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 122 int type = GetVarType(ObjName,(LONG_PTR *)&pobj_c,0); 123 if(!(NATURAL_TYPE(type)==DEF_OBJECT)) goto finish; 116 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 117 int type = GetVarType(ObjName,(LONG_PTR *)&pobj_c,0); 118 if(!(NATURAL_TYPE(type)==DEF_OBJECT)){ 119 pobj_c=pobj_DBClass->check(ObjName); 120 if( pobj_c ){ 121 isStatic = true; 122 } 123 else{ 124 goto finish; 125 } 124 126 } 125 127 }
Note:
See TracChangeset
for help on using the changeset viewer.