- Timestamp:
- Jul 21, 2008, 6:10:13 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/stdafx.h
r700 r701 1 1 #pragma once 2 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 13 2 4 3 #include <map> … … 30 29 #include "include/ab_common.h" 31 30 32 size_t strlenSSE2(const char *);33 #define strlen strlenSSE234 #define lstrlenA strlenSSE2 -
trunk/ab5.0/abdev/compiler_x86/NumOpe.cpp
r700 r701 353 353 bool _TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool &isNeedHeapFreeStructure, bool *pIsClassName, bool isProcedureCallOnly, bool &isVariable, RELATIVE_VAR &relativeVar, bool isWriteAccess ) 354 354 { 355 extern void GetWithName(std::string&);356 357 355 char parameter[VN_SIZE]; 356 358 357 // Withを解決 359 std::string termFull;358 char termFull[VN_SIZE]; 360 359 if(term[0]=='.'){ 361 360 GetWithName(termFull); 362 termFull.insert(termFull.end(),term,term+strlen(term));363 } 364 else termFull.assign(term,term+strlen(term));365 366 std::vector<char> termLeft(termFull.begin(), termFull.end());367 termLeft.push_back('\0');361 lstrcat(termFull,term); 362 } 363 else lstrcpy(termFull,term); 364 365 char termLeft[VN_SIZE]; 366 lstrcpy(termLeft,termFull); 368 367 369 368 // パース 370 369 char member[VN_SIZE]; 371 370 ReferenceKind refType; 372 if( SplitMemberName( termFull .c_str(), &termLeft[0], member, refType ) ){371 if( SplitMemberName( termFull, termLeft, member, refType ) ){ 373 372 /////////////////////////////////////////////////////////////////// 374 373 // オブジェクトとメンバに分解できるとき … … 381 380 bool isClassName = false; 382 381 Type leftType; 383 if( GetTermType( &termLeft[0], Type(), leftType, isLiteral, &isClassName ) ){382 if( GetTermType( termLeft, Type(), leftType, isLiteral, &isClassName ) ){ 384 383 if( isClassName == false && compiler.GetObjectModule().meta.GetBlittableTypes().IsExist( leftType ) ){ 385 384 // 左側のオブジェクト部分がBlittable型のとき 386 /* 385 387 386 char temporary[VN_SIZE]; 388 387 lstrcpy( temporary, termLeft ); … … 390 389 compiler.GetObjectModule().meta.GetBlittableTypes().Find( leftType ).GetCreateStaticMethodFullName().c_str(), 391 390 temporary ); 392 */ 393 std::vector<char> temporary; 394 const std::string& staticMethodFullName = compiler.GetObjectModule().meta.GetBlittableTypes().Find( leftType ).GetCreateStaticMethodFullName(); 395 temporary.reserve(VN_SIZE); 396 temporary.assign(staticMethodFullName.begin(), staticMethodFullName.end()); 397 temporary.push_back('('); 398 temporary.insert(temporary.end(), termLeft.begin(), termLeft.end()); 399 temporary.push_back(')'); 400 temporary.swap(termLeft); 401 } 402 } 403 404 if( !TermOpe( &termLeft[0], baseType, leftType, isLiteral, isNeedHeapFreeStructure, &isClassName ) ){ 391 } 392 } 393 394 if( !TermOpe( termLeft, baseType, leftType, isLiteral, isNeedHeapFreeStructure, &isClassName ) ){ 405 395 goto globalArea; 406 396 } … … 420 410 } 421 411 422 return TermMemberOpe( leftType, isNeedHeapFreeStructure, baseType, resultType, termFull .c_str(), &termLeft[0], member, isVariable, relativeVar );412 return TermMemberOpe( leftType, isNeedHeapFreeStructure, baseType, resultType, termFull, termLeft, member, isVariable, relativeVar ); 423 413 } 424 414 globalArea: … … 430 420 431 421 if( pIsClassName ){ 432 if( compiler.GetObjectModule().meta.FindClassSupportedTypeDef( LexicalAnalyzer::FullNameToSymbol( termFull .c_str()) ) ){422 if( compiler.GetObjectModule().meta.FindClassSupportedTypeDef( LexicalAnalyzer::FullNameToSymbol( termFull ) ) ){ 433 423 *pIsClassName = true; 434 424 return true; … … 444 434 445 435 446 if(lstrcmpi(termFull .c_str(),"This")==0 && isProcedureCallOnly == false ){436 if(lstrcmpi(termFull,"This")==0 && isProcedureCallOnly == false ){ 447 437 if( !compiler.IsCompilingClass() ) 448 438 { … … 468 458 char temporary[8192]; 469 459 470 int i2=GetCallProcName(termFull .c_str(),procName);460 int i2=GetCallProcName(termFull,procName); 471 461 if(termFull[i2]=='('){ 472 int i4=GetStringInPare_RemovePare(parameter,termFull .c_str()+i2+1);462 int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1); 473 463 474 464 void *pInfo; … … 567 557 568 558 char VarName[VN_SIZE],ArrayElements[VN_SIZE]; 569 GetArrayElement(termFull .c_str(),VarName,ArrayElements);559 GetArrayElement(termFull,VarName,ArrayElements); 570 560 if(ArrayElements[0]){ 571 561 Type classType; … … 589 579 false, //エラー表示なし 590 580 isWriteAccess, 591 termFull .c_str(),581 termFull, 592 582 &relativeVar,resultType)){ 593 583 ////////// … … 609 599 610 600 //配列要素を排除 611 GetArrayElement(termFull .c_str(),VarName,ArrayElements);601 GetArrayElement(termFull,VarName,ArrayElements); 612 602 613 603 if(GetSubHash(VarName,0)){ 614 604 615 605 { 616 CallPropertyMethod(termFull .c_str(),NULL,resultType);606 CallPropertyMethod(termFull,NULL,resultType); 617 607 618 608 //大きな型への暗黙の変換 … … 646 636 if( isProcedureCallOnly ) 647 637 { 648 compiler.errorMessenger.Output(3, termFull .c_str(), cp );638 compiler.errorMessenger.Output(3, termFull, cp ); 649 639 } 650 640
Note:
See TracChangeset
for help on using the changeset viewer.