Commit Graph

54912 Commits

Author SHA1 Message Date
Mattias Gaertner
9d079bfb97 pastojs: generate elevated local types as vars
git-svn-id: trunk@40722 -
2019-01-01 12:17:22 +00:00
florian
a2cee252e8 * when optimizing range checks in case nodes, unsigned comparisions must be used, resolves #34782
git-svn-id: trunk@40721 -
2019-01-01 01:11:13 +00:00
nickysn
635a6c7ef8 * fixed msdos .com file generation
git-svn-id: trunk@40720 -
2018-12-31 17:41:31 +00:00
Mattias Gaertner
3099c4db18 pastojs: test precompiled local types
git-svn-id: trunk@40715 -
2018-12-31 14:30:37 +00:00
Mattias Gaertner
f2625dd206 fcl-passrc: resolver: class constructor/destructor
git-svn-id: trunk@40714 -
2018-12-31 14:29:39 +00:00
Mattias Gaertner
7b050bb17c pastojs: generate all local types in global function
git-svn-id: trunk@40712 -
2018-12-31 10:48:14 +00:00
joost
d63f6ad9d5 * Do not try to write a fppkg compiler-configuration file when the
fppkg.cfg file has not been written, but raise an error instead.

git-svn-id: trunk@40711 -
2018-12-31 00:15:33 +00:00
florian
1641585655 * updated bcase.pp benchmark by Gareth Moreton, now used also as test
git-svn-id: trunk@40710 -
2018-12-30 22:21:03 +00:00
Mattias Gaertner
8604d83436 pastojs: fixed tests
git-svn-id: trunk@40708 -
2018-12-30 09:40:01 +00:00
Mattias Gaertner
b1752fb4ce fcl-js: omit brackets on associative operations (a||b)||(c||d), (a&&b)&&(c&&d), (a|b)|c, (a&b)&c, (a^b)^c, (a+b)+c, (a-b)-c, (a*b)*c
git-svn-id: trunk@40707 -
2018-12-30 09:39:46 +00:00
florian
bd4b7a6bc4 * more case fixes
git-svn-id: trunk@40706 -
2018-12-29 21:53:52 +00:00
joost
514c0e06a5 * Fixed mem-leak of packagevariant
git-svn-id: trunk@40705 -
2018-12-29 20:27:46 +00:00
svenbarth
dada756828 * also enable published for TObjA so that the test fails for the correct reason
git-svn-id: trunk@40704 -
2018-12-29 19:23:19 +00:00
svenbarth
f31aa97261 + add a callback implementation for the Win64 calling convention
git-svn-id: trunk@40703 -
2018-12-29 19:21:30 +00:00
svenbarth
9642d210c0 * method pointers are also returned by parameter
git-svn-id: trunk@40702 -
2018-12-29 19:21:27 +00:00
svenbarth
147dd4021d + add functions that abstract working with virtual memory across targets for use with callbacks (for now only Windows is implemented; *nix targets should come next)
git-svn-id: trunk@40701 -
2018-12-29 19:21:23 +00:00
svenbarth
30b1a45704 + add tests for TMethodImplementation for method and procedure variables
git-svn-id: trunk@40700 -
2018-12-29 19:21:20 +00:00
svenbarth
d3acbc1784 + add ability to create method implementations for method and procedure variables (Delphi does not support this, but I see no reason to prohibit this...)
git-svn-id: trunk@40699 -
2018-12-29 19:21:16 +00:00
svenbarth
f97688a07b + add TMethodImplementation class
git-svn-id: trunk@40698 -
2018-12-29 19:21:12 +00:00
svenbarth
9a23613b9d * rework low level callback API
git-svn-id: trunk@40697 -
2018-12-29 19:21:09 +00:00
svenbarth
feff0c673f * move some types to the top of the unit
git-svn-id: trunk@40696 -
2018-12-29 19:21:05 +00:00
svenbarth
c3081f7cf3 * fix Comp type casts to QWord and Int64
git-svn-id: trunk@40695 -
2018-12-29 19:21:02 +00:00
svenbarth
2c20643ba6 * fix ShortString handling in TValue (always the maximum length of the corresponding ShortString type is allocated)
git-svn-id: trunk@40694 -
2018-12-29 19:20:58 +00:00
svenbarth
17c3354f9c + provide IValueData's ExtractRawData(NoCopy)() in TValue (and also implement it for non-heap types)
git-svn-id: trunk@40693 -
2018-12-29 19:20:54 +00:00
svenbarth
bef1b84d63 * move utility code to a separate unit
git-svn-id: trunk@40692 -
2018-12-29 19:20:51 +00:00
Mattias Gaertner
3c9a5e5602 pastojs: create local record types in global scope
git-svn-id: trunk@40691 -
2018-12-29 13:55:37 +00:00
joost
f465826ba9 * Repositories from the include-files must be processed between the global and user repositories
git-svn-id: trunk@40690 -
2018-12-29 11:45:51 +00:00
joost
953cc76a7b * Added ability to force a build during an installation (buildinstall)
git-svn-id: trunk@40689 -
2018-12-29 11:35:59 +00:00
joost
4eadd2ce16 * TFPPackage.PackageVariants added
git-svn-id: trunk@40687 -
2018-12-28 23:37:18 +00:00
florian
f6e32ae90e * (modified) path by Gareth Moreton to fix case handling
git-svn-id: trunk@40686 -
2018-12-28 20:56:43 +00:00
Mattias Gaertner
7e777f513e fcl-passrc: resolver: for item in AdvRecord do
git-svn-id: trunk@40685 -
2018-12-28 19:36:32 +00:00
Jonas Maebe
df598f1868 * update alignment values for Darwin
git-svn-id: trunk@40684 -
2018-12-28 19:01:11 +00:00
Jonas Maebe
7b313a2c15 * stop searching for methods to implement interfaces in parent classes after
encountering a method with the correct name that does not have the
    "overload" directive (same logic as when looking for a call candidate,
    to avoid errors when using a Pascal-level wrapper to call interface
    methods, and Delphi-compatible since it always required "overload" for
    overloaded methods)
   o also catches calling convention mismatches like in webtbs/tw27349

git-svn-id: trunk@40683 -
2018-12-28 18:25:58 +00:00
Jonas Maebe
dee1056546 * fixed wrong change of jumpalignmax from 10 to 16 in previous commit
o renamed jumpalignmax and coalescealignmax to jumpalignskipmax/
     coalescealignskipmax to better reflex the meaning of these setting
     (and the difference in meaning to e.g. constalignmax)

git-svn-id: trunk@40682 -
2018-12-28 13:22:50 +00:00
Jonas Maebe
9a797b9f49 * changed maxjumpalign:10 to 16
* changed (max)jumalign for Darwin/x86_64 from 0 to 16

git-svn-id: trunk@40681 -
2018-12-28 12:06:46 +00:00
florian
9c03c29856 * not all targets support the tls-model switch, use it only if section thread vars are used
git-svn-id: trunk@40680 -
2018-12-27 23:14:38 +00:00
florian
ce81e50907 * better code alignment for x86_64-win64 and x86_64-linux
git-svn-id: trunk@40679 -
2018-12-27 22:07:30 +00:00
florian
917de001d6 * patch (slighly modified) by Christo Crause to write 16 bit registers on avr in hi/lo order, resolves #34721
git-svn-id: trunk@40678 -
2018-12-27 21:41:36 +00:00
florian
a7c347fe56 * pass used tls model to the assembler
git-svn-id: trunk@40677 -
2018-12-27 20:54:14 +00:00
florian
7f5c2fa3aa * (modified) patch by Gareth Moreton: Speed improvement in case blocks, resolves #0034762
This patch improves the compiler where "case" statements are concerned, using jump tables more often and creating more efficient machine code in some situations:
  * If a case block only contains one branch (not including the else block), the initial range check is removed, since this becomes wasted effort.
  * If the else block is empty, the else label is set to the end label - though this doesn't decrease the code size, it takes a bit of strain off the peephole optimizer.
  * On -O2 and above, some node analysis is now done on the branch labels. Most of the time this just redirects it to the end
    label for empty blocks, but if the block contains a goto statement, it will redirect it to its destination instead,
    thus increasing performance by not having multiple jumps (this won't get picked up by the peephole optimiser if the label addresses are in a jump table).
  * Some checks now use what I call the 'true count' rather than the 'label count'. The true count includes each
    individual value in a range - for example, 0..2 counts as 3. This increases the chance that a jump table will be
    utilised in situations where it is more efficient than a linear list.
  * For jump tables, if the case block almost covers the entire range (32 entries or fewer from full coverage),
    the initial range check is removed and the gaps included in the jump table (pointing to the else label).

git-svn-id: trunk@40676 -
2018-12-27 18:31:55 +00:00
Mattias Gaertner
75ab803528 pastojs: fixed Result.Free
git-svn-id: trunk@40675 -
2018-12-27 09:38:09 +00:00
Mattias Gaertner
2d94d97887 fcl-passrc: resolver: function result is writable
git-svn-id: trunk@40674 -
2018-12-27 09:37:51 +00:00
svenbarth
f0753517b4 * fix compilation on platforms that *do* have a Comp type
git-svn-id: trunk@40673 -
2018-12-27 09:21:45 +00:00
Mattias Gaertner
324a645bb5 pastojs: fixed compile
git-svn-id: trunk@40672 -
2018-12-27 08:18:26 +00:00
Mattias Gaertner
19836867da fcl-passrc: resolver: test adv records
git-svn-id: trunk@40671 -
2018-12-27 08:18:13 +00:00
svenbarth
0f83458513 * previous Invoke() related commit also correctly fixed Mantis #34509
git-svn-id: trunk@40670 -
2018-12-26 22:59:48 +00:00
svenbarth
9eac2ea852 * correctly handle record, set and array results if no extended parameter information is available
git-svn-id: trunk@40669 -
2018-12-26 22:59:45 +00:00
svenbarth
8c52dc30ce * move check for result location to separate function
git-svn-id: trunk@40668 -
2018-12-26 22:59:42 +00:00
svenbarth
cfd8df4894 + add tests for raw Invoke() which needs to determine the result location by itself
git-svn-id: trunk@40667 -
2018-12-26 22:59:39 +00:00
svenbarth
93e0cd9e1a * fix for Mantis #34496: correctly align stack so that SSE operations work correctly
git-svn-id: trunk@40666 -
2018-12-26 22:59:36 +00:00