Changeset 632 in dev
- Timestamp:
- Jun 5, 2008, 10:04:39 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 5 added
- 1 deleted
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/Compile.cpp
r587 r632 758 758 } 759 759 760 ChangeOpcode(Command); 760 if( Command[0] ) 761 { 762 ChangeOpcode(Command); 763 } 761 764 762 765 -
trunk/ab5.0/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
r600 r632 829 829 isNothing_stack[sp] = true; 830 830 831 type_stack[sp] = DEF_OBJECT;832 831 if( baseType.IsObject() ){ 832 type_stack[sp] = DEF_OBJECT; 833 833 index_stack[sp] = baseType.GetIndex(); 834 834 } 835 835 else{ 836 index_stack[sp] = (LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetObjectClassPtr(); 836 type_stack[sp] = baseType.GetBasicType(); 837 index_stack[sp] = baseType.GetIndex(); 837 838 } 839 838 840 *pIsLiteralCalculation = false; 839 841 sp++; -
trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp
r603 r632 365 365 lstrcpy(name,"End Enum"); 366 366 break; 367 case ESC_OPERATOR: 368 lstrcpy( name, "Operator" ); 369 break; 367 370 } 368 371 } … … 378 381 if( temporary[i] == 1 ) 379 382 { 383 int esc = temporary[i+1]; 380 384 char temp2[255]; 381 GetDefaultNameFromES( temporary[i+1], temp2 );385 GetDefaultNameFromES( esc, temp2 ); 382 386 if( i>0 ) 383 387 { … … 391 395 } 392 396 397 int slide = 2; 398 399 if( esc == ESC_OPERATOR ) 400 { 401 extern char *calcNames[256]; 402 char calcId = temporary[i+2]; 403 if( calcNames[calcId] ) 404 { 405 lstrcat( temp2, calcNames[calcId] ); 406 } 407 slide = 3; 408 } 409 393 410 int length = lstrlen( temp2 ); 394 SlideString( temporary + i+ 2, length-2);411 SlideString( temporary + i+slide, length-slide ); 395 412 memcpy( temporary + i, temp2, length ); 396 413 maxLength = lstrlen( temporary ); -
trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp
r628 r632 633 633 } 634 634 635 int typeDefIndex = compiler.GetObjectModule().meta.GetTypeDefs().GetIndex( LexicalAnalyzer::FullNameToSymbol( VarName ) ); 636 if( typeDefIndex != -1 ){ 635 const TypeDef *pTypeDef = compiler.GetObjectModule().meta.GetTypeDefs().Find( LexicalAnalyzer::FullNameToSymbol( VarName ) ); 636 if( pTypeDef ) 637 { 637 638 // TypeDef後の型名だったとき 638 lstrcpy( VarName, compiler.GetObjectModule().meta.GetTypeDefs()[typeDefIndex].GetBaseName().c_str() );639 lstrcpy( VarName, pTypeDef->GetBaseName().c_str() ); 639 640 } 640 641 -
trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h
r628 r632 184 184 185 185 186 private: 187 ActiveBasic::Compiler::Error::StringToTypeErrorCode::EnumType StringToGenericTypeEx( const std::string &typeName, Type &type ); 188 public: 186 189 ActiveBasic::Compiler::Error::StringToTypeErrorCode::EnumType StringToTypeEx( const std::string &typeName, Type &type, bool isResolveGenerics = false ); 187 190 bool StringToType( const std::string &typeName, Type &type ); -
trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h
r625 r632 43 43 static void CollectClasses( const char *source, Classes &classes ); 44 44 45 // テンプレート展開 46 static void TemplateExpand_ResolveMethod( const CMethod *pBaseMethod, const Types &actualTypes, CClass *pNewClass ); 47 static const CClass *TemplateExpand( CClass &_class, const Types &actualTypes ); 48 45 49 // グローバルプロシージャを収集する 46 50 static bool AnalyzeParameter( Parameters ¶ms, const Jenga::Common::Strings ¶meterStrings, int nowLine ); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r628 r632 14 14 } 15 15 16 ActiveBasic::Compiler::Error::StringToTypeErrorCode::EnumType Compiler::StringToTypeEx( const std::string &typeName, Type &type, bool isResolveGenerics ) 17 { 18 type.SetIndex( -1 ); 19 20 21 ///////////////////////////////////////////////////////// 22 // ☆★☆ ジェネリクスサポート ☆★☆ 23 24 if( strstr( typeName.c_str(), "<" ) ) 25 { 26 // ジェネリッククラスをインスタンス化した型の場合 27 int i = 0; 28 char className[VN_SIZE]; 29 GetIdentifierToken( className, typeName.c_str(), i ); 30 31 // ジェネリクスクラスを取得 32 const CClass *pGenericClass = this->GetObjectModule().meta.FindClassSupportedTypeDef( 33 LexicalAnalyzer::FullNameToSymbol( className ) 34 ); 35 36 if( !pGenericClass ) 37 { 38 return ActiveBasic::Compiler::Error::StringToTypeErrorCode::NotfoundGenericClass; 39 } 40 41 if( typeName[i] != '<' ) 42 { 43 Jenga::Throw( "StringToType内でジェネリクス構文の解析に失敗" ); 44 } 45 46 GenericTypes genericTypes; 47 while( true ) 48 { 49 i++; 50 51 char typeParameter[VN_SIZE]; 52 GetIdentifierToken( typeParameter, typeName.c_str(), i ); 53 54 // 型パラメータの型情報を取得 55 Type baseType; 56 StringToType( typeParameter, baseType ); 57 58 genericTypes.push_back( GenericType( "(non support)", baseType ) ); 59 60 if( typeName[i] != ',' ) 61 { 62 break; 63 } 64 } 65 66 // 基本型をセット 67 type.SetBasicType( DEF_OBJECT ); 16 ActiveBasic::Compiler::Error::StringToTypeErrorCode::EnumType Compiler::StringToGenericTypeEx( const std::string &typeName, Type &type ) 17 { 18 // ジェネリッククラスをインスタンス化した型の場合 19 int i = 0; 20 char className[VN_SIZE]; 21 GetIdentifierToken( className, typeName.c_str(), i ); 22 23 // ジェネリクスクラスを取得 24 const CClass *pGenericClass = this->GetObjectModule().meta.FindClassSupportedTypeDef( 25 LexicalAnalyzer::FullNameToSymbol( className ) 26 ); 27 28 if( !pGenericClass ) 29 { 30 return ActiveBasic::Compiler::Error::StringToTypeErrorCode::NotfoundGenericClass; 31 } 32 33 if( typeName[i] != '<' ) 34 { 35 Jenga::Throw( "StringToType内でジェネリクス構文の解析に失敗" ); 36 } 37 38 GenericTypes genericTypes; 39 bool isValueType = false; 40 while( true ) 41 { 42 i++; 43 44 char typeParameterStr[VN_SIZE]; 45 GetIdentifierToken( typeParameterStr, typeName.c_str(), i ); 46 47 // 型パラメータの型情報を取得 48 Type typeParameterType; 49 StringToType( typeParameterStr, typeParameterType ); 50 51 genericTypes.push_back( GenericType( "(non support)", typeParameterType ) ); 52 53 if( typeParameterType.IsValueType() ) 54 { 55 // 値型の場合 56 isValueType = true; 57 } 58 59 if( typeName[i] != ',' ) 60 { 61 break; 62 } 63 } 64 65 // 基本型をセット 66 type.SetBasicType( DEF_OBJECT ); 67 68 if( isValueType ) 69 { 70 // 型パラメータに値型が指定された場合 71 72 // 仮型パラメータを実型パラメータに変換 73 Types actualTypes; 74 BOOST_FOREACH( const GenericType &genericType, genericTypes ) 75 { 76 actualTypes.push_back( genericType.GetType() ); 77 } 78 79 // テンプレートとしてクラスを展開する 80 const CClass *pExpandedClass = LexicalAnalyzer::TemplateExpand( *const_cast<CClass *>(pGenericClass), actualTypes ); 81 82 if( pExpandedClass ) 83 { 84 // 拡張情報をセット 85 type.SetClassPtr( pExpandedClass ); 86 } 87 else 88 { 89 // TODO: 消す 90 goto Generic; 91 } 92 } 93 else 94 { 95 Generic: 96 // 型パラメータにクラス型が指定された場合 97 98 // ジェネリック クラスとして利用する 68 99 69 100 // 拡張情報をセット 70 101 type.SetClassPtr( pGenericClass ); 71 102 type.SetActualGenericTypes( genericTypes ); 72 73 return ActiveBasic::Compiler::Error::StringToTypeErrorCode::Successful; 103 } 104 105 return ActiveBasic::Compiler::Error::StringToTypeErrorCode::Successful; 106 } 107 ActiveBasic::Compiler::Error::StringToTypeErrorCode::EnumType Compiler::StringToTypeEx( const std::string &typeName, Type &type, bool isResolveGenerics ) 108 { 109 type.SetIndex( -1 ); 110 111 112 ///////////////////////////////////////////////////////// 113 // ☆★☆ ジェネリクスサポート ☆★☆ 114 115 if( strstr( typeName.c_str(), "<" ) ) 116 { 117 return StringToGenericTypeEx( typeName, type ); 74 118 } 75 119 … … 147 191 // TypeDefされた型 148 192 //////////////////// 149 int i=this->GetObjectModule().meta.GetTypeDefs().GetIndex( LexicalAnalyzer::FullNameToSymbol( typeName ) ); 150 if(i!=-1) 151 { 152 type = this->GetObjectModule().meta.GetTypeDefs()[i].GetBaseType(); 193 const TypeDef *pTypeDef = this->GetObjectModule().meta.GetTypeDefs().Find( LexicalAnalyzer::FullNameToSymbol( typeName ) ); 194 if( pTypeDef ) 195 { 196 type = pTypeDef->GetBaseType(); 197 198 if( type.IsObject() ) 199 { 200 if( isResolveGenerics && !type.HasActualGenericType() ) 201 { 202 // ジェネリッククラスの場合 203 trace( "型解決されていない" ); 204 return ActiveBasic::Compiler::Error::StringToTypeErrorCode::FailedResolveGenericType; 205 } 206 } 207 153 208 return ActiveBasic::Compiler::Error::StringToTypeErrorCode::Successful; 154 209 } 155 210 156 211 //クラス 157 const CClass *pobj_c = this->GetObjectModule().meta. GetClasses().FindEx( LexicalAnalyzer::FullNameToSymbol( typeName ) );212 const CClass *pobj_c = this->GetObjectModule().meta.FindClassSupportedTypeDef( LexicalAnalyzer::FullNameToSymbol( typeName ) ); 158 213 if(pobj_c) 159 214 { -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
r603 r632 287 287 Subscripts subscripts; 288 288 Type type; 289 GetDimentionFormat(buffer,VarName,subscripts,type,initBuffer,lpszConstructParameter); 289 if( !GetDimentionFormat(buffer,VarName,subscripts,type,initBuffer,lpszConstructParameter) ) 290 { 291 return NULL; 292 } 290 293 291 294 //重複チェック … … 1217 1220 extern int cp; 1218 1221 if(i3==0){ 1219 if(bStatic){ 1220 //静的メンバを追加 1221 cp=i; //エラー用 1222 pobj_c->AddStaticMember( 1223 LexicalAnalyzer::CreateMember( *pobj_c, accessibility, isConst, false, temporary, i ) 1224 ); 1225 } 1226 else{ 1227 //メンバを追加 1228 cp=i; //エラー用 1229 pobj_c->AddDynamicMember( 1230 LexicalAnalyzer::CreateMember( *pobj_c, accessibility, isConst, false, temporary, i ) 1231 ); 1232 1233 1234 if(pobj_c->GetDynamicMembers().back()->GetType().IsStruct()){ 1235 if( !pobj_c->GetDynamicMembers().back()->GetType().GetClass().IsReady() ){ 1236 //参照先が読み取られていないとき 1237 GetClass_recur( pobj_c->GetDynamicMembers().back()->GetType().GetClass().GetName().c_str(), classes ); 1222 cp=i; //エラー用 1223 Member *pMember = LexicalAnalyzer::CreateMember( *pobj_c, accessibility, isConst, false, temporary, i ); 1224 if( pMember ) 1225 { 1226 if(bStatic) 1227 { 1228 //静的メンバを追加 1229 pobj_c->AddStaticMember( pMember ); 1230 } 1231 else 1232 { 1233 //メンバを追加 1234 pobj_c->AddDynamicMember( pMember ); 1235 1236 1237 if(pobj_c->GetDynamicMembers().back()->GetType().IsStruct()){ 1238 if( !pobj_c->GetDynamicMembers().back()->GetType().GetClass().IsReady() ){ 1239 //参照先が読み取られていないとき 1240 GetClass_recur( pobj_c->GetDynamicMembers().back()->GetType().GetClass().GetName().c_str(), classes ); 1241 } 1238 1242 } 1239 } 1240 1241 1242 if(pobj_c->GetDynamicMembers().back()->GetType().IsStruct()){ 1243 //循環参照のチェック 1244 pobj_LoopRefCheck->add(pobj_c->GetName().c_str()); 1245 if(!MemberVar_LoopRefCheck(pobj_c->GetDynamicMembers().back()->GetType().GetClass())){ 1246 //エラー回避 1247 Type &type = const_cast<Type &>(pobj_c->GetDynamicMembers().back()->GetType()); 1248 type.SetBasicType( DEF_PTR_VOID ); 1243 1244 1245 if(pobj_c->GetDynamicMembers().back()->GetType().IsStruct()){ 1246 //循環参照のチェック 1247 pobj_LoopRefCheck->add(pobj_c->GetName().c_str()); 1248 if(!MemberVar_LoopRefCheck(pobj_c->GetDynamicMembers().back()->GetType().GetClass())){ 1249 //エラー回避 1250 Type &type = const_cast<Type &>(pobj_c->GetDynamicMembers().back()->GetType()); 1251 type.SetBasicType( DEF_PTR_VOID ); 1252 } 1253 pobj_LoopRefCheck->del(pobj_c->GetName().c_str()); 1249 1254 } 1250 pobj_LoopRefCheck->del(pobj_c->GetName().c_str());1251 1255 } 1252 1256 } … … 1355 1359 classes.Iterator_Init(); 1356 1360 } 1361 1362 void LexicalAnalyzer::TemplateExpand_ResolveMethod( const CMethod *pBaseMethod, const Types &actualTypes, CClass *pNewClass ) 1363 { 1364 UserProc *pUserProc = new UserProc( 1365 pBaseMethod->GetUserProc(), 1366 pNewClass 1367 ); 1368 pUserProc->Using(); 1369 pUserProc->GetParameters().clear(); 1370 pUserProc->RealParams().clear(); 1371 1372 // パラメータのジェネリック型を解決 1373 BOOST_FOREACH( const Parameter *pParam, pBaseMethod->GetUserProc().Params() ) 1374 { 1375 Type type = pParam->IsTypeParameter() 1376 ? actualTypes[pParam->GetFormalTypeIndex()] 1377 : *pParam; 1378 type.SetPtrLevel( pParam->PtrLevel() ); 1379 1380 pUserProc->GetParameters().push_back( new Parameter( *pParam, type ) ); 1381 } 1382 BOOST_FOREACH( const Parameter *pParam, pBaseMethod->GetUserProc().RealParams() ) 1383 { 1384 Type type = pParam->IsTypeParameter() 1385 ? actualTypes[pParam->GetFormalTypeIndex()] 1386 : *pParam; 1387 type.SetPtrLevel( pParam->PtrLevel() ); 1388 1389 pUserProc->RealParams().push_back( new Parameter( *pParam, type ) ); 1390 } 1391 1392 // 戻り値のジェネリック型を解決 1393 if( pUserProc->ReturnType().IsTypeParameter() ) 1394 { 1395 Type type = actualTypes[pUserProc->ReturnType().GetFormalTypeIndex()]; 1396 type.SetPtrLevel( pUserProc->ReturnType().PtrLevel() ); 1397 pUserProc->SetReturnType( type ); 1398 } 1399 1400 compiler.GetObjectModule().meta.GetUserProcs().Put( pUserProc ); 1401 compiler.GetObjectModule().meta.GetUserProcs().Iterator_Init(); 1402 1403 LexicalAnalyzer::AddMethod( 1404 pNewClass, 1405 pUserProc, 1406 pBaseMethod->GetAccessibility(), 1407 pBaseMethod->IsStatic(), 1408 pBaseMethod->IsConst(), 1409 pBaseMethod->IsAbstract(), 1410 pBaseMethod->IsVirtual(), 1411 false, 1412 "", 1413 false, 1414 -1 1415 ); 1416 } 1417 1418 const CClass *LexicalAnalyzer::TemplateExpand( CClass &_class, const Types &actualTypes ) 1419 { 1420 // 展開済みのクラスがあればそれを返す 1421 BOOST_FOREACH( const ExpandedTemplateClass *pExpandedTemplateClass, _class.expandedTemplateClasses ) 1422 { 1423 if( pExpandedTemplateClass->GetActualTypes().IsEquals( actualTypes ) ) 1424 { 1425 return &pExpandedTemplateClass->GetClass(); 1426 } 1427 } 1428 1429 1430 ///////////////////////////////////////////////////////////////// 1431 // 未展開の場合は新たに展開する 1432 ///////////////////////////////////////////////////////////////// 1433 1434 // クラスをコピー 1435 CClass *pNewClass = new CClass( 1436 _class.GetNamespaceScopes(), 1437 _class.GetImportedNamespaces(), 1438 _class.GetName(), 1439 _class.GetClassType(), 1440 _class.GetFormalGenericTypes(), 1441 actualTypes, 1442 _class.GetConstructorMemberSubIndex(), 1443 _class.GetDestructorMemberSubIndex(), 1444 0, 1445 _class.GetFixedAlignment() 1446 ); 1447 1448 // 基底クラス 1449 pNewClass->SetSuperClass( &_class.GetSuperClass() ); 1450 1451 // インターフェイスのジェネリック型を解決 1452 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() ) 1453 { 1454 pNewClass->AddInterface( new ::Interface( &pInterface->GetClass(), actualTypes ) ); 1455 } 1456 1457 // メンバのジェネリック型を解決 1458 BOOST_FOREACH( const Member *pMember, _class.GetDynamicMembers() ) 1459 { 1460 Type type = pMember->GetType(); 1461 if( type.IsTypeParameter() ) 1462 { 1463 // ジェネリック型だったときは値型に変換 1464 type = actualTypes[type.GetFormalTypeIndex()]; 1465 type.SetPtrLevel( pMember->GetType().PtrLevel() ); 1466 } 1467 1468 pNewClass->GetDynamicMembers().push_back( 1469 new Member( *pMember, type ) 1470 ); 1471 } 1472 1473 // クラス メソッドのジェネリック型を解決 1474 BOOST_FOREACH( const CMethod *pMethod, _class.GetDynamicMethods() ) 1475 { 1476 if( pMethod->GetUserProc().GetParentClassPtr() == &_class ) 1477 { 1478 // ターゲットクラス内で実装されるメソッドの場合 1479 1480 TemplateExpand_ResolveMethod( pMethod, actualTypes, pNewClass ); 1481 } 1482 else 1483 { 1484 DynamicMethod *pNewDynamicMethod = new DynamicMethod( *pMethod ); 1485 pNewClass->GetDynamicMethods().push_back( pNewDynamicMethod ); 1486 } 1487 } 1488 1489 // インターフェイス メソッドのジェネリック型を解決 1490 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() ) 1491 { 1492 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ) 1493 { 1494 TemplateExpand_ResolveMethod( pMethod, actualTypes, pNewClass ); 1495 } 1496 } 1497 1498 pNewClass->SetVtblNum( _class.GetVtblNum() ); 1499 1500 // 展開済みクラスとして登録 1501 _class.expandedTemplateClasses.push_back( new ExpandedTemplateClass( pNewClass, actualTypes ) ); 1502 1503 pNewClass->Readed(); 1504 1505 return pNewClass; 1506 } -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Procedure.cpp
r574 r632 156 156 157 157 //ソースコードの位置 158 userProc.Set CodePos( nowLine);158 userProc.SetSourceCodePosition( SourceCodePosition( compiler.GetObjectModule().GetName(), nowLine ) ); 159 159 160 160 //パラメータ … … 286 286 287 287 //ソースコードの位置 288 pProc->Set CodePos( nowLine);288 pProc->SetSourceCodePosition( SourceCodePosition( compiler.GetObjectModule().GetName(), nowLine ) ); 289 289 290 290 //パラメータ -
trunk/ab5.0/abdev/BasicCompiler_Common/src/VtblGenerator.cpp
r593 r632 96 96 while( classes.Iterator_HasNext() ) 97 97 { 98 GenerateFullVTables( *classes.Iterator_GetNext() ); 98 CClass *pClass = classes.Iterator_GetNext(); 99 GenerateFullVTables( *pClass ); 100 101 // テンプレート展開されたクラスも 102 BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, pClass->expandedTemplateClasses ) 103 { 104 if( !pExpandedTemplateClass->GetClass().expandedTemplateClasses.empty() ) 105 { 106 // テンプレート展開後のクラスが更にテンプレート展開されていることはありえない 107 throw; 108 } 109 110 GenerateFullVTables( pExpandedTemplateClass->GetClass() ); 111 } 99 112 } 100 113 } … … 167 180 while( classes.Iterator_HasNext() ) 168 181 { 169 ActionVtblSchedule( *classes.Iterator_GetNext(), ImageBase, MemPos_CodeSection, MemPos_DataSection ); 182 CClass *pClass = classes.Iterator_GetNext(); 183 ActionVtblSchedule( *pClass, ImageBase, MemPos_CodeSection, MemPos_DataSection ); 184 185 // テンプレート展開されたクラスも 186 BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, pClass->expandedTemplateClasses ) 187 { 188 if( !pExpandedTemplateClass->GetClass().expandedTemplateClasses.empty() ) 189 { 190 // テンプレート展開後のクラスが更にテンプレート展開されていることはありえない 191 throw; 192 } 193 194 ActionVtblSchedule( pExpandedTemplateClass->GetClass(), ImageBase, MemPos_CodeSection, MemPos_DataSection ); 195 } 170 196 } 171 197 } -
trunk/ab5.0/abdev/ab_common/ab_common.vcproj
r622 r632 340 340 <File 341 341 RelativePath=".\src\Lexical\Interface.cpp" 342 > 343 </File> 344 <File 345 RelativePath=".\src\Lexical\Member.cpp" 342 346 > 343 347 </File> … … 416 420 </File> 417 421 <File 422 RelativePath=".\src\Lexical\Template.cpp" 423 > 424 </File> 425 <File 418 426 RelativePath=".\src\Lexical\Type.cpp" 419 427 > … … 530 538 </File> 531 539 <File 540 RelativePath=".\include\Lexical\Template.h" 541 > 542 </File> 543 <File 532 544 RelativePath=".\include\Lexical\Type.h" 533 545 > -
trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h
r603 r632 2 2 3 3 class UserProc; 4 class UserProcs; 4 5 class Delegate; 6 class Classes; 5 7 6 8 class ClassPrototype : public Prototype, public DynamicMethodsPrototype … … 78 80 //アラインメント値 79 81 int fixedAlignment; 82 83 public: 84 ActiveBasic::Common::Lexical::ExpandedTemplateClasses expandedTemplateClasses; 80 85 81 86 // XMLシリアライズ用 … … 101 106 ar & BOOST_SERIALIZATION_NVP( staticMethods ); 102 107 ar & BOOST_SERIALIZATION_NVP( fixedAlignment ); 108 ar & BOOST_SERIALIZATION_NVP( expandedTemplateClasses ); 103 109 } 104 110 … … 106 112 public: 107 113 108 CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name ) 109 : ClassPrototype( namespaceScopes, name ) 110 , importedNamespaces( importedNamespaces ) 111 , classType( Class ) 112 , pSuperClass( NULL ) 113 , blittableType( Type() ) 114 , isReady( false ) 115 , fixedAlignment( 0 ) 116 , ConstructorMemberSubIndex( -1 ) 117 , DestructorMemberSubIndex( -1 ) 118 , vtblNum( 0 ) 119 , vtbl_offset( -1 ) 120 , comVtblOffset( 0 ) 121 , isCompilingConstructor( false ) 122 , isCompilingDestructor( false ) 123 , cacheSize( 0 ) 124 { 125 } 126 CClass() 127 : ClassPrototype() 128 , importedNamespaces() 129 , classType() 130 , pSuperClass( NULL ) 131 , blittableType( Type() ) 132 , isReady( false ) 133 , fixedAlignment( 0 ) 134 , ConstructorMemberSubIndex( -1 ) 135 , DestructorMemberSubIndex( -1 ) 136 , vtblNum( 0 ) 137 , vtbl_offset( -1 ) 138 , comVtblOffset( 0 ) 139 , isCompilingConstructor( false ) 140 , isCompilingDestructor( false ) 141 , cacheSize( 0 ) 142 { 143 } 144 ~CClass() 145 { 146 // 動的メンバ 147 BOOST_FOREACH( Member *member, dynamicMembers ) 148 { 149 delete member; 150 } 151 152 // 静的メンバ 153 BOOST_FOREACH( Member *member, staticMembers ) 154 { 155 delete member; 156 } 157 158 // インターフェイス 159 BOOST_FOREACH( ::Interface *pInterface, interfaces ) 160 { 161 delete pInterface; 162 } 163 } 114 CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name ); 115 CClass( const NamespaceScopes &namespaceScopes, 116 const NamespaceScopesCollection &importedNamespaces, 117 const std::string &name, ClassType classType, 118 const GenericTypes &formalGenericTypes, 119 const Types &superClassActualTypeParameters, 120 int ConstructorMemberSubIndex, 121 int DestructorMemberSubIndex, 122 int vtblNum, 123 int fixedAlignment ); 124 CClass(); 125 ~CClass(); 164 126 165 127 virtual const std::string &GetKeyName() const … … 273 235 this->classType = classType; 274 236 } 237 ClassType GetClassType() const 238 { 239 return classType; 240 } 275 241 276 242 … … 314 280 return interfaces; 315 281 } 282 Interfaces &GetInterfaces() 283 { 284 return interfaces; 285 } 316 286 bool IsInheritsInterface( const CClass *pInterfaceClass ) const; 317 287 … … 372 342 this->ConstructorMemberSubIndex = constructorMemberSubIndex; 373 343 } 344 int GetConstructorMemberSubIndex() const 345 { 346 return ConstructorMemberSubIndex; 347 } 374 348 375 349 //デストラクタ メソッドを取得 … … 382 356 { 383 357 this->DestructorMemberSubIndex = destructorMemberSubIndex; 358 } 359 int GetDestructorMemberSubIndex() const 360 { 361 return DestructorMemberSubIndex; 384 362 } 385 363 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h
r603 r632 33 33 34 34 int source_code_address; 35 36 Member( Prototype::Accessibility accessibility, const std::string &name, const Type &newType, bool isConst, const Subscripts &subscripts, const std::string &initializeExpression, const std::string &constructParameter ); 37 Member( const Member &member, const Type &actualType ); 38 Member( const Member &member ); 39 Member(); 40 ~Member(); 35 41 36 42 const std::string &GetName() const … … 70 76 return constructParameter; 71 77 } 72 73 Member( Prototype::Accessibility accessibility, const std::string &name, const Type &newType, bool isConst, const Subscripts &subscripts, const std::string &initializeExpression, const std::string &constructParameter )74 : MemberPrototype( accessibility )75 , name( name )76 , type( newType )77 , isConst( isConst )78 , subscripts( subscripts )79 , initializeExpression( initializeExpression )80 , constructParameter( constructParameter )81 {82 }83 Member::Member(Member &member)84 : MemberPrototype( member.GetAccessibility() )85 , name( member.GetName() )86 , type( member.GetType() )87 , isConst( member.IsConst() )88 , subscripts( member.GetSubscripts() )89 {90 //ソースコードの位置91 source_code_address=member.source_code_address;92 }93 Member()94 {95 }96 ~Member()97 {98 }99 78 }; 100 79 typedef std::vector<Member *> Members; -
trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h
r603 r632 4 4 { 5 5 public: 6 // オブジェクトモジュール名 7 std::string name; 8 6 9 // メタ情報 7 10 Meta meta; … … 29 32 trace_for_serialize( "serializing - objectModule" ); 30 33 34 ar & BOOST_SERIALIZATION_NVP( name ); 31 35 ar & BOOST_SERIALIZATION_NVP( meta ); 32 36 ar & BOOST_SERIALIZATION_NVP( globalNativeCode ); … … 39 43 void StaticLink( ObjectModule &objectModule ); 40 44 45 const std::string &GetName() const 46 { 47 return name; 48 } 49 void SetName( const std::string &name ) 50 { 51 this->name = name; 52 } 41 53 int GetCurrentSourceIndex() const 42 54 { -
trunk/ab5.0/abdev/ab_common/include/Lexical/Parameter.h
r603 r632 26 26 27 27 public: 28 Parameter( const std::string &varName, const Type &type, bool isRef = false, const std::string initValue = "" ): 29 Type( type ), 30 varName( varName ), 31 isRef( isRef ), 32 isArray( false ), 33 initValue( initValue ) 34 { 35 } 36 Parameter( const Parameter ¶m ): 37 Type( param ), 38 varName( param.varName ), 39 isRef( param.isRef ), 40 isArray( param.isArray ), 41 subscripts( param.subscripts ), 42 initValue( param.initValue ) 43 { 44 } 45 Parameter() 46 { 47 } 48 ~Parameter(){} 28 Parameter( const std::string &varName, const Type &type, bool isRef = false, const std::string initValue = "" ); 29 Parameter( const Parameter ¶m, const Type &type ); 30 Parameter( const Parameter ¶m ); 31 Parameter(); 32 ~Parameter(); 49 33 50 34 void SetArray( const Subscripts &subscripts ){ -
trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h
r604 r632 24 24 Type returnType; 25 25 26 private: 26 27 // ソースコードの位置 27 int codePos;28 SourceCodePosition sourceCodePosition; 28 29 29 30 // XMLシリアライズ用 … … 40 41 ar & BOOST_SERIALIZATION_NVP( params ); 41 42 ar & BOOST_SERIALIZATION_NVP( returnType ); 42 ar & BOOST_SERIALIZATION_NVP( codePos);43 ar & BOOST_SERIALIZATION_NVP( sourceCodePosition ); 43 44 } 44 45 … … 49 50 , isCdecl( isCdecl ) 50 51 , isUsing( false ) 51 , codePos( -1 )52 52 { 53 53 } … … 83 83 } 84 84 85 int GetCodePos() const86 { 87 return codePos;88 } 89 void Set CodePos( int codePos)90 { 91 this-> codePos = codePos;85 const SourceCodePosition &GetSourceCodePosition() const 86 { 87 return sourceCodePosition; 88 } 89 void SetSourceCodePosition( const SourceCodePosition &sourceCodePosition ) 90 { 91 this->sourceCodePosition = sourceCodePosition; 92 92 } 93 93 … … 178 178 public: 179 179 180 UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport ) 181 : Procedure( namespaceScopes, name, kind, isCdecl ) 182 , importedNamespaces( importedNamespaces ) 183 , pParentClass( NULL ) 184 , pInterface( NULL ) 185 , pMethod( NULL ) 186 , isMacro( isMacro ) 187 , secondParmNum( 0 ) 188 , realSecondParmNum( 1 ) 189 , isExport( isExport ) 190 , isSystem( false ) 191 , isAutoGeneration( false ) 192 , isCompiled( false ) 193 , beginOpAddress( 0 ) 194 , endOpAddress( 0 ) 195 { 196 static int id_base=0; 197 id = ( id_base ++ ); 198 } 199 UserProc() 200 { 201 } 202 ~UserProc() 203 { 204 BOOST_FOREACH( Parameter *pParam, realParams ){ 205 delete pParam; 206 } 207 } 180 UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport ); 181 UserProc( const UserProc &userProc, const CClass *pParentClass ); 182 UserProc(); 183 ~UserProc(); 208 184 209 185 void SetReturnType( const Type &newReturnType ) -
trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h
r603 r632 253 253 }; 254 254 typedef std::vector<BasicSource> BasicSources; 255 256 class SourceCodePosition 257 { 258 std::string objectModuleName; 259 int pos; 260 261 // XMLシリアライズ用 262 private: 263 friend class boost::serialization::access; 264 template<class Archive> void serialize(Archive& ar, const unsigned int version) 265 { 266 trace_for_serialize( "serializing - IncludedFilesRelation" ); 267 268 ar & BOOST_SERIALIZATION_NVP( objectModuleName ); 269 ar & BOOST_SERIALIZATION_NVP( pos ); 270 } 271 272 public: 273 SourceCodePosition( const std::string &objectModuleName, int pos ) 274 : objectModuleName( objectModuleName ) 275 , pos( pos ) 276 { 277 } 278 SourceCodePosition() 279 : pos( -1 ) 280 { 281 } 282 283 const std::string &GetObjectModuleName() const 284 { 285 return objectModuleName; 286 } 287 int GetPos() const 288 { 289 return pos; 290 } 291 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h
r603 r632 136 136 void PtrLevelDown(){ 137 137 PTR_LEVEL_DOWN( basicType ); 138 } 139 void SetPtrLevel( int level ) 140 { 141 basicType = MAKE_PTR_TYPE( NATURAL_TYPE( basicType ), level ); 138 142 } 139 143 … … 166 170 bool IsReal() const; 167 171 bool Is64() const; 172 bool IsValueType() const; 168 173 bool IsProcPtr() const; 169 174 bool IsStruct() const; … … 233 238 static int GetBasicTypeFromSimpleName( const char *variable ); 234 239 }; 235 typedef std::vector<Type> Types; 240 241 class Types 242 : public std::vector<Type> 243 { 244 // XMLシリアライズ用 245 private: 246 friend class boost::serialization::access; 247 template<class Archive> void serialize(Archive& ar, const unsigned int version) 248 { 249 ar & boost::serialization::make_nvp("vector_Type", boost::serialization::base_object<vector<Type>>(*this)); 250 } 251 252 public: 253 bool IsEquals( const Types &Types ) const; 254 }; 236 255 237 256 /*! -
trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h
r603 r632 59 59 60 60 void Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine ); 61 int GetIndex( const Symbol &symbol ) const;61 const TypeDef *Find( const Symbol &symbol ) const; 62 62 }; -
trunk/ab5.0/abdev/ab_common/include/ab_common.h
r622 r632 19 19 #include "Lexical/Interface.h" 20 20 #include "Lexical/Member.h" 21 #include "Lexical/Template.h" 21 22 #include "Lexical/Class.h" 22 23 #include "Lexical/Parameter.h" -
trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
r603 r632 1 1 #include "stdafx.h" 2 3 4 CClass::CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name ) 5 : ClassPrototype( namespaceScopes, name ) 6 , importedNamespaces( importedNamespaces ) 7 , classType( Class ) 8 , pSuperClass( NULL ) 9 , blittableType( Type() ) 10 , isReady( false ) 11 , fixedAlignment( 0 ) 12 , ConstructorMemberSubIndex( -1 ) 13 , DestructorMemberSubIndex( -1 ) 14 , vtblNum( 0 ) 15 , vtbl_offset( -1 ) 16 , comVtblOffset( 0 ) 17 , isCompilingConstructor( false ) 18 , isCompilingDestructor( false ) 19 , cacheSize( 0 ) 20 { 21 } 22 23 CClass::CClass( const NamespaceScopes &namespaceScopes, 24 const NamespaceScopesCollection &importedNamespaces, 25 const std::string &name, 26 ClassType classType, 27 const GenericTypes &formalGenericTypes, 28 const Types &superClassActualTypeParameters, 29 int ConstructorMemberSubIndex, 30 int DestructorMemberSubIndex, 31 int vtblNum, 32 int fixedAlignment ) 33 : ClassPrototype( namespaceScopes, name ) 34 , importedNamespaces( importedNamespaces ) 35 , classType( classType ) 36 , formalGenericTypes( formalGenericTypes ) 37 , pSuperClass( NULL ) 38 , superClassActualTypeParameters( superClassActualTypeParameters ) 39 , blittableType( Type() ) 40 , isReady( false ) 41 , ConstructorMemberSubIndex( ConstructorMemberSubIndex ) 42 , DestructorMemberSubIndex( DestructorMemberSubIndex ) 43 , vtblNum( vtblNum ) 44 , fixedAlignment( fixedAlignment ) 45 , vtbl_offset( -1 ) 46 , comVtblOffset( 0 ) 47 , isCompilingConstructor( false ) 48 , isCompilingDestructor( false ) 49 , cacheSize( 0 ) 50 { 51 } 52 53 CClass::CClass() 54 : ClassPrototype() 55 , importedNamespaces() 56 , classType() 57 , pSuperClass( NULL ) 58 , blittableType( Type() ) 59 , isReady( false ) 60 , fixedAlignment( 0 ) 61 , ConstructorMemberSubIndex( -1 ) 62 , DestructorMemberSubIndex( -1 ) 63 , vtblNum( 0 ) 64 , vtbl_offset( -1 ) 65 , comVtblOffset( 0 ) 66 , isCompilingConstructor( false ) 67 , isCompilingDestructor( false ) 68 , cacheSize( 0 ) 69 { 70 } 71 72 CClass::~CClass() 73 { 74 // 動的メンバ 75 BOOST_FOREACH( Member *member, dynamicMembers ) 76 { 77 delete member; 78 } 79 80 // 静的メンバ 81 BOOST_FOREACH( Member *member, staticMembers ) 82 { 83 delete member; 84 } 85 86 // インターフェイス 87 BOOST_FOREACH( ::Interface *pInterface, interfaces ) 88 { 89 delete pInterface; 90 } 91 92 // テンプレート展開済みのクラス 93 BOOST_FOREACH( ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses ) 94 { 95 delete pExpandedTemplateClass; 96 } 97 } 2 98 3 99 void CClass::Using() const -
trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
r603 r632 186 186 187 187 // TypeDefも見る 188 int index = this->GetTypeDefs().GetIndex( symbol ); 189 if( index != -1 ){ 190 Type type = this->GetTypeDefs()[index].GetBaseType(); 191 if( type.IsObject() ){ 188 const TypeDef *pTypeDef = this->GetTypeDefs().Find( symbol ); 189 if( pTypeDef ) 190 { 191 Type type = pTypeDef->GetBaseType(); 192 if( type.IsObject() ) 193 { 192 194 return &type.GetClass(); 193 195 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp
r603 r632 1 1 #include "stdafx.h" 2 3 Parameter::Parameter( const std::string &varName, const Type &type, bool isRef, const std::string initValue ) 4 : Type( type ) 5 , varName( varName ) 6 , isRef( isRef ) 7 , isArray( false ) 8 , initValue( initValue ) 9 { 10 } 11 12 Parameter::Parameter( const Parameter ¶m, const Type &type ) 13 : Type( type ) 14 , varName( param.varName ) 15 , isRef( param.isRef ) 16 , isArray( param.isArray ) 17 , subscripts( param.subscripts ) 18 , initValue( param.initValue ) 19 { 20 } 21 22 Parameter::Parameter( const Parameter ¶m ) 23 : Type( param ) 24 , varName( param.varName ) 25 , isRef( param.isRef ) 26 , isArray( param.isArray ) 27 , subscripts( param.subscripts ) 28 , initValue( param.initValue ) 29 { 30 } 31 32 Parameter::Parameter() 33 { 34 } 35 36 Parameter::~Parameter() 37 { 38 } 2 39 3 40 bool Parameter::Equals( const Parameter ¶m, bool isContravariant ) const -
trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp
r603 r632 1 1 #include "stdafx.h" 2 3 int id_base = 0; 4 5 UserProc::UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport ) 6 : Procedure( namespaceScopes, name, kind, isCdecl ) 7 , importedNamespaces( importedNamespaces ) 8 , pParentClass( NULL ) 9 , pInterface( NULL ) 10 , pMethod( NULL ) 11 , isMacro( isMacro ) 12 , secondParmNum( 0 ) 13 , realSecondParmNum( 1 ) 14 , isExport( isExport ) 15 , isSystem( false ) 16 , isAutoGeneration( false ) 17 , isCompiled( false ) 18 , beginOpAddress( 0 ) 19 , endOpAddress( 0 ) 20 , id( id_base ++ ) 21 { 22 } 23 24 UserProc::UserProc( const UserProc &userProc, const CClass *pParentClass ) 25 : Procedure( userProc ) 26 , _paramStr( userProc._paramStr ) 27 , importedNamespaces( userProc.importedNamespaces ) 28 , pParentClass( pParentClass ) 29 , pInterface( NULL ) 30 , pMethod( NULL ) 31 , isMacro( userProc.isMacro ) 32 , secondParmNum( userProc.secondParmNum ) 33 , realParams( userProc.realParams ) 34 , realSecondParmNum( userProc.realSecondParmNum ) 35 , isExport( userProc.isExport ) 36 , isSystem( userProc.isSystem ) 37 , isAutoGeneration( userProc.isAutoGeneration ) 38 , isCompiled( false ) 39 , beginOpAddress( 0 ) 40 , endOpAddress( 0 ) 41 , localVars( Variables() ) 42 , id( id_base ++ ) 43 , nativeCode( NativeCode() ) 44 { 45 } 46 47 UserProc::UserProc() 48 { 49 } 50 51 UserProc::~UserProc() 52 { 53 BOOST_FOREACH( Parameter *pParam, realParams ){ 54 delete pParam; 55 } 56 } 2 57 3 58 bool UserProc::IsEqualForOverride( const Types &actualTypeParametersForThisProc, const UserProc *pUserProc ) const … … 54 109 const NamespaceScopes &UserProc::GetNamespaceScopes() const 55 110 { 56 if( HasParentClass() ){ 111 if( HasParentClass() ) 112 { 57 113 return GetParentClassPtr()->GetNamespaceScopes(); 58 114 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp
r603 r632 5 5 const NamespaceSupporter *Symbol::namespaceSupporter = NULL; 6 6 7 char *calcNames[25 5] = {7 char *calcNames[256] = { 8 8 "xor", 9 9 }; -
trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
r603 r632 384 384 return false; 385 385 } 386 387 bool Type::IsValueType() const 388 { 389 return ( IsWhole() || IsReal() ); 390 } 391 386 392 bool Type::IsProcPtr() const 387 393 { … … 550 556 } 551 557 558 bool Types::IsEquals( const Types &types ) const 559 { 560 if( this->size() != types.size() ) 561 { 562 // アイテム数が違う 563 return false; 564 } 565 566 const Types &thisTypes = *this; 567 for( int i=0; i<static_cast<int>(this->size()); i++ ) 568 { 569 if( !thisTypes[i].Equals( types[i] ) ) 570 { 571 return false; 572 } 573 } 574 575 return true; 576 } 552 577 553 578 void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
r603 r632 17 17 } 18 18 19 int TypeDefCollection::GetIndex( const Symbol &symbol ) const{ 20 int max = (int)(*this).size(); 21 for( int i=0; i<max; i++ ){ 22 if( (*this)[i].IsEqualSymbol( symbol ) ){ 23 return i; 19 const TypeDef *TypeDefCollection::Find( const Symbol &symbol ) const 20 { 21 const TypeDefCollection &typeDefs = *this; 22 BOOST_FOREACH( const TypeDef &typeDef, typeDefs ) 23 { 24 if( typeDef.IsEqualSymbol( symbol ) ) 25 { 26 return &typeDef; 24 27 } 25 28 } 26 return -1;29 return NULL; 27 30 } -
trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
r603 r632 289 289 } 290 290 291 trace_for_sourcecodestep( "★★★ " << pUserProc->GetFullName() << "のコンパイルを開始" );291 trace_for_sourcecodestep( "★★★ " << FormatEscapeSequenceStringToDefaultString( pUserProc->GetFullName() ) << "のコンパイルを開始" ); 292 292 293 293 pUserProc->CompleteCompile(); … … 330 330 if( !pUserProc->IsAutoGeneration() ) 331 331 { 332 cp=pUserProc->Get CodePos();332 cp=pUserProc->GetSourceCodePosition().GetPos(); 333 333 for(;;cp++){ 334 334 if(IsCommandDelimitation(basbuf[cp])) break; -
trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp
r603 r632 540 540 } 541 541 542 int typeDefIndex = compiler.GetObjectModule().meta.GetTypeDefs().GetIndex(542 const TypeDef *pTypeDef = compiler.GetObjectModule().meta.GetTypeDefs().Find( 543 543 LexicalAnalyzer::FullNameToSymbol( VarName ) 544 544 ); 545 if( typeDefIndex != -1 ){ 545 if( pTypeDef ) 546 { 546 547 // TypeDef後の型名だったとき 547 lstrcpy( VarName, compiler.GetObjectModule().meta.GetTypeDefs()[typeDefIndex].GetBaseName().c_str() );548 lstrcpy( VarName, pTypeDef->GetBaseName().c_str() ); 548 549 } 549 550 -
trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp
r622 r632 576 576 577 577 if(!hLib){ 578 compiler.errorMessenger.Output(-106,pDllProc->GetDllFileName().c_str(),pDllProc->Get CodePos());578 compiler.errorMessenger.Output(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetSourceCodePosition().GetPos()); 579 579 } 580 580 } … … 583 583 if(!GetProcAddress(hLib,pDllProc->GetAlias().c_str())){ 584 584 FreeLibrary(hLib); 585 compiler.errorMessenger.Output(-107,pDllProc->GetAlias(),pDllProc->Get CodePos());585 compiler.errorMessenger.Output(-107,pDllProc->GetAlias(),pDllProc->GetSourceCodePosition().GetPos()); 586 586 } 587 587 FreeLibrary(hLib); -
trunk/ab5.0/abdev/compiler_x86/NumOpe.cpp
r600 r632 1032 1032 isNothing_stack[sp] = true; 1033 1033 1034 type_stack[sp] = DEF_OBJECT;1035 1034 if( baseType.IsObject() ){ 1035 type_stack[sp] = DEF_OBJECT; 1036 1036 index_stack[sp] = baseType.GetIndex(); 1037 1037 } 1038 1038 else{ 1039 index_stack[sp] = (LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetObjectClassPtr(); 1039 type_stack[sp] = baseType.GetBasicType(); 1040 index_stack[sp] = baseType.GetIndex(); 1040 1041 } 1041 1042
Note:
See TracChangeset
for help on using the changeset viewer.