Changeset 275 in dev
- Timestamp:
- Aug 11, 2007, 4:23:18 PM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r272 r275 311 311 Parameter ¶m = *pUserProc->RealParams()[i3]; 312 312 313 Variable *pVar = new Variable( param.GetVarName(), param, false, param.IsRef(), "" );313 Variable *pVar = new Variable( param.GetVarName(), param, false, param.IsRef(), "", false ); 314 314 315 315 if( param.IsArray() ){ -
trunk/abdev/BasicCompiler32/Compile_Var.cpp
r273 r275 1060 1060 bool isConst = ( dwFlags & DIMFLAG_CONST ) ? true:false; 1061 1061 1062 Variable *pVar = new Variable( VarName, type, isConst, false, ConstractParameter );1062 Variable *pVar = new Variable( VarName, type, isConst, false, ConstractParameter, false ); 1063 1063 1064 1064 if( subscripts.size() > 0 ){ -
trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
r273 r275 979 979 bool isConst = ( dwFlag & DIMFLAG_CONST ) ? true:false; 980 980 981 Variable *pVar = new Variable( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes(), name, type, isConst, false, ConstractParameter ); 981 Variable *pVar = new Variable( 982 compiler.GetNamespaceSupporter().GetLivingNamespaceScopes(), 983 name, 984 type, 985 isConst, 986 false, 987 ConstractParameter, 988 ( InitBuf[0] != 0 || dwFlag == DIMFLAG_INITDEBUGVAR ) 989 ); 982 990 983 991 if( subscripts.size() > 0 ){ … … 995 1003 996 1004 // 変数を追加 997 compiler.GetObjectModule().meta.GetGlobalVars().Add( 998 pVar, 999 ( InitBuf[0] != 0 || dwFlag == DIMFLAG_INITDEBUGVAR ) 1000 ); 1005 compiler.GetObjectModule().meta.GetGlobalVars().Add( pVar ); 1001 1006 1002 1007 if(InitBuf[0]){ -
trunk/abdev/BasicCompiler_Common/include/Variable.h
r273 r275 15 15 16 16 bool isParameter; 17 bool hasInitData; 17 18 18 19 //コンストラクタ用パラメータ … … 47 48 ar & BOOST_SERIALIZATION_NVP( subscripts ); 48 49 ar & BOOST_SERIALIZATION_NVP( isParameter ); 50 ar & BOOST_SERIALIZATION_NVP( hasInitData ); 49 51 ar & BOOST_SERIALIZATION_NVP( paramStrForConstructor ); 50 52 ar & BOOST_SERIALIZATION_NVP( offset ); … … 55 57 56 58 public: 57 Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor )59 Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ) 58 60 : Symbol( name ) 59 61 , type( type ) … … 63 65 , isParameter( false) 64 66 , paramStrForConstructor( paramStrForConstructor ) 65 { 66 } 67 Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor ) 67 , hasInitData( hasInitData ) 68 { 69 } 70 Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ) 68 71 : Symbol( namespaceScopes, name ) 69 72 , type( type ) … … 73 76 , isParameter( false) 74 77 , paramStrForConstructor( paramStrForConstructor ) 78 , hasInitData( hasInitData ) 75 79 { 76 80 } … … 84 88 , isParameter( false ) 85 89 , paramStrForConstructor( var.paramStrForConstructor ) 90 , hasInitData( var.hasInitData ) 86 91 { 87 92 } … … 131 136 { 132 137 return isParameter; 138 } 139 bool HasInitData() const 140 { 141 return hasInitData; 133 142 } 134 143 … … 245 254 const Variable *Find( const Symbol &symbol )const; 246 255 247 void Add( Variable *pVar , bool isInitArea);256 void Add( Variable *pVar ); 248 257 249 258 int GetAllSize() const -
trunk/abdev/BasicCompiler_Common/src/Meta.cpp
r273 r275 84 84 { 85 85 pVar->isTargetObjectModule = false; 86 this->globalVars. push_back( pVar );86 this->globalVars.Add( pVar ); 87 87 } 88 88 meta.globalVars.PullOutAll(); -
trunk/abdev/BasicCompiler_Common/src/Variable.cpp
r273 r275 74 74 } 75 75 76 void Variables::Add( Variable *pVar , bool isInitArea)76 void Variables::Add( Variable *pVar ) 77 77 { 78 78 int alignment = 0; … … 81 81 } 82 82 83 if( isInitArea){83 if( pVar->HasInitData() ){ 84 84 //初期バッファがあるとき 85 85
Note:
See TracChangeset
for help on using the changeset viewer.