Commit Graph

63592 Commits

Author SHA1 Message Date
Nikolay Nikolov
6fe647ee3d * moved the default procedure CurrRaiseLabel to the end of the procedure, not
at the exit label. This fixes problems when using units with finalization
  code that contain classes with class destructors in branchful WebAssembly
  exceptions mode.
2021-10-22 13:54:55 +03:00
Nikolay Nikolov
470e77a572 + added sanity check when resolving labels to ensure we don't get any jumps with
negative nesting depth
2021-10-22 13:54:55 +03:00
Nikolay Nikolov
5a0956d805 * use WebAssembly asm labels for the raise branch instruction in branchful
exceptions mode
2021-10-22 13:54:55 +03:00
Michaël Van Canneyt
1b6219823b * Add test for case of pointer and size 2021-10-22 11:01:14 +02:00
Michaël Van Canneyt
ac9973490e * Fix missing assign of result. Issue ID #39415 2021-10-22 10:37:00 +02:00
mattias
d2a091ef85 pastojs: library: export var 2021-10-21 22:57:42 +02:00
Pierre Muller
f4580ff612 Fix compilation of nds and wii OS rtl 2021-10-21 22:09:05 +02:00
mattias
429438fbb9 pastojs: fixed clear com interface reference in class field on destroy 2021-10-21 20:02:22 +02:00
marcoonthegit
36ff644401 * fix for 39413
Update DwmApi to support new DWM windows attributes like Windows 8 cloaking, Windows 10 dark mode and new Windows 11 rounded corners

patch by Taufik Rahmad Hidayanto
2021-10-21 16:55:26 +02:00
florian
2ee6a81cff * extended test to cover last commit 2021-10-20 22:33:53 +02:00
florian
7baf2461f0 * check paramstr argument for negative values, resolves #39410 2021-10-20 20:04:32 +02:00
florian
3eefff75df * pass a randseed which is known to be problematic 2021-10-20 20:04:32 +02:00
mattias
4c544d7858 pastojs: library: export unitname.name as alias 2021-10-20 16:59:41 +02:00
mattias
203b5e636f fcl-passrc: test export unitname.name 2021-10-20 16:59:27 +02:00
mattias
afa1a549ac fcl-js: fixed TJSWriter.WriteExportStatement spacing 2021-10-20 15:00:38 +02:00
mattias
a4a469ae37 pastojs: library: export name 2021-10-20 14:56:05 +02:00
mattias
4546673a33 fcl-js: comments 2021-10-20 14:55:39 +02:00
Karoly Balogh
e018264ad9 internalerror if the section we're about to keep has no exesection assigned 2021-10-20 14:37:27 +02:00
Nikolay Nikolov
4e3a6aa5a8 * match the label to the wider block, if it is adjacent to both the brevious
and the next instruction
2021-10-20 14:35:52 +03:00
Nikolay Nikolov
c96e203780 * moved the 'end_block' WebAssembly instruction before the 'exit' label right
before the procedure finalization code. This fixes compilation errors in
  procedures with implicit finalization code (e.g. for ansistring local vars,
  etc).
2021-10-20 14:35:52 +03:00
Nikolay Nikolov
03513720a3 * fixed range check error in the DOS unit 2021-10-20 14:35:52 +03:00
Nikolay Nikolov
bb30958665 + wrap block nodes with exit in a_block..a_end_block instructions. This fixes
'exit' in inlined procedures on the WebAssembly target.
2021-10-20 14:35:51 +03:00
Nikolay Nikolov
703ae75ba6 * if a label cannot be associated with the previous block instruction, try
matching it with the next instruction
2021-10-20 14:35:51 +03:00
Nikolay Nikolov
9f077d4ac0 * leave unresolved branches in the asm output, when the compiler is compiled with -dEXTDEBUG 2021-10-20 14:35:51 +03:00
Nikolay Nikolov
1ce2fb8a4a * use WebAssembly asm labels for generating code for the 'exit' statement 2021-10-20 14:35:51 +03:00
mattias
2fa60d1af3 fcl-pasrc: error if exports section inside inside procedure 2021-10-20 11:53:40 +02:00
mattias
0aecf4d89f pastojs: library: create and call main 2021-10-20 11:32:54 +02:00
mattias
20ae686e31 pastojs: test unit linklib 2021-10-20 10:58:56 +02:00
mattias
3ceddfb2d6 pastojs: added test linklib 2021-10-20 10:37:32 +02:00
mattias
1e80ae406d pastojs: comments 2021-10-20 10:37:32 +02:00
Sven/Sarah Barth
b876a02daf * the libc unit might be deprecated, but it's no reason for wrong declarations, in this case values that should be declared as octal but were declared as decimal with the same literal text 2021-10-20 09:57:20 +02:00
Nikolay Nikolov
dc9090e67f * fixed some more warnings 2021-10-20 10:23:02 +03:00
Nikolay Nikolov
b3a9c36cbb * fixed some warnings 2021-10-20 10:03:14 +03:00
Nikolay Nikolov
0662a0bd44 + use WebAssembly asm labels for the code generation of 'break' statements as well 2021-10-20 09:59:54 +03:00
Nikolay Nikolov
01dc62b127 + introduced the use of asm labels for WebAssembly. Resolve them in
tcpuprocinfo.postprocess_code. Use them when generating code for the
  'continue' label jumps.
2021-10-20 09:39:44 +03:00
florian
e1698a5969 * when compiling with the main branch compiler, p2align with 3 parameters can be used now 2021-10-19 21:32:40 +02:00
Nikolay Nikolov
6921b968f1 - removed TWasiSearchRec.Mode, because it was unused 2021-10-19 17:31:02 +03:00
Nikolay Nikolov
8c39213d39 + implemented DOS.FSearch for WASI 2021-10-19 16:24:43 +03:00
Nikolay Nikolov
8e730d20db + implemented FindFirst, FindNext and FindClose in SysUtils for the WASI platform 2021-10-19 15:39:59 +03:00
Nikolay Nikolov
090cc8fa8f * moved the FindFirst/FindNext/FindClose code from unit DOS to WasiUtil, using
RawByteString. This will allow to reuse the same implementation in SysUtils.
2021-10-19 13:39:20 +03:00
Nikolay Nikolov
0ead28c1e0 - removed the RtlInfoType record, because it is only used only once in a local
variable. Use an anonymous record instead.
2021-10-19 12:01:14 +03:00
Nikolay Nikolov
6cd88575c6 - removed unused, commented out fields from the RtlInfoType record 2021-10-19 11:51:25 +03:00
Nikolay Nikolov
78c4585b53 * the FNMatch private helper function moved from unit DOS to unit WasiUtil, and
changed to have rawbytestring parameters, so it can be used from SysUtils as
  well.
2021-10-19 11:36:01 +03:00
Nikolay Nikolov
de3ab7e46b * added the fpc_wasi_path_readlink_ansistring helper function to unit wasiutil 2021-10-19 09:39:25 +03:00
Nikolay Nikolov
b2a0df0d10 * ConvertToFdRelativePath removed from the interface part of the WASI system
unit (to avoid cluttering the WASI system unit interface with platform
  dependent routines) and added to a new unit, called wasiutil
2021-10-19 09:06:56 +03:00
Pierre Muller
c616832792 Disable utils packages for wasi OS if required package is not supported or if labels are used (which is not supported for wasm32 target CPU) 2021-10-18 22:41:38 +00:00
Pierre Muller
d4e610dbc3 Disable utils/fpcmkcfg package for wasi OS as it requires packages/fpmkunit package 2021-10-18 22:03:42 +00:00
florian
7e73e0dd23 + support reading of .p2align with op code and/or max. bytes in the gas assembler reader
+ test
2021-10-18 22:12:27 +02:00
mattias
b8102dcdc0 fcl-js: fixed stackoverflow when freeing long binary list 2021-10-18 21:34:05 +02:00
mattias
6cfee2f5d5 fcl-passrc: updated lpi 2021-10-18 21:33:31 +02:00