PascalScript: update to origin git 466ab97b370687e7053a945d0a55aef7f260e7f3

git-svn-id: trunk@47387 -
This commit is contained in:
martin 2015-01-14 18:22:48 +00:00
parent c276a8b998
commit d2c5176f59
4 changed files with 17 additions and 3 deletions

View File

@ -4,15 +4,14 @@
{$ifndef mswindows}
{$DEFINE PS_NOIDISPATCH}
{$endif}
{.$if (fpc_version=2) and (fpc_release>=3) and (fpc_patch>=1)}
{$if (fpc_version=2) and ((fpc_release=2) and (fpc_patch>=4)) or (fpc_release>2)}
{$if (fpc_version>2) or ((fpc_version=2) and ((fpc_release=2) and (fpc_patch>=4)) or (fpc_release>2))}
{$UNDEF FPC_OLD_FIX}
{$DEFINE PS_STACKALIGN}
{$UNDEF PS_FPCSTRINGWORKAROUND}
{$DEFINE PS_RESBEFOREPARAMETERS}
{$DEFINE x64_string_result_as_varparameter}
{$ifdef mswindows}
{$if (fpc_version=2) and (fpc_release>5)}
{$if (fpc_version>2) or ((fpc_version=2) and (fpc_release>5))}
{$DEFINE PS_FPC_HAS_COM}
{$endif}
{$endif}

View File

@ -13143,6 +13143,9 @@ begin
{$ENDIF}
AddDelphiFunction('function Unassigned: Variant;');
AddDelphiFunction('function VarIsEmpty(const V: Variant): Boolean;');
{$IFDEF DELPHI7UP}
AddDelphiFunction('function VarIsClear(const V: Variant): Boolean;');
{$ENDIF}
AddDelphiFunction('function Null: Variant;');
AddDelphiFunction('function VarIsNull(const V: Variant): Boolean;');
AddDelphiFunction('function VarType(const V: Variant): TVarType;');

View File

@ -9374,6 +9374,9 @@ begin
RegisterDelphiFunction(@Unassigned, 'UNASSIGNED', cdRegister);
RegisterDelphiFunction(@VarIsEmpty, 'VARISEMPTY', cdRegister);
{$IFDEF DELPHI7UP}
RegisterDelphiFunction(@VarIsClear, 'VARISCLEAR', cdRegister);
{$ENDIF}
RegisterDelphiFunction(@Null, 'NULL', cdRegister);
RegisterDelphiFunction(@VarIsNull, 'VARISNULL', cdRegister);
{$IFNDEF FPC}
@ -9930,10 +9933,18 @@ end;
procedure CheckPackagePtr(var P: PByteArr);
begin
{$ifdef Win32}
if (word((@p[0])^) = $25FF) and (word((@p[6])^)=$C08B)then
begin
p := PPointer((@p[2])^)^;
end;
{$endif}
{$ifdef Win64}
if (word((@p[0])^) = $25FF) {and (word((@p[6])^)=$C08B)}then
begin
p := PPointer(NativeUInt(@P[0]) + Cardinal((@p[2])^) + 6{Instruction Size})^
end;
{$endif}
end;
{$IFDEF VER90}{$DEFINE NO_vmtSelfPtr}{$ENDIF}

View File

@ -543,6 +543,7 @@ begin
if not GetPtr(rp(Params[0])) then exit; // this goes first
RegUsage := 2;
EDX := Longint(_Self);
DisposePPSVariantIFC(Params[0]);
Params.Delete(0);
end else
{$ENDIF}