Changeset 120 in dev for BasicCompiler_Common
- Timestamp:
- May 13, 2007, 8:50:04 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Class.cpp
r117 r120 1089 1089 1090 1090 if( method->pUserProc->GetName() == temporary ){ 1091 if( Parameter::Equals( method->pUserProc->Params(),pUserProc->Params() ) ){1091 if( method->pUserProc->Params().Equals( pUserProc->Params() ) ){ 1092 1092 //関数名、パラメータ属性が合致したとき 1093 1093 SetError(15,pUserProc->GetName().c_str(),nowLine); … … 1103 1103 foreach( CMethod *method, pobj_c->methods ){ 1104 1104 if( method->pUserProc->GetName() == temporary ){ 1105 if( Parameter::Equals( method->pUserProc->Params(),pUserProc->Params() ) ){1105 if( method->pUserProc->Params().Equals( pUserProc->Params() ) ){ 1106 1106 1107 1107 if(method->bVirtual){ -
BasicCompiler_Common/Parameter.h
r78 r120 2 2 3 3 #include "Type.h" 4 5 class Parameter;6 typedef vector<Parameter *> Parameters;7 4 8 5 class Parameter : public Type … … 88 85 return false; 89 86 } 87 }; 90 88 89 class Parameters : public vector<Parameter *> 90 { 91 public: 91 92 92 static bool Equals( const Parameters ¶msA, const Parameters paramsB ){ 93 if( paramsA.size() != paramsB.size() ){ 93 bool Equals( const Parameters ¶ms ) const 94 { 95 if( this->size() != params.size() ){ 94 96 return false; 95 97 } 96 98 97 int max = (int) paramsA.size();99 int max = (int)this->size(); 98 100 for( int i=0; i<max; i++ ){ 99 if( ! paramsA[i]->Equals( *paramsB[i] ) ){101 if( !(*this)[i]->Equals( *params[i] ) ){ 100 102 return false; 101 103 } … … 104 106 return true; 105 107 } 108 109 int GetMemorySize() const 110 { 111 return (int)this->size() * PTR_SIZE; 112 } 106 113 }; -
BasicCompiler_Common/Subroutine.cpp
r113 r120 622 622 //重複エラーチェックを行う 623 623 if( pUserProc->IsEqualSymbol( *psi2 ) ){ 624 if( Parameter::Equals( psi2->Params(),pUserProc->Params() ) ){624 if( psi2->Params().Equals( pUserProc->Params() ) ){ 625 625 SetError(15,pUserProc->GetName().c_str(),nowLine); 626 626 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.