Commit Graph

68185 Commits

Author SHA1 Message Date
Nikolay Nikolov
8b00598cab * set the last=true property of the last tai_local in the locals list in the
beginning of insert_localslist, instead of in the end of prepare_locals
2023-10-18 01:52:44 +03:00
Nikolay Nikolov
5b64e5b957 * insert the wasm locals asm list after resolve_labels_complex, since it will (in the future) be able to allocate more locals, in order to resolve the branches and goto 2023-10-18 01:51:11 +03:00
Nikolay Nikolov
e81cff0408 * moved the insertion of the wasm locals asmlist to a local subroutine 2023-10-18 01:50:31 +03:00
Nikolay Nikolov
0e39e7c12d * moved the preparation of the locals asm list in tcpuprocinfo.postprocess_code to a local subroutine 2023-10-18 01:47:42 +03:00
Nikolay Nikolov
db23f54f8c * Local var templist renamed localslist. No functional changes. 2023-10-18 01:41:25 +03:00
Nikolay Nikolov
edabca1447 + added and implemented tcpuprocinfo.AllocWasmLocal 2023-10-18 00:48:45 +03:00
Nikolay Nikolov
d911e462b2 + added support for params and results in tai_wasmstruc_if.ConvertToBrIf 2023-10-17 03:00:23 +03:00
Nikolay Nikolov
c2173185e7 + added method tai_wasmstruc_if.ConvertToBrIf 2023-10-17 02:11:46 +03:00
Nikolay Nikolov
bc7b113e09 + convert wasm structured list to flat list 2023-10-17 00:14:12 +03:00
Nikolay Nikolov
ea18d11d41 * fixed crash in map_structured_asmlist_inner, when the TAsmList parameter is nil 2023-10-16 23:22:10 +03:00
Nikolay Nikolov
e0c41ebc5a * fixed hang in map_structured_asmlist_inner 2023-10-16 23:21:28 +03:00
Nikolay Nikolov
3c19adda78 * moved the code that converts branch numbers to labels in the cpupi unit and call it from resolve_labels_complex 2023-10-16 23:09:56 +03:00
Nikolay Nikolov
c48a8ad31f + added ait_wasm_structured_instruction to the SkipLineInfo set 2023-10-16 23:05:10 +03:00
Nikolay Nikolov
3892bb265e + always call resolve_labels_complex, if DEBUG_WASM_GOTO is defined.
+ define DEBUG_WASM_GOTO in ppcwasm32.lpi (but not in the makefiles)
2023-10-16 23:04:11 +03:00
Nikolay Nikolov
6aa1f3686e + in case of unresolved labels, call resolve_labels_complex, which will eventually implement the stackifier algorithm. Currently, it converts the asmlist to structured. 2023-10-16 22:57:56 +03:00
Nikolay Nikolov
267b99a8aa + added code for creating labels, associated with blocks and converting branch with consts to the corresponding block's label 2023-10-16 22:39:32 +03:00
Nikolay Nikolov
e318348372 + added a block stack parameter to TAsmMapFunc 2023-10-16 20:55:53 +03:00
Nikolay Nikolov
3f4c41b45f + introduced twasmstruc_stack 2023-10-16 20:38:56 +03:00
Nikolay Nikolov
c97fa0a05d + introduced map_structured_asmlist 2023-10-14 02:18:47 +03:00
Nikolay Nikolov
8e66041b79 + fix for the conversion of try..catch blocks to structured form 2023-10-05 20:50:24 +03:00
Nikolay Nikolov
11b743fd6a + also check for unexpected delegate instructions when converting to wasm structured form 2023-10-05 20:40:27 +03:00
Nikolay Nikolov
3a85a5a9cf + also debug print structured try..catch and try..delegate blocks 2023-10-05 20:37:55 +03:00
Nikolay Nikolov
84f0b94549 + more consistency checks for unexpected instructions when converting to wasm structured instruction form 2023-10-05 20:24:43 +03:00
Nikolay Nikolov
089e7ca6c8 + added compiler internal error when encountering certain unexpected wasm instructions (indicating improper nesting) 2023-10-05 20:19:08 +03:00
Nikolay Nikolov
595402cac7 + added else to case statement to avoid warning 2023-10-05 19:19:59 +03:00
Nikolay Nikolov
a5f1600275 + avoid more warnings 2023-10-05 19:12:26 +03:00
Nikolay Nikolov
da4980c4c0 + added else to case statement, avoid the warning, produce an internal error in this unexpected case 2023-10-05 19:05:39 +03:00
Nikolay Nikolov
16b14c574e * constructors made public to avoid warnings 2023-10-05 18:58:45 +03:00
Nikolay Nikolov
df2488ea6e * shorten the string for ait_wasm_structured_instruction in taitypestr to fit in string[24] 2023-10-05 18:50:01 +03:00
Nikolay Nikolov
1a26c0ccfe + for debug purposes print wasm structured instructions in the llvm-mc assembler output 2023-10-05 18:27:49 +03:00
Nikolay Nikolov
0680ea46c8 * set typ of wasm structured instructions to ait_wasm_structured_instruction 2023-10-05 15:15:19 +03:00
Nikolay Nikolov
6ff4031398 * fixed more bugs in the wasm structured asmlist construction 2023-10-05 15:09:05 +03:00
Nikolay Nikolov
fff60f9f67 * fixed bug in wasm_convert_to_structured_asmlist 2023-10-05 15:04:42 +03:00
Nikolay Nikolov
a37430c245 + added code for converting wasm asmlists to structured lists (i.e. lists, using the new wasm structured instructions classes) 2023-10-03 23:35:46 +03:00
Nikolay Nikolov
dec6255a19 + introduced classes for WebAssembly structured form of instructions 2023-10-03 18:47:37 +03:00
Nikolay Nikolov
9996c935ea Merge branch 'main' into wasm_goto 2023-10-03 16:12:13 +03:00
Pierre Muller
d9ad6bdd1f Avoid troubles with exported directories 2023-10-03 10:14:04 +00:00
Michaël Van Canneyt
123481aa8d * Minor improvements of EncodeUri. Fixes issue #40455 2023-10-03 08:59:41 +02:00
Pierre Muller
e11838c5bd Regenerate amiga, embedded, and go32v2 Makefile's 2023-10-02 22:27:17 +02:00
Pierre Muller
261e66fb84 go32v2 dos unit depends on go32 unit. 2023-10-02 22:27:17 +02:00
Pierre Muller
9845d15162 Cleanup sinclairql Makefile.fpc 2023-10-02 22:27:17 +02:00
Pierre Muller
9a9e2e4ae5 amiga and embedded Makefile.pfc changes
Remove RESUNIT rule from amiga/Makefile.fpc, as fpintres and fpextres are both treated inside inc/Makefile.rtl
  Use CPU_COMMON_UNITS for embedded rules.
2023-10-02 22:27:17 +02:00
Michaël Van Canneyt
ab4db7f475 * Fix OnChange being fired twice when adding an object. Fixes issue 40261 2023-10-02 22:17:59 +02:00
Michaël Van Canneyt
113add75cc * Fix issue #40454 2023-10-02 10:15:24 +02:00
Pierre Muller
ca0fbc1de6 Regenerate Makefile's after system rule changes 2023-09-29 17:44:35 +02:00
Pierre Muller
70d25e3b60 Remove OS spefic rules for system unit.
Use SYSDEPS variable to add specific dependencies.
  Override FPC_SYTEM_OPT to add OS specific options.
  Use SYSTEMUNIT variable.
2023-09-29 17:44:35 +02:00
Pierre Muller
b9544ad342 Add SYSTEMDIR variable (needed for BSD OSes) 2023-09-29 17:44:34 +02:00
Pierre Muller
da1bffd3a6 Regen 2023-09-29 17:44:34 +02:00
Pierre Muller
8533759737 syscall unit doesn't depend on unixtype, nor baseunix units for BSD OSes 2023-09-29 17:44:34 +02:00
Frederic Kehrein
ba55932929 Fixing trying to consume ID for anonymous switch field 2023-09-28 22:42:49 +00:00