diff options
author | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2017-08-11 20:37:36 +0000 |
---|---|---|
committer | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2017-08-11 20:37:36 +0000 |
commit | 1e058bea440b387c13f3bca3dcd26854b7f52375 (patch) | |
tree | 57997b0c1318e8397403cd5c4b967c150226b3e1 /rtl/java | |
parent | 9b16c463bb4f64e84bf7207062a623b3a0ede37e (diff) | |
download | fpc-1e058bea440b387c13f3bca3dcd26854b7f52375.tar.gz |
* move TTypeKind from TypInfo unit to System unit as it's necessary for the future GetTypeKind() intrinsic
* also adjust (P)Byte usages to (P/T)TypeKind where necessary/approbiate
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@36873 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/java')
-rw-r--r-- | rtl/java/jsystem.inc | 54 | ||||
-rw-r--r-- | rtl/java/rttih.inc | 17 |
2 files changed, 31 insertions, 40 deletions
diff --git a/rtl/java/jsystem.inc b/rtl/java/jsystem.inc index a08a59eeaa..0ad4d12ef4 100644 --- a/rtl/java/jsystem.inc +++ b/rtl/java/jsystem.inc @@ -23,46 +23,6 @@ type ObjpasInt = LongInt; {$endif CPU16} -{ The RTTI is implemented through a series of constants : } - -Const - // please update tkManagedTypes below if you add new - // values - tkUnknown = 0; - tkInteger = 1; - tkChar = 2; - tkEnumeration = 3; - tkFloat = 4; - tkSet = 5; - tkMethod = 6; - tkSString = 7; - tkString = tkSString; - tkLString = 8; - tkAString = 9; - tkWString = 10; - tkVariant = 11; - tkArray = 12; - tkRecord = 13; - tkInterface = 14; - tkClass = 15; - tkObject = 16; - tkWChar = 17; - tkBool = 18; - tkInt64 = 19; - tkQWord = 20; - tkDynArray = 21; - tkInterfaceCorba = 22; - tkProcVar = 23; - tkUString = 24; - tkHelper = 26; - tkFile = 27; - tkClassRef = 28; - tkPointer = 29; - - // all potentially managed types - tkManagedTypes = [tkAstring,tkWstring,tkUstring,tkArray, - tkObject,tkRecord,tkDynArray,tkInterface,tkVariant]; - {**************************************************************************** Local types ****************************************************************************} @@ -449,6 +409,20 @@ function aligntoptr(p : pointer) : pointer;inline; {$i aliases.inc} +{**************************************************************************** + Run-Time Type Information (RTTI) declarations +****************************************************************************} + +(* +type + PTypeKind = ^TTypeKind; +*) + +const + // all potentially managed types + tkManagedTypes = [tkAstring,tkWstring,tkUstring,tkArray, + tkObject,tkRecord,tkDynArray,tkInterface,tkVariant]; + {***************************************************************************** Dynamic Array support *****************************************************************************} diff --git a/rtl/java/rttih.inc b/rtl/java/rttih.inc index 55cbd0bd60..c2ec6d5db6 100644 --- a/rtl/java/rttih.inc +++ b/rtl/java/rttih.inc @@ -11,6 +11,23 @@ **********************************************************************} +{ sadly MinEnumSize is not handled by Push/Pop :'( } +{$MINENUMSIZE 1 this saves a lot of memory } + +type + { If you change one of the following enumeration types you have also to + change the compiler and unit typeinfo in an appropriate way! + Also if you add managed types you'll need to update tkManagedTypes in + rtti.inc } + TTypeKind = (tkUnknown,tkInteger,tkChar,tkEnumeration,tkFloat, + tkSet,tkMethod,tkSString,tkLString,tkAString, + tkWString,tkVariant,tkArray,tkRecord,tkInterface, + tkClass,tkObject,tkWChar,tkBool,tkInt64,tkQWord, + tkDynArray,tkInterfaceRaw,tkProcVar,tkUString,tkUChar, + tkHelper,tkFile,tkClassRef,tkPointer); + +{$MINENUMSIZE DEFAULT} + (* procedure InitializeArray(p, typeInfo: Pointer; count: SizeInt); procedure FinalizeArray(p, typeInfo: Pointer; count: SizeInt); |