source: dev/trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp@ 636

Last change on this file since 636 was 636, checked in by dai_9181, 16 years ago

libファイルを跨ったテンプレート展開に対応。

File size: 19.2 KB
Line 
1#include "stdafx.h"
2
3
4CClass::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
23CClass::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
53CClass::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
72CClass::~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}
98
99void CClass::Using() const
100{
101 if( this->IsUsing() )
102 {
103 // 既に使用することになっている
104 return;
105 }
106
107 Prototype::Using();
108
109 // 仮想関数になるメソッドに使用チェックをつける
110 const CClass &objThis = *this;
111 BOOST_FOREACH( const CMethod *pMethod, objThis.GetDynamicMethods() )
112 {
113 if( pMethod->IsVirtual() )
114 {
115 pMethod->GetUserProc().Using();
116 }
117 }
118}
119
120bool CClass::IsClass() const
121{
122 return classType == CClass::Class;
123}
124bool CClass::IsInterface() const
125{
126 return classType == CClass::Interface;
127}
128bool CClass::IsComInterface() const
129{
130 return classType == CClass::ComInterface;
131}
132bool CClass::IsEnum() const
133{
134 return classType == CClass::Enum;
135}
136bool CClass::IsDelegate() const
137{
138 return classType == CClass::Delegate;
139}
140bool CClass::IsStructure() const
141{
142 return classType == CClass::Structure;
143}
144
145
146// コンストラクタのコンパイルを開始
147void CClass::NotifyStartConstructorCompile() const
148{
149 isCompilingConstructor = true;
150}
151
152//コンストラクタのコンパイルを終了
153void CClass::NotifyFinishConstructorCompile() const
154{
155 isCompilingConstructor = false;
156}
157
158//コンストラクタをコンパイル中かどうかを判別
159bool CClass::IsCompilingConstructor() const
160{
161 return isCompilingConstructor;
162}
163
164//デストラクタのコンパイルを開始
165void CClass::NotifyStartDestructorCompile() const{
166 isCompilingDestructor = true;
167}
168
169//デストラクタのコンパイルを終了
170void CClass::NotifyFinishDestructorCompile() const{
171 isCompilingDestructor = false;
172}
173
174//デストラクタをコンパイル中かどうかを判別
175bool CClass::IsCompilingDestructor() const
176{
177 return isCompilingDestructor;
178}
179
180//自身の派生クラスかどうかを確認
181bool CClass::IsSubClass( const CClass *pSubClass ) const
182{
183 if( !pSubClass->HasSuperClass() )
184 {
185 return false;
186 }
187
188 const CClass *pTempClass = &pSubClass->GetSuperClass();
189 while( pTempClass ){
190 if( this == pTempClass ) return true;
191 pTempClass = &pTempClass->GetSuperClass();
192 }
193 return false;
194}
195
196//自身と等しいまたは派生クラスかどうかを確認
197bool CClass::IsEqualsOrSubClass( const CClass *pSubClass ) const
198{
199 if( IsEquals( pSubClass ) ) return true;
200 return IsSubClass( pSubClass );
201}
202
203// 自身と等しいまたは派生クラス、基底クラスかどうかを確認
204bool CClass::IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const
205{
206 if( IsEquals( &objClass ) ) return true;
207 if( IsSubClass( &objClass ) ) return true;
208 if( objClass.IsSubClass( this ) ) return true;
209 return false;
210}
211
212bool CClass::IsInheritsInterface( const CClass *pInterfaceClass ) const
213{
214 BOOST_FOREACH( const ::Interface *pInterface, interfaces ){
215 if( pInterfaceClass == &pInterface->GetClass() ){
216 return true;
217 }
218 }
219 return false;
220}
221
222bool CClass::InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine )
223{
224 //メソッドをコピー
225 BOOST_FOREACH( const CMethod *pBaseMethod, inheritsClass.GetDynamicMethods() ){
226 CMethod *pMethod = new DynamicMethod( *pBaseMethod );
227
228 // アクセシビリティ
229 if(pBaseMethod->GetAccessibility() == Prototype::Private){
230 pMethod->SetAccessibility( Prototype::None );
231 }
232 else{
233 pMethod->SetAccessibility( pBaseMethod->GetAccessibility() );
234 }
235
236 //pobj_Inherits
237 // ※継承元のClassIndexをセット(入れ子継承を考慮する)
238 if(pBaseMethod->GetInheritsClassPtr()==0){
239 pMethod->SetInheritsClassPtr( &inheritsClass );
240 }
241 else{
242 pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() );
243 }
244
245 GetDynamicMethods().push_back( pMethod );
246 }
247
248 //仮想関数の数
249 AddVtblNum( inheritsClass.GetVtblNum() );
250
251 //継承先のクラスをメンバとして保持する
252 SetSuperClass( &inheritsClass );
253 SetSuperClassActualTypeParameters( actualTypeParameters );
254
255 // インターフェイスを引き継ぐ
256 BOOST_FOREACH( ::Interface *pInterface, inheritsClass.GetInterfaces() )
257 {
258 interfaces.push_back( new ::Interface( *pInterface ) );
259 }
260
261 if( this->IsInterface() && inheritsClass.IsComInterface() )
262 {
263 // COMインターフェイスを継承した場合はCOMインターフェイスにする
264 this->SetClassType( CClass::ComInterface );
265 }
266
267 return true;
268}
269
270void CClass::AddDynamicMember( Member *pMember )
271{
272 dynamicMembers.push_back( pMember );
273}
274void CClass::AddStaticMember( Member *pMember )
275{
276 staticMembers.push_back( pMember );
277}
278
279bool CClass::DupliCheckAll(const char *name) const
280{
281 //重複チェック
282
283 //メンバ
284 if(DupliCheckMember(name)) return 1;
285
286 //メソッド
287 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
288 if( lstrcmp( name, pMethod->GetUserProc().GetName().c_str() ) == 0 ){
289 return 1;
290 }
291 }
292
293 return 0;
294}
295bool CClass::DupliCheckMember(const char *name) const
296{
297 //重複チェック
298
299 if( this->HasSuperClass() )
300 {
301 if( this->GetSuperClass().DupliCheckMember( name ) )
302 {
303 // 基底クラスで重複が発見された
304 return true;
305 }
306 }
307
308 // 動的メンバ
309 BOOST_FOREACH( Member *pMember, dynamicMembers )
310 {
311 if( GetName() == pMember->GetName() )
312 {
313 return true;
314 }
315 }
316
317 // 静的メンバ
318 BOOST_FOREACH( Member *pMember, staticMembers ){
319 if( GetName() == pMember->GetName() ){
320 return true;
321 }
322 }
323
324 return false;
325}
326
327const Member *CClass::FindDynamicMember( const char *memberName ) const
328{
329 if( this->HasSuperClass() )
330 {
331 // 基底クラスで検索
332 const Member *result = this->GetSuperClass().FindDynamicMember( memberName );
333 if( result )
334 {
335 return result;
336 }
337 }
338
339 BOOST_FOREACH( Member *pMember, GetDynamicMembers() )
340 {
341 if( pMember->GetName() == memberName )
342 {
343 return pMember;
344 }
345 }
346 return NULL;
347}
348
349void CClass::EnumDynamicMethodsOrInterfaceMethods( const char *methodName, std::vector<const UserProc *> &subs ) const
350{
351 // 動的メソッド
352 GetDynamicMethods().Enum( methodName, subs );
353
354 // インターフェイス メソッド
355 BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )
356 {
357 pInterface->GetDynamicMethods().Enum( methodName, subs );
358 }
359}
360const CMethod *CClass::GetDynamicMethodOrInterfaceMethod( const UserProc *pUserProc ) const
361{
362 // 動的メソッド
363 const CMethod *result = GetDynamicMethods().GetMethodPtr( pUserProc );
364
365 if( !result )
366 {
367 // インターフェイス メソッド
368 BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )
369 {
370 result = pInterface->GetDynamicMethods().GetMethodPtr( pUserProc );
371 if( result )
372 {
373 return result;
374 }
375 }
376 }
377
378 return result;
379}
380
381//サイズを取得
382int CClass::GetSize() const
383{
384 int resultSize = 0;
385
386 int alignment = 1;
387 if( this->IsStructure() )
388 {
389 // 構造体のとき
390
391 if( this->GetFixedAlignment() )
392 {
393 // アラインメントの固定値が指定されていた場合はそれを取得
394 alignment = this->GetFixedAlignment();
395 }
396 }
397 else
398 {
399 // それ以外
400
401 if( this->HasSuperClass() )
402 {
403 // 基底クラスのサイズを追加
404 resultSize += this->GetSuperClass().GetSize();
405
406 // 基底クラスのアラインメントを取得
407 alignment = this->GetSuperClass().GetAlignment();
408 }
409 else
410 {
411 // 基底クラスが存在しないとき
412
413 // 仮想関数が存在する場合はvtbl及びvtblMasterListへのポインタのサイズを追加
414 resultSize += IsExistVirtualFunctions() ? PTR_SIZE*2 : 0;
415 }
416 }
417
418 BOOST_FOREACH( Member *pMember, dynamicMembers )
419 {
420 // メンバサイズ
421 int tempMemberSize = pMember->GetType().GetSize();
422
423 // 一時アラインメントを算出
424 int tempAlignment = tempMemberSize;
425 if( pMember->GetType().IsStruct() )
426 {
427 // メンバが構造体の場合は、メンバのアラインメントを取得
428 tempAlignment = pMember->GetType().GetClass().GetAlignment();
429 }
430
431 // アラインメントを考慮してパディングを追加
432 if( GetFixedAlignment() && alignment < tempAlignment )
433 {
434 if( resultSize % alignment )
435 {
436 resultSize += alignment - ( resultSize % alignment );
437 }
438 }
439 else
440 {
441 if( alignment < tempAlignment )
442 {
443 // 最大アラインメントを更新
444 alignment = tempAlignment;
445 }
446
447 if( tempMemberSize == 0 )
448 {
449 if( !pMember->GetType().IsStruct() )
450 {
451 throw;
452 }
453
454 //メンバを持たない構造体
455 //※何もしない(オフセットの計算をしない)
456 }
457 else{
458 if( resultSize % tempAlignment )
459 {
460 resultSize += tempAlignment - ( resultSize % tempAlignment );
461 }
462 }
463 }
464
465 // メンバサイズを加算(配列を考慮)
466 resultSize += tempMemberSize * Variable::GetSubScriptCounts( pMember->GetSubscripts() );
467 }
468
469 if( alignment )
470 {
471 // 末尾アラインメントを考慮してパディングを追加
472 if( resultSize % alignment )
473 {
474 resultSize += alignment - ( resultSize % alignment );
475 }
476 }
477
478 return resultSize;
479}
480
481//メンバのオフセットを取得
482int CClass::GetMemberOffset( const char *memberName ) const
483{
484 int resultSize = 0;
485
486 int alignment = 1;
487 if( this->IsStructure() )
488 {
489 // 構造体のとき
490
491 if( this->GetFixedAlignment() )
492 {
493 // アラインメントの固定値が指定されていた場合はそれを取得
494 alignment = this->GetFixedAlignment();
495 }
496 }
497 else
498 {
499 // それ以外
500
501 if( this->HasSuperClass() )
502 {
503 if( this->GetSuperClass().HasDynamicMember( memberName ) )
504 {
505 // 基底クラスのメンバを取得
506 return this->GetSuperClass().GetMemberOffset( memberName );
507 }
508
509 // 基底クラスのサイズを追加
510 resultSize += this->GetSuperClass().GetSize();
511
512 // 基底クラスのアラインメントを取得
513 alignment = this->GetSuperClass().GetAlignment();
514 }
515 else
516 {
517 // 基底クラスが存在しないとき
518
519 // 仮想関数が存在する場合はvtbl及びvtblMasterListへのポインタのサイズを追加
520 resultSize += IsExistVirtualFunctions() ? PTR_SIZE*2 : 0;
521 }
522 }
523
524 BOOST_FOREACH( Member *pMember, dynamicMembers )
525 {
526 // メンバサイズ
527 int tempMemberSize = pMember->GetType().GetSize();
528
529 // 一時アラインメントを算出
530 int tempAlignment = tempMemberSize;
531 if( pMember->GetType().IsStruct() )
532 {
533 // メンバが構造体の場合は、メンバのアラインメントを取得
534 tempAlignment = pMember->GetType().GetClass().GetAlignment();
535 }
536
537 // アラインメントを考慮してパディングを追加
538 if( GetFixedAlignment() && alignment < tempAlignment )
539 {
540 if( resultSize % alignment )
541 {
542 resultSize += alignment - ( resultSize % alignment );
543 }
544 }
545 else
546 {
547 if( alignment < tempAlignment )
548 {
549 // 最大アラインメントを更新
550 alignment = tempAlignment;
551 }
552
553 if( tempMemberSize == 0 )
554 {
555 if( !pMember->GetType().IsStruct() )
556 {
557 throw;
558 }
559
560 //メンバを持たない構造体
561 //※何もしない(オフセットの計算をしない)
562 }
563 else{
564 if( resultSize % tempAlignment )
565 {
566 resultSize += tempAlignment - ( resultSize % tempAlignment );
567 }
568 }
569 }
570
571 if(memberName){
572 //メンバ指定がある場合は、オフセットを返す
573 if( pMember->GetName() == memberName )
574 {
575 return resultSize;
576 }
577 }
578
579 // メンバサイズを加算(配列を考慮)
580 resultSize += tempMemberSize * Variable::GetSubScriptCounts( pMember->GetSubscripts() );
581 }
582
583 if( alignment )
584 {
585 // 末尾アラインメントを考慮してパディングを追加
586 if( resultSize % alignment )
587 {
588 resultSize += alignment - ( resultSize % alignment );
589 }
590 }
591
592 return resultSize;
593}
594int CClass::GetAlignment() const
595{
596 int alignment = 1;
597 if( this->IsStructure() )
598 {
599 // 構造体のとき
600
601 if( this->GetFixedAlignment() )
602 {
603 // アラインメントの固定値が指定されていた場合はそれを取得
604 return this->GetFixedAlignment();
605 }
606 }
607 else
608 {
609 // それ以外
610
611 if( this->HasSuperClass() )
612 {
613 // 基底クラスのアラインメントを取得
614 alignment = this->GetSuperClass().GetAlignment();
615 }
616 else
617 {
618 // 基底クラスが存在しないとき
619
620 // 仮想関数が存在する場合はvtbl及びvtblMasterListへのポインタのサイズを追加
621 alignment = PTR_SIZE;
622 }
623 }
624
625 BOOST_FOREACH( Member *pMember, dynamicMembers )
626 {
627 int tempAlignment = pMember->GetType().GetSize();
628 if( pMember->GetType().IsStruct() )
629 {
630 // メンバが構造体の場合は、メンバのアラインメントを取得
631 tempAlignment = pMember->GetType().GetClass().GetAlignment();
632 }
633
634 if( alignment < tempAlignment )
635 {
636 // 最大アラインメントを更新
637 alignment = tempAlignment;
638 }
639 }
640
641 return alignment;
642}
643
644void CClass::GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const
645{
646 vtblMasterListIndex = 0;
647
648 vtblIndex = 0;
649 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
650 if( &pMethod->GetUserProc() == pUserProc )
651 {
652 return;
653 }
654
655 if( pMethod->IsVirtual() )
656 {
657 vtblIndex++;
658 }
659 }
660
661 BOOST_FOREACH( const ::Interface *pInterface, interfaces )
662 {
663 vtblMasterListIndex++;
664
665 vtblIndex = 0;
666 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
667 if( &pMethod->GetUserProc() == pUserProc )
668 {
669 return;
670 }
671
672 if( pMethod->IsVirtual() )
673 {
674 vtblIndex++;
675 }
676 }
677 }
678
679 _ASSERT( false );
680 throw;
681}
682int CClass::GetVtblMasterListIndex( const CClass *pClass ) const
683{
684 int result = 0;
685
686 BOOST_FOREACH( const ::Interface *pInterface, interfaces )
687 {
688 result++;
689
690 if( &pInterface->GetClass() == pClass )
691 {
692 return result;
693 }
694 }
695
696 _ASSERT( false );
697 throw;
698}
699long CClass::GetVtblMasterListOffset() const
700{
701 if( vtblMasterListOffset == -1 )
702 {
703 _ASSERT( false );
704 throw;
705 }
706
707 return vtblMasterListOffset;
708}
709bool CClass::IsAbstract() const
710{
711 // 未実装(abstract)の仮想関数を持つ場合はtrueを返す
712
713 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
714 if(pMethod->IsVirtual()){
715 if(pMethod->IsAbstract()){
716 return true;
717 }
718 }
719 }
720
721 // インターフェイスのvtbl
722 BOOST_FOREACH( const ::Interface *pInterface, interfaces )
723 {
724 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
725 if(pMethod->IsVirtual()){
726 if(pMethod->IsAbstract()){
727 return true;
728 }
729 }
730 }
731 }
732
733 return false;
734}
735
736const CClass *Classes::FindEx( const Symbol &symbol ) const
737{
738 if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "Object" )
739 {
740 return GetObjectClassPtr();
741 }
742 else if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "String" )
743 {
744 return GetStringClassPtr();
745 }
746
747 std::vector<const CClass *> classes;
748 const CClass *pClass = GetHashArrayElement( symbol.GetName().c_str() );
749 while( pClass )
750 {
751 if( pClass->IsEqualSymbol( symbol.GetNamespaceScopes(), symbol.GetName() ) ){
752 //名前空間とクラス名が一致した
753 classes.push_back( pClass );
754 }
755 pClass = pClass->GetChainNext();
756 }
757 if( classes.size() > 0 )
758 {
759 // 複数の名前空間の中に同一のクラス名が存在する場合があるので、アクセス可能で尚且つ階層が一番深いものをチョイスする
760 pClass = classes.front();
761
762 BOOST_FOREACH( const CClass *pTempClass, classes )
763 {
764 if( pClass->GetNamespaceScopes().size() < pTempClass->GetNamespaceScopes().size() )
765 {
766 pClass = pTempClass;
767 }
768 }
769
770 return pClass;
771 }
772
773 return NULL;
774}
775
776const CClass *Classes::GetStringClassPtr() const
777{
778 if( !pStringClass )
779 {
780 // キャッシュしておく
781 pStringClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "String" ) );
782 }
783 return pStringClass;
784}
785const CClass *Classes::GetObjectClassPtr() const
786{
787 if( !pObjectClass )
788 {
789 // キャッシュしておく
790 pObjectClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "Object" ) );
791 }
792 return pObjectClass;
793}
794const CClass *Classes::GetInterfaceInfoClassPtr() const
795{
796 if( !pInterfaceInfo )
797 {
798 // キャッシュしておく
799 pInterfaceInfo = this->FindEx( Symbol( NamespaceScopes( "ActiveBasic.Core" ), "InterfaceInfo" ) );
800 }
801 return pInterfaceInfo;
802}
803
804std::string CClass::GetStaticDefiningStringAsMemberNames() const
805{
806 std::string result;
807
808 BOOST_FOREACH( const Member *pMember, dynamicMembers )
809 {
810 if( result.size() )
811 {
812 result += ",";
813 }
814
815 result += "\"" + pMember->GetName() + "\"";
816 }
817
818 return result;
819}
820std::string CClass::GetStaticDefiningStringAsMemberOffsets() const
821{
822 std::string result;
823
824 BOOST_FOREACH( const Member *pMember, dynamicMembers )
825 {
826 if( result.size() )
827 {
828 result += ",";
829 }
830
831 int offset = this->GetMemberOffset( pMember->GetName().c_str() );
832
833 char temporary[255];
834 itoa( offset, temporary, 16 );
835
836 result += (std::string)"&H" + temporary;
837 }
838
839 return result;
840}
841
842void CClass::GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset ) const
843{
844 const CClass &thisClass = *this;
845 BOOST_FOREACH( const Member *pMember, thisClass.GetDynamicMembers() )
846 {
847 if( pMember->GetType().IsObject() || pMember->GetType().IsPointer() )
848 {
849 if( referenceOffsetsBuffer.size() )
850 {
851 referenceOffsetsBuffer += ",";
852 }
853
854 char temp[255];
855 sprintf( temp, "%d", baseOffset + thisClass.GetMemberOffset( pMember->GetName().c_str() ) );
856 referenceOffsetsBuffer += temp;
857
858 numOfReference++;
859 }
860 if( pMember->GetType().IsStruct() && !pMember->GetType().IsPointer() )
861 {
862 // 構造体の実体をメンバに持つとき
863 int baseOffset = thisClass.GetMemberOffset( pMember->GetName().c_str() );
864
865 // 構造体メンバでGCによるチェックが必要な参照位置を追加
866 pMember->GetType().GetClass().GetReferenceOffsetsInitializeBuffer( referenceOffsetsBuffer, numOfReference, baseOffset );
867 }
868 }
869}
Note: See TracBrowser for help on using the repository browser.