Commit Graph

134 Commits

Author SHA1 Message Date
evgeny-k
f68967d58f problems with x32/x64 call were fixed 2022-09-19 15:49:35 +03:00
evgeny-k
a732050c7d problems with x32/x64 call were fixed 2022-09-12 16:48:38 +03:00
evgeny-k
957de21fe8 fpc: INVOKECALL support for arm/aarch64 2020-09-02 16:05:37 +03:00
Martijn Laan
f55409add2 Add PS_USECLASSICINVOKE to make it possible to avoid using InvokeCall.inc which was introduced by #207. Alse cleanup the case some of the directives here and make it work on AUTOREFCOUNT. 2020-02-20 15:48:25 +01:00
evgeny-k
b1286c1550 fix from #211 issue 2019-09-30 12:28:56 +03:00
Vizit0r
86a057c868 1)InvokeCall added, instead of all different callers (x86, x64, powerpc etc) for Delphi 2010+. (#207)
Tested on Win x86&x64, Android, MacOS32 - no problems observed.

2) Changes for correct MACOS compilation in Delphi

3) few changes and fixes for correct work on D7.
2019-08-26 06:49:56 +02:00
Vizit0r
51a015cbc5 1) fix of OPENARRAYOFU16 and OPENARRAYOFS16 declarations (#205)
2) DynArray "out of range" errors extended, now included info about curr index and array length
3) uPSUtils - takilng ansi string length from 0 index - changed to correct Length() calling.
4) added names forming for dynarrays when compiling.
2019-08-20 07:24:22 +02:00
Martijn Laan
bcf0f1b1b7 Fix warnings. Again, don't know exactly which version introduced each warning, kept it at Tokyo. 2019-02-03 14:06:51 +01:00
Martijn Laan
4ec845b79e Fix PropertyToString wide and Unicode strings bug. 2019-01-15 17:55:01 +01:00
uschuster
bdf127534e Fix for #180 (https://github.com/remobjects/pascalscript/issues/180) (#181)
- enables VarArrayGet/-Set for Delphi 6 or higher
- since D5 VarArrayGet seems not to be accessible the best solution is to negate $IFNDEF DELPHI6UP into $IFDEF DELPHI6UP
2018-07-03 13:49:49 +02:00
Martin
fa55490db0 Fix constructor 64bit (#167)
* use 64bit variant

* Fix registers for FPC constructor

* fix only fpc 3.0.0 and up
2017-10-28 17:12:13 +02:00
Martin
2dee370c51 fix compile (#162) 2017-10-26 15:21:17 +02:00
Pierre le Riche
8bd6ea180f The TPSTypeRec.CalcSize calculated the element size for base types btProcPtr and btPointer as 20 bytes under 64-bit, however it was assumed to be 24 bytes in several other places, thus leading to buffer overruns. This fix supersedes the patch for issue #150, changing the element size for both base types to 24 bytes and adjusting the code that previously assumed a size of 20 bytes. 32-bit code is not affected, since the element size was (and still is) 12 bytes in all cases. (#152)
An alternative approach would have been to fix all the places that previously treated the element size as 24 (as in the patch for issue #150), however an element size of 20 leads to misaligned pointers in array entries.

Signed-off-by: Pierre le Riche <git@pleasedontspam.me>
2017-06-12 14:45:29 +02:00
evgeny-k
d428ecc59f CPUX64 not implemented MyAllMethodsHandler 2017-06-12 11:15:17 +03:00
evgeny-k
68f9356704 X64 Windows Open Array Buffer Overrun 2017-05-24 12:37:06 +03:00
Uwe Schuster
57d7291d92 Fix for #122
- Fixed case of registered symbols using the case in Delphi sources
- Fixed formatting in method signatures
- put registration across multiple lines onto one line

    "...GAMONSERV'
     +'ER )');"

    -> "...gamOnServer)');"
2016-05-13 14:34:11 +02:00
Tomek Kołosowski
d06ea36c61 Fixed function VarType not exported in runtine in FPC 2016-02-09 21:27:57 +01:00
eferley
a3bcee5ecb Bug in TPSExec.RegisterFunctionName 2015-10-26 14:54:39 +01:00
Carlo Kok
47ec9e6f04 Update uPSRuntime.pas
0: Fix for delphi 7
2015-03-20 13:24:59 +01:00
pier
c3ee8c9ec0 fixed length('a') failure
fixed incorrect character handling when dealing with the function
"length". see #91
2015-01-29 11:19:57 +01:00
User4martin
40f888be2a Fix calling constructors on 64 bit 2015-01-14 19:49:21 +00:00
Carlo Kok
64bc64088e Update uPSRuntime.pas
fixes  FPC an define CPUX64 #96
2015-01-07 14:38:37 +01:00
Martijn Laan
db0d6f5211 Added VarIsClear on Delphi 7 and up. Might also be available under Delphi 6 but not sure. 2014-11-12 14:52:49 +01:00
Chau Chee Yang
d4f64bb62c Fix procedure CheckPackagePtr doesn't work in Win64 application built with runtime packages 2014-08-12 12:04:56 +08:00
Martijn Laan
97eefc260b Actually use MemDelta on TPSStack.AdjustLength. 2014-07-08 15:49:48 +02:00
Martijn Laan
4781459e35 Added static array support to GetArrayLength. 2014-05-28 12:17:35 +02:00
pchev
8ce29b39c5 Comobj support for FPC 2014-05-19 10:11:51 +02:00
Carlo Kok
bfe6ebdfbe Merge pull request #75 from velter/patch-5
x64 fix + warnings remove
2014-05-04 09:44:59 +02:00
velter
3ef8cb458c Try to fix FPC failure 2014-05-03 08:44:00 +02:00
velter
db15d67e76 Remove warnings
Implicit conversion from ansi to unicode
2014-04-08 17:33:30 +02:00
Carlo Kok
17250fabde Merge pull request #45 from VietSmall/patch-3
Update uPSRuntime.pas
2014-03-11 08:05:03 +01:00
Carlo Kok
96b415f190 Merge pull request #66 from geby/master
Removed undesirable typecast to WideString
2014-03-11 08:04:15 +01:00
Carlo Kok
1b6d5ac13b Merge pull request #70 from velter/patch-3
Remove warnings
2014-03-11 08:03:34 +01:00
evgenyk
2f5e0ceae1 0: D7: problem with compiling 2014-01-28 13:18:17 +02:00
velter
986be14bfd Cosmetic change
It's better to use the VUnicodeString when casting to UnicodeString. This does not change anything in the result, but make the code clearer.
2013-11-18 17:31:22 +01:00
velter
9770856284 Dynmaic array handling
Dynamic array handling is severely broken on delphi x64 because the array header layout is different from 32bit (related to issue #63).

This patch refactor the handling by defining the header structure as a record to access refcount and length. I have done basic testing on x32 and x64 (Delphi XE2) and this works for the tests I have done. The header definition I have found for FPC include a function to get the length (the old code ignore this). I'm not familiar enough with FPC and someone will need to check if this patch need some adjustment for FPC.
2013-11-18 17:18:38 +01:00
geby
b465a0cc9a PSGetUnicodeString was same as PSGetWideString. Removed undesirable typecast to WideString. Runtime is much faster now! 2013-11-07 14:11:34 +01:00
Carlo Kok
3c93994501 Merge pull request #37 from Shoozza/kylix-compatibility-fix
Fix Kylix compilation errors
2013-11-07 03:47:43 -08:00
Gregor A. Cieslak
d7c5abb24f Fix IF/IFEND breaking Delphi2/Delphi3 support 2013-11-07 09:49:35 +01:00
Martijn Laan
5389059108 Fix compiler warnings introduced by #39. 2013-10-13 10:11:41 +02:00
VietSmall
aeeb913dc8 Update uPSRuntime.pas
building script in osx
2013-06-25 15:18:01 +07:00
lewinjh
f8e612ceea - It is now possible to iterate over enumerations
- Added set functions Include and Exclude
2013-06-05 18:31:39 +10:00
Gregor A. Cieslak
85e8d5032b Fix Kylix compilation errors 2013-05-28 07:17:59 +02:00
Oliver Kuckertz
bb0fa50fe6 Fixed passing procedure pointers from scripts to native code on FPC (now passes a pointer via EDX, previously copied the raw data onto the stack)
Fixed destroying non-existent heap variant after calling a class property write helper
2013-05-09 21:37:37 +02:00
Martijn Laan
31abd29258 Fix Low/High/Inc/Dec's Int64 support. 2013-01-18 15:25:34 +01:00
Martijn Laan
ccad499426 Add StrToInt64Def.
Add comment pointing to the places where the standard funtions are defined.
2013-01-15 21:28:21 +01:00
Martijn Laan
cb79673bc5 The code for IntToStr on a Int64 doesn't actually work, fix it. Based on existing Int64ToStr implementation which does work. 2013-01-15 14:33:45 +01:00
Carlo Kok
557cf0038d Patch by Martin Friebe for issue #22. 2012-12-10 09:36:48 +01:00
Carlo Kok
a9e5df8d03 0: quick typo fix 2012-07-31 15:04:29 +02:00
evgenyk
e5a93a963f Fix classname case sensitivity
git-svn-id: http://code.remobjects.com/svn/pascalscript@262 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2012-03-22 19:04:55 +00:00