Ignore:
Timestamp:
Apr 15, 2007, 1:55:46 AM (18 years ago)
Author:
dai
Message:

GCでのメモリ回収処理を、実行時型情報を元に行うようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/TypeInfo.ab

    r207 r214  
    1313    Sub ~TypeInfo()
    1414    End Sub
     15
     16    Override Function GetType() As TypeInfo
     17        Return _System_TypeBase.selfTypeInfo
     18    End Function
    1519
    1620
     
    162166Class _System_TypeForClass
    163167    Inherits TypeBaseImpl
    164 Public
     168
     169Public
     170    referenceOffsets As *Long
     171    numOfReference As Long
     172
     173    Sub _System_TypeForClass( strNamespace As String, name As String, referenceOffsets As *Long, numOfReference As Long )
     174        TypeBaseImpl( strNamespace, name )
     175
     176        This.referenceOffsets = referenceOffsets
     177        This.numOfReference = numOfReference
     178    End Sub
    165179    Sub _System_TypeForClass( strNamespace As String, name As String )
    166180        TypeBaseImpl( strNamespace, name )
     
    168182    Sub ~_System_TypeForClass()
    169183    End Sub
     184
    170185    Override Function IsClass() As Boolean
    171186        Return True
     
    225240
    226241        '例:
    227         'Add( New _System_TypeForClass( "System", "String" ) )
     242        'Add( New _System_TypeForClass( "System", "String", [__offsets...], __numOfOffsets ) )
    228243        'Search( "String" ).SetBaseType( Search( "Object" ) )
    229244    End Sub
     
    242257        InitializeUserTypes()
    243258
     259        selfTypeInfo = _System_TypeBase.Search( "System", "TypeInfo" ) As TypeInfo
    244260
    245261        OutputDebugString( Ex"ready dynamic meta datas!\r\n" )
     
    251267
    252268    Static Function Search( strNamespace As LPSTR, typeName As LPSTR ) As TypeBaseImpl
    253 
    254269        ' TODO: 名前空間に対応する
    255270        Dim i As Long
     
    267282    End Function
    268283
     284    Static selfTypeInfo = Nothing As TypeInfo
     285
    269286End Class
    270287
Note: See TracChangeset for help on using the changeset viewer.