mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +02:00
+ Initial variant support
This commit is contained in:
parent
9f9c1700b0
commit
2a27de0fb0
@ -17,8 +17,8 @@
|
||||
{ I think we should use the pascal version, this code isn't }
|
||||
{ much faster }
|
||||
|
||||
{$define FPC_SYSTEM_HAS_FPC_INITIALIZE}
|
||||
|
||||
{ $define FPC_SYSTEM_HAS_FPC_INITIALIZE}
|
||||
{
|
||||
Procedure fpc_Initialize (Data,TypeInfo : pointer);[Public,Alias:'FPC_INITIALIZE']; {$ifdef hascompilerproc} compilerproc; {$endif}
|
||||
assembler;
|
||||
asm
|
||||
@ -60,6 +60,9 @@ asm
|
||||
jmp .LExitInitialize
|
||||
// Variants
|
||||
.LDoVariantInit:
|
||||
movl Data,%eax
|
||||
pushl %eax
|
||||
call FPC_VARIANT_INIT
|
||||
jmp .LExitInitialize
|
||||
// dynamic Array
|
||||
.LDoDynArrayInit:
|
||||
@ -132,10 +135,10 @@ asm
|
||||
pop %ebx
|
||||
pop %eax
|
||||
end;
|
||||
}
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_FPC_FINALIZE}
|
||||
|
||||
{$ define FPC_SYSTEM_HAS_FPC_FINALIZE}
|
||||
{
|
||||
Procedure fpc_finalize (Data,TypeInfo: Pointer);[Public,Alias:'FPC_FINALIZE']; {$ifdef hascompilerproc} compilerproc; {$endif}
|
||||
assembler;
|
||||
asm
|
||||
@ -248,7 +251,7 @@ asm
|
||||
pop %ebx
|
||||
pop %eax
|
||||
end;
|
||||
|
||||
}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_FPC_ADDREF}
|
||||
|
||||
@ -480,7 +483,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2001-08-01 15:00:10 jonas
|
||||
Revision 1.11 2001-11-14 22:59:11 michael
|
||||
+ Initial variant support
|
||||
|
||||
Revision 1.10 2001/08/01 15:00:10 jonas
|
||||
+ "compproc" helpers
|
||||
* renamed several helpers so that their name is the same as their
|
||||
"public alias", which should facilitate the conversion of processor
|
||||
|
@ -23,6 +23,7 @@ Procedure fpc_Initialize (Data,TypeInfo : pointer);saveregisters;[Public,Alias :
|
||||
already defined or not so define it locally to avoid problems PM }
|
||||
Type
|
||||
Pbyte = ^Byte;
|
||||
|
||||
Var Temp : PByte;
|
||||
I : longint;
|
||||
Size,Count : longint;
|
||||
@ -54,6 +55,8 @@ begin
|
||||
With PRecRec(Temp)^.elements[I] do
|
||||
int_Initialize (Data+Offset,Info);
|
||||
end;
|
||||
tkVariant:
|
||||
variant_init(Variant(PVarData(Data)^))
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
@ -74,7 +77,7 @@ Var Temp : PByte;
|
||||
begin
|
||||
Temp:=PByte(TypeInfo);
|
||||
case temp^ of
|
||||
tkAstring,tkWstring : AnsiStr_Decr_Ref(Data);
|
||||
tkAstring,tkWstring : fpc_AnsiStr_Decr_Ref(Data);
|
||||
tkArray :
|
||||
begin
|
||||
Temp:=Temp+1;
|
||||
@ -97,6 +100,8 @@ begin
|
||||
With PRecRec(Temp)^.elements[I] do
|
||||
int_Finalize (Data+Offset,Info);
|
||||
end;
|
||||
tkVariant:
|
||||
variant_clear(Variant(PVarData(Data)^))
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
@ -207,7 +212,10 @@ procedure fpc_FinalizeArray(data,typeinfo : pointer;count,size : longint); [Publ
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 2001-08-01 15:00:10 jonas
|
||||
Revision 1.6 2001-11-14 22:59:11 michael
|
||||
+ Initial variant support
|
||||
|
||||
Revision 1.5 2001/08/01 15:00:10 jonas
|
||||
+ "compproc" helpers
|
||||
* renamed several helpers so that their name is the same as their
|
||||
"public alias", which should facilitate the conversion of processor
|
||||
|
@ -117,6 +117,7 @@ Type
|
||||
{$endif SUPPORT_EXTENDED}
|
||||
|
||||
PSmallInt = ^Smallint;
|
||||
PShortInt = ^Shortint;
|
||||
PInteger = ^Longint;
|
||||
PByte = ^Byte;
|
||||
PWord = ^word;
|
||||
@ -554,7 +555,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.38 2001-11-07 14:59:20 michael
|
||||
Revision 1.39 2001-11-14 22:59:11 michael
|
||||
+ Initial variant support
|
||||
|
||||
Revision 1.38 2001/11/07 14:59:20 michael
|
||||
+ Moved PathDelim,DriveDelim,PathSep to sysutilh
|
||||
|
||||
Revision 1.37 2001/11/07 13:52:37 michael
|
||||
|
Loading…
Reference in New Issue
Block a user