Description: Wasm rtl and wasm specific packages

This file as text.
(active) Revisions in this set:
711efc3e3aa0e87dddf71663036337434065bdcd,45620b11c0cca007cb38c94fc201cd8eef7875da,84b3036574bfcc4acb20b211afd2ae9df63f8f50
c69649782a27d9234c3c9d4f6f066fdb67a1e0e4,e830ed6cbc39f0b8899447a1e9f732aaccd49eba,0a384b09058aab280c58752a46916d8e53cd71e2
d3ce008cd3c8069b1b9cfae5f989c52c756a89ee,ba3383f7e350afb3ca07b3ed50941edbd4170604,bc08af99b04772a62fdae261eeb9ddfa8c147fed
144d7ed97896b31ce9c18cddbeb3ffb998aec35d,0af333bd0f04010aa86fca053d29b8c53bb01796,a7b3747b7beac97be48a3d868355c6dd564853f9
5ee902800cf318036eb74044e4e87ecc542b080f,5718b33dd868a8266c933a51547e168a301a7ca0,17fac45ddce93a1769433e72688eddea046cd597
539ea53babd8f10c5e1b2a2404bf2e2639a6ceeb,125dbdc21cd23fe9f4184d3c2444b1291439b154,ba1dcfc6a4136c6b8154ba16d05d977553b30160
953893267bb45dc8179f55da4c4c203468b2777c,25a9843ea4488a7fcd462ba7a20964c20933e96f,c48f27225e0ca6dccbcba86f3000f48f374df7a4
827f543289dd3f8ff80c09d36cad489b583c3410,720068360ea09dac6fcd35dd47e763baa5805c6b,a5309a5d0cdeb9791a4ac59f666aca5628ed6f0a
3fd6704582a29832f9aa518bd7a178cff083aef7,9efcd4e5548637e8c970dd693bd52b4c859ceeee,67c152092835268be95e6e35f1f31b50d6546bbd
90eb1351dcf77267e4a02a699b6f21ad2995ab2b,5ff2af5176ecef0e9f0deda6a007089f82d5840f,ca3f1d7b6d507c5f4f3e4d681b85cb9ad51b659d
4240279a848b8cc4dffb4dba278d3c1c1be60bb7,c275c3c7f2df5eaaaf1080d5685280062db1d246,afb9c2ae94e020a1061aaeaaf8d44bff2b95e797
5eac35664fa0a3df98a3fa7b6bbe8c129e5fe7c0,0219b4018cc400bb18f8ea3a924a5a0775186408,f0543ad8d523e40068359ddc096ad120c55cb5db
33e25a3dfed57b58ba8576e846e63779e8d6c9a0,73bc8edef3ad66e208cfb30fd0df3e13f3b9fbdf,91f0f1a86c293dbf972ed684ff196244f5292af4
3836b0be04762387513cd7f6b95246cd5fc5e295,02745b0b83f9ea4e1fc98a44f753d513dfebfe62,77ca8ba16d0a5ab9aa1b261b4d1b44c94a1aa2b3
30b503abc4e628dc3c2299595ee76dba48d308fc,a01a6021409f83d80ec80d95e73a66912d7d1211,c0cec218d64e082c373a6f973d4cf2f5798f84fa
d9eb8d75b9f6005cc36f66da635c46f3d4aad250,387c80cc57b691c887303cc224ee01dd46684a0d,e19fcd2b8b826c69b9ca97ab19eb9d9b49a4cf16
d134fc1ddfb6158945bc1751e0d2df1657f89a64,7533496505e52d2df2fa7bb3291c23adb91046c7,e078408dcf76a282a7336afeb5476c75779817cd
d45915b6ba0f99a70c51243377471bd834a5f541,bae50d80d246622a958d57c8dc70c3eff91b1b53,85ebd2c94c5fdad806ea96a1cdc3ff3400692dab
0d6b5338d0541b6a844d1d832b09b7709fe2948b,a62c7555d78f049c711cfd594455f73fa04b6620,64db584eefebcc5e5faeb287a9d10977adb4a886
25ac1380921c96b933673c8ec9f3e10da66f47d5,13c344a3a078430d212f2f523822c5810157a3d8,d7755a56f6fe705c8edfb955e0f071ac55ea5865
60d350f06788a6da9c2054f2dc2083066d9b10b7,a0e7882692432d6487acf60ae54218335f709233,27df4e98d2f1bf8e64b6037edd8d4643bd764809
aa4070ca8a2c27b818269b42c7470e5b7b03ddad,62846f54adbc08323ce660fbba6b33e1e0275d07,0bbc5a75280fa0ad0ee39e046dedd9d6d97ab90e
305393a9c11b8768a2aaa89ca8f1ff0e852ed94b,977b2f2a4bf7bda09554b034f2112d761d680517,09e61201d221bf098a42d5f994592f7df51a203f
14f361e13f82eceabe67317ba5e243d404419233,4c89eaa6cf12074ffed3b01cdcf30a6aa507aafd,05c6937fd9dd592eb643bc94d1e16c1f95dc6e82
c8d5bd77a31e088d4f5345a8294a27a75b3bf6c7,2a93340bcc22c2f6c45c22569b10a6d81ddadc56,38075ac30c61c95b9371b07312eede596bf0bd22
94d8c22c6ac229faf084188fe25bc04966a47d7a,068f781c7a21335ae04ed8e63a5c18f1a841280e,00d5bb5bbc52baad3f2e268c2d51ceba4b266b04
fe903f2ae413631591528c2ea9b33fcc05eac4e3,4dc0c37678ca9102dc0de687cf27963124bf9bdf,aafb471bc880fc20a9b73cf0d60f109163793794
1e5ecccdc663ca646632cbd46a1fe5905cba99ab,809277d2b15b2c4e713cf7fc81d284429e935c2b,7f7c5785fc77b0e697c15c69be56ba7c84bf2fc9
00aa7b8ab3843aa3d5521ffc1f15cd01c4814685,4e605fb7643902e82de03ef4b43aaa166c30a42f,ca242e9ad0e3ba047fcca8cc95fb8e41599d2d0b
c4d7773c0ed87047041bbf32d8773b70b75709aa,a55980bfb85a47c711b31f6ca6ccf3ad74c66d94,099a92733113b683be425b3400f744394ae2897d
0934df505cdf94d24ff93dcd6c23eefac8799795,34587a647f791f29c0ac26fec13059e516507c40,21d843128d02fffcb8126811c16846420d570c32
b2a0df0d10aa701c4e21d215c42fb78cfdf96f62,de3ab7e46b6c7f50723da61aa992b04145cb2472,78c4585b535666f6c2f99af64dcae76c5bbc1f30
6cd88575c63e91afaf914f9ff9a1c67e60c4408a,0ead28c1e05b6eaaf53455be86d8cb3dfc97c669,090cc8fa8f7e60f2bb0fa6fa6d21d17509f39564
8c39213d39eca0bfe89168734159f86bebbcbb4a,6921b968f1cdba59d2403a81c2950336ec2839af,03513720a3bab8b168cbb9707417c915d9654608
e091d263c84890f64ca8353fa837c4fd7eb94c37,769aeaae03f9eae322270f5800bf409e73fbbd2e,68cd1c39732449efc0e83adfc3d66dce80f1f9eb
1b22a68fc6be4fb51c57a5f01b5193abacab4cf1,e376851fd8aabb05ac93bc234ae06fd9ed0cdd32,47c271dcd0635ea584023800d66d1ef8ca5ec07e
a8b789d183513c381c0dc60c0cd50700e8909dfe,585d0cf5746ab85b5dc5a202606f8426d4a282ab,99d66b4c93821f5b4dfbc0fc236ad0c7626d5310
362cabe6845a0769cc8e7fcd4dd5c75a74a07a85,9ba01e7aee19489072b616647ec044ce03a14a43,7fa8f514af5bf6d2e1865353b34ab56d92b54e1b
219294c02b4129d8a063626c72dc3f867ab75680,7cac9d2f02bfc1d207b28974340503afbe68d00c,19cce3e42e46f010065146dec761dc6b00a6efc1
a916aa36d82bf3d37588c1118ad838940453e527,3cb4952745479eb8cd8b445951e8fd13f88b6fc5,4765d885dfacf93db8202c3b6217a806c09d0dcc
1ce1a0fe1fe3642b2daca5e16b1058cad0d3b5fb,9056887aaedd811e0518ebb1b98219b561e04cba,48f115686d105165d9637ffcfcce2f10b6192d9c
65d8c3d7ebef6ea5a893314b4a3267d3f1d6bcd6,e3139fea211474f8b31ac880c259ae68b8278c6f,27133cb66d75ae134110acf12f002d367ff04523
b93d49df9b4ba90f25219d3a4ba8536649646c09,4e4fcaa8a286fe959e1d6595f2d3781b9b893796,2ce2bab2a6f2e268642278219df9ec6857998e7f
f6beba0b0be3dc457baf08163f22a226dade7747,fb73ad3411add5e599beaf06b5b0da8bf9d7df05,0ec4203e2c2c99be4c5ec6763bd69a221244f9b9
08c8e0ec668cdaebfb9a8a0a6daa854b4f2b9e33,b97f3a08edca89cf8444a5261eb6e5e0fd141303,fa278564786c5ec7fee45d7bd3b3f4f2d253be6e
01589aa69367f1bc7160c3d86b1e8f2facf2353b,28dba2e7217c7cb560ec81fe6241d97349c3663d,9bb1cda8b5ccbb80e3d1a65cf6d490bb7bef7939
a36fca37f10da90ddc22569d6913ac7dcf9c14f4,f2d5deb26d396c86b9ff636540464d065647a91c,4c26e4f9894b85fe08694181a8b401a769863495
1da241c09cdd2e73286733fd00d39d8ba87cf9b5,0d375c638c3525021ac386e1985cbe35d14d85b4,5c9186a395b0fe1e118ec0122f468086d6107bcd
5dc62fae3b0cbe83c0208fcd4746a852b501b1b9,d74f81fda863cf65d6acccfd7e5120e646190c82,6a7524418a88fbcbba65b0172f047266eafead64
c4165a67a743517bd5cc39708cd8745cd1b1298c,27ab23681cb1bcf4829c99d54506b934333e3f5e,2a4f4ef420dba8797a3de8ac86ea30ea80cd1404
2824f592a3eb5fc687aa7e67f12be07aa99a245c,5bdef935f9b674313cf9ecae69696bbb9f9b88b9,b58f9bcfd08f1c9dcb58b4fbaaeea4005e2799b7
50370ff56d2eec973fb17f253b0f39a47ba7a356,2daf7f984f24ce54492ff8e1364592d705b0abe9,dbc3d6b98f66afad36744c718f39155fdaff8b12
0187580793af3512cb52831aede8af5dcb0a297d,3df063ad92962b0768b2dccb31457017390fdb3d,ec2e645719b35b7098c759c496e0308f48b88ef5
94912ab27474fef4d96349f091c504ad1e701531,7dcd89ede12e1d8f060ca5859a9c54de81ba7698,0e11fe0fc5f039939f2f85bc6896812fb1df0b83
ec21c75e05f33de9a5fbe7f7d1bab246f7a32dc0,d0a5b61b80a1c8ae6d8d0661833e9e1eb288244f,a49c0f6e0cc25a096b596e11ac5158b6a56bd96c
0c745fb257e71111588ac54b0bb4bd383751e82c,9cc08d91240df8fdc1809e3e7ece0f02d3df0946,824658874d7aa322b257688869899f15e5444805
4c3af63fad394c8e415aa459ba3d8cd305c525e1,8884c1967d07d267f78d90dff1dc9778c797957a,3fac1e7d5beacea815a2dddbd4674b027affe7e8
38ec27065b62932e0387ce4a7a998362a1f315b1,6d79054cff8fee91630149d9f439b22aa95b28c4,73867e47f92660f175f5bd2fa65d90e59825616d
4016e1accafec4aab026a040ad4e3145895d43d7,b530804eb6b28e9776875988cf3ea5dfbe7cc707,cb164667572a20b17818d90ea2279922404454f3
89cd72b71c8c567ef7f1f371860fc43faa7eb50b,0457690a8bc3590080fb5267e35311e8d19ca918,7fb83161b75365d9482736bc485e02f2cc5649c6
bcdd29b556776ae1ec8d3b81d4d926d19140fefa,afd7d9965ab56f5432773a3f472f1663f243a73a,951d2f394212678b0ec84648dcd2b57f3cca0b04
3160e45316babdd507b140acf2999fe102699377,303c0378e9dcd43ac922491017d1ab7c3f81ae13,e579da0844fc82f72b91622902c2671c7b7c831f
1a714d688a6365ae970c5b63d8ef74d7a9bb9e8d,2fb300c5c0ef04ab2832d7f6e32a5cd57811838b,038ecaef929dda1588b181c3058bad1ed56bb537
5de7084d35492e6ec6d4e3c4cf0cfac3d881195d,c6794dd7d73cd099ad0688483d8f215ba05c4821,8413c2b0732714300db387b1faacd8f1d9149fcc
b9a6b01c97afca09b44ebdf5bac8f91dfe7ff35e,1a93cad4f3db9fb747d23d9b16a75642c4ecc0ad,04b9bc77024bdfb7da727fe7648b1a3534c34072
6d45fd09a23252a391f48f1775747e0816e76674,a21dfc0245ff29ae5f23bc0a334c05aa43e9c4d3,a179ca8cf8c9e1a62bdff1e9693e55b9a1453ba3
692bd6235922a3c84f329e0fc8117d7e9b656151,41ead20bfb32f03c1b36bd4e98bdcb569345dba1,6a1eb520e961845b4a0e277fa57df4c6f138ea9d
e61240156247fac15c854294ec2a0d7dad1d2868,c2fcb1a8336cb9b40a43667c6489ebca7081da14,694341aa789e1bc5d3653e5a816cf102179ab554
bb93b918a5bae47027d01ab5dcf79d01147835f0,31bb06ac876543a509dc04d7af53b55db145d84c,801f902efed9527bcf5ee2cc44aa5d2262a9637d
74a4550ff01a1cee4fff5c5a5a7361729608613c,a417b0db9b9c8f19141be552e6e01da1e4057893,b340994e1b1f886bb660aed64e0981a954414d2b
60bb6c19d9a3fafd600b3f8de50fd2e9fc7c9184,68f41911192f5e8b63fbaf02badfdb5f85952df2,da597114427645ef37f4d1ad10c9c19d5d4ce23e
9d771396ff829f3fde3dae0ffb6ed5cef1064ddb,9e0b2869a3ecbb35eb9244db4352fe33a1513166,45ec51dc1f56e8511468583d99121cc942af05f3
25af7a4281eb9c7323320b0eaa5348a9daec39bf,d0b03c9c71369432011b0297674fd5bf0a5644df,f23cc9ec6d5a89bc61619e53c9eac8a57ef1dfbe
77d592221ac120ece3ab60730de6a00eb826761d,e03389c6a85ad2aa2ae11be193f3a95e1483cc31,fcfce9f2d582c9adb1435161d27a73a86381a6ad
a0e1dce1fded5e40a6a060a5e946503c3eb11a18,5d058258fc3fb182a42e750ad8ab09962bd2f4c5,af5c2d66c2337316c85d8541149ce3baab650cd3
37c32a9eb76ca90f6d984f52e0293cbd79cf6bfa,a81eac24838b7adaac46f50874b2a8c92aea593c,594b96e305e14f029b70a1330c6a96ca6e930972
02867fe9184d95890305bf5450d9b68171afd55d,200fbf64a11ef6df7276c50b9e7b3daa2dad87de,edf7b26f52d05ca09fb69043148acfa4785f4414
db1d903a119e29849948ba8cff90c6569ffe373b,1210747f1d4354b8f00054fb3ee496462e5c4f11,ce04ce42eddf132f110173b5ba7e4f103e835d17
017b41de89da93c848470f2f2140b6df019ac1aa,df26a02d9d6d3b000c185496259896d10835a3bf,c8b9eb3c5c693ab31bcd408f1015dbc14dbffbb0
4abbd82135800a4c79414bf252e153b76940b988,6dfd2de1882096019b27c144ffc2db2636b5d466,492e38069c9ca4eb6132fac300532840e4880a02
7fe6438d4483f66d347dbbe4205123743bd36ea1,a0ac317aae017c1bf828084410210324448661c9,919f8f383d208f340520a34a8ef2ea958474d1ae
1e6061845ee7923d066cc24f650ae3ddb0044976,3b0d2b329a8edcdfda5005bac6fcf1fbe2070ff5,0314ba9bfdcd7bd092506e692df7b84edfa9f648
ccbc28dd85650b3db35cd414fbcca3acc1331c1e,00e528996782c384b3a03cafbf18555420898147,aef32d5de98cdd07c1843ced826ed128b84a2ab3
51fdff0e7f8ab62b1f66450fa930af1d970118ab,46a9fcc5f93074c9c37fc2539cc9b19d094286f6,c0d6efaada138f939f067562354f1dc483c5f353
9600b5276ab4e010dfe8a316557c6757515598b8,1084346b005135274fdbd693dd1ff5b744e87707,3e2b0ac8b96d739b7f0b7f36d4ad432bd094a551
633f905b79f556c0782d6381294546ea61ecbe85,334102e3915212911b03280d719e874a35e9ee2d,1f0c72b6c18aaa6e2aefa9b6a250ccb461837e62
5ac4fd0b133541f705dd3478fb90a6f8f75ce70e,b18e3810499b15d3f0d4dd4c5612471523c18e68,ae83472a06f37feefb22a7906389ebb8d94d65a0
083ac5c1142ce6040133ec4da1318626367db612,368a77d75e78d0cae0c92ef4300117ed07afcc3d,2cefdd35b56c48ff4f48b119b9e13582e3940d2a
5a2b045388652a7640d3e8f3dfa0f69a9d7c15a5,e03e62f013cb259d43b056de85e8eba3fd61278b,74ea291454b64f8896d015fdc9bdaf6d5db18e7b
7b213bb4e6a3221062afc1b0d3c40580603f4b9d,fc0fb5968a98f3ba261cffbb679baa41eaf563c9,45f7be1b3c9485e7b3de3c5f48debca75b4bb559
9c4a354d7bf4eba9cd3453d780a55b6041836028,7f682589c7a33e74208b71c5aad347baab8313d6,4ac0781dd8b0882f761b4887697b88e9ce903c90
d775dadced3c86c4a530ab75a0bb13575f5cd4bd,573b82c67f58bda7f6cfb5cea54c49bbc4c962ed,4c8f718a8b7e27c98cbee65db0b163b6613243ba
8488c87b20efb6e3a934a9d71475ac3a24d9d6ef,40725146cc37345879b82d1edaba02fcf0687fff,f29fe358ad694e288b751a4632ffda7ed77305b8
925091d0d14658a943ff204e7f6a39819b42bc0f,5e813e62f24635c3947c5adb1efcf94dfedd2f0e,3e6ae3f887f9c69ccd23465b185b70fbe798acd1
d06dd9532c66a81d197ebfe12134a48e3d30102e,f270543bf4537afa59149e4fabe9c5a9d094f068,0b3d0594582bf3e2a12f56310f1e5fe5b8ad532d
637fa74c5c305cadcb0aad0c43b0f6a9a3c30888,008397cb492610afc8cce7a3d4b416daf4c60af0,708a479fdd177f27565d1c740c62266c590ab94b
7e89495a0950add0013733eb631483aa9ebf24e7,6286ff38cca83503949d91e60edd03639dd6056d,0977f0ac0d1ecf3284554b2613bbdd1bb03359a8
9e9153b2d30c088de589ccfe57351a14d902c4a1,a7978286190c9223ee9565ba4a7e577c2e81e2cf,1a21ea41b8cc67d92edd4e1ecfe05f9caf27052c
fc43e66f05361eae720d140f9b5613f431aa1967,2406b203bef98955ed957d2e5999a42b4c287758,d520f1df0baa2a96adb5f4506ff855419529ca82
cf73409470dd3688b070bc658b0f72c1621797ef,266a0af993498604899b2dd3586b7bd8ccbfaf8e,e867b540344e13681b040b234101f282f30cbe60
8353fa6c811f455e791f284b0c525ee4e38d725a,163f97b84e7c3728961f60ffe0f10e25001cf189,0a8f1b257dde0f079ef7344ce210ad5ee2dd2eea
fdc19ea05117ea6498fb1526cd4a2cd03735e83f,92eb7ba81fb19495c752ab10db47de92c973e8ab,17ae93f916438ff444b4eb0a8a1970412c35892e
eac5353bf5d14d1f8cef4c2b15d215cf15267d4d,ae7141fb8128e5bd55f1b24333f065d9a6954761,dd88451266b736440e0d4c0b315b80723efb444c
95cdffe28271dd0ae04a3f4c2036533e85ba7326,831e6c6d757d9a73226e2b02719bf48a38d8321a,4af9b675e2d6b4ddf08231bd8c27ec6d8b79572d
d3ac07ad274b6c6b09ff9b08a9d7007aaf780aa6,22d010b9053e943452247bb24886a052dd134d4c,6b133a30cf86bfa485434401fd2fdf1f2d578f19
4995b9f3d42a548c3a785d9c7f970197c5da5d8b,e59ed178daa619fe575dcab60bd4f9702e536132,563096b33ecf8bacce152fb7951ae81bd9d7967c

Clicking a revision will expand files
 


+ started working on the SysUtils unit for the WASI platform
Commit consists out of
  • M .gitattributes
  • A rtl/wasi/sysutils.pp


+ enabled compilation of unit math for the WASI target
Commit consists out of
  • M .gitattributes
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • A rtl/wasm32/mathu.inc


+ added classes unit for the WASI target (not yet enabled in the makefiles)
Commit consists out of
  • M .gitattributes
  • A rtl/wasi/classes.pp


+ added tthread.inc rtl include file for WASI
Commit consists out of
  • M .gitattributes
  • A rtl/wasi/tthread.inc


+ compile the unit dos (OS-specific functions are dummies for now) for the WASI target
Commit consists out of
  • M .gitattributes
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • A rtl/wasi/dos.pp


* enumerate preopened dirs on startup and store them in a list, accessible via global vars in the system unit
Commit consists out of
  • M rtl/wasi/system.pp


+ initial implementation of GetDir() for WASI
Commit consists out of
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/system.pp


+ keep also the fds for the current dirs
Commit consists out of
  • M rtl/wasi/system.pp


+ initial implementation of resolving relative paths
Commit consists out of
  • M rtl/wasi/sysfile.inc
  • M rtl/wasi/system.pp


+ implemented MkDir for the WASI target
Commit consists out of
  • M rtl/wasi/sysdir.inc


+ implemented RmDir for the WASI target
Commit consists out of
  • M rtl/wasi/sysdir.inc


+ implemented Erase() for the WASI target
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented do_truncate for the WASI target
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented Do_FilePos for the WASI target
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented Do_FileSize for the WASI target
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented Do_Seek and Do_Seekend for the WASI target
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented Do_Rename for the WASI target
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ also resolve absolute paths in ConvertToFdRelativePath
Commit consists out of
  • M rtl/wasi/system.pp


+ initial WASI implementation of DOS.GetFTime. Not working yet, due to a
compiler bug, related to the import of fd_filestat_get from the wasiapi unit.
Commit consists out of
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • M rtl/wasi/dos.pp


* also set doserror to 5 for access denied in dos.getfattr
Commit consists out of
  • M rtl/wasi/dos.pp


+ request the FD_FILESTAT_GET capability when opening files
Commit consists out of
  • M rtl/wasi/sysfile.inc


* fixed date calculation in WasiDateToDT
Commit consists out of
  • M rtl/wasi/dos.pp


+ workaround for newer wasmtime versions that don't report the fd type of
stdin/stdout/stderr. Always assume handles 0..2 are a device, so that
standard input and output are flushed.
Commit consists out of
  • M rtl/wasi/sysos.inc


+ request fd_seek and fd_tell rights when opening a file
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ request the rights to set size (truncate) and set times, when a file is opened for writing
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ request fd_allocate rights when opening a file for writing
Commit consists out of
  • M rtl/wasi/sysfile.inc


* changed the formatting of the setting of fs_rights_base in Do_Open. No functional changes.
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ request FD_DATASYNC and FD_SYNC rights when a file is opened for writing
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ always request FD_FDSTAT_SET_FLAGS rights
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ always request FD_ADVISE rights, when opening a file
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ always request pollfd_readwrite rights, when opening a file
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented Randomize
Commit consists out of
  • M rtl/wasi/system.pp


+ implemented environment variables support in the DOS unit for the WASI target
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/system.pp


+ started working on DOS.FindFirst
Commit consists out of
  • M rtl/wasi/dos.pp


+ initial working implementation of FindFirst/FindNext
Commit consists out of
  • M rtl/wasi/dos.pp


* use -1 instead of 0 for indicating empty DirFD
Commit consists out of
  • M rtl/wasi/dos.pp


+ added except_native.inc include file (empty for now, but will provide RTL
support for the native wasm exceptions in the future)
Commit consists out of
  • A rtl/wasm32/except_native.inc
  • M rtl/wasm32/makefile.cpu
  • M rtl/wasm32/wasm32.inc


+ RTL support for raising exceptions in native wasm exceptions mode
Commit consists out of
  • M rtl/wasm32/except_native.inc


* don't include except.inc if wasm32 native exception is turned on, instead
replace it with except_native.inc
Commit consists out of
  • M rtl/inc/objpas.inc
  • M rtl/wasm32/except_native.inc
  • M rtl/wasm32/wasm32.inc


* longjmp in fpc_reraise changed to a throw instruction intrinsic in wasm native exceptions mode
Commit consists out of
  • M rtl/wasm32/except_native.inc


+ implemented GetDate, GetTime and WeekDay in the WASI dos unit. They return
UTC time (I don't know how to obtain the local time zone from within WASI).
Commit consists out of
  • M rtl/wasi/dos.pp


* always return error in SysUtils.FindFirst and .FindNext on the WASI platform,
in order to prevent infinite loops in tests
Commit consists out of
  • M rtl/wasi/sysutils.pp


* instead of using the 'throw' intrinsic, set a boolean flag, in the branchful
exceptions support code
Commit consists out of
  • M rtl/wasm32/except_branchful.inc


- removed commented out code from the WASI startup code
Commit consists out of
  • M rtl/wasi/si_prc.pp


+ added unhandled exception handling code for the branchful exceptions mode
Commit consists out of
  • M rtl/wasi/si_prc.pp
  • M rtl/wasm32/except_branchful.inc


+ return a small, fake backtrace for WebAssembly, so that in case of a runtime
error, the message 'Runtime error XXX at $EEEEEEEE' appears.
Commit consists out of
  • M rtl/wasm32/wasm32.inc


+ default exception handling in WebAssembly native exceptions mode
Commit consists out of
  • M rtl/wasi/si_prc.pp
  • M rtl/wasm32/except_native.inc


+ implemented GetMsCount in the DOS unit for WASI
Commit consists out of
  • M rtl/wasi/dos.pp


+ implemented SysUtils.GetTickCount64 for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.Sleep for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.GetEnvironmentVariable, GetEnvironmentVariableCount and
GetEnvironmentString for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


* preopened dirs structure in the system unit modified to be a pointer to an
array of records
Commit consists out of
  • M rtl/wasi/system.pp


* preopen fd names and current dir changed to use ansistring, as well as the
parameters and result of ConvertToFdRelativePath. This will allow easier
implementation of ChDir.
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/sysfile.inc
  • M rtl/wasi/system.pp


* fixed handling of relative paths that are not directly relative to a preopened
dir in ConvertToFdRelativePath. This is a preparation for ChDir support.
Commit consists out of
  • M rtl/wasi/system.pp


+ implemented ChDir() for WASI
Commit consists out of
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/system.pp


- removed the DebugWriteXXX functions from the WASI system unit, since console
output is now quite stable and can be used for debugging
Commit consists out of
  • M rtl/wasi/system.pp
  • M rtl/wasm32/setjump.inc


* moved the preopened dir and current dir handling types and variables to the
implementation part of the system unit, so their implementation is not exposed
and can be changed in the future (e.g. for thread safety when WebAssembly
gets multithreading support, etc.)
Commit consists out of
  • M rtl/wasi/system.pp


* keep the drive string separate in the preopen and the current dir records on
the WASI platform
Commit consists out of
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/system.pp


* replaced ['/','\'] with AllowDirectorySeparators in the WASI directory
parsing code
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/system.pp


* replaced '/' with DirectorySeparator in the WASI directory parsing code
Commit consists out of
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/system.pp


* another instance of ['/','\'] replaced with AllowDirectorySeparators
Commit consists out of
  • M rtl/wasi/sysdir.inc


* use AllowDirectorySeparators, instead of checking for '/' and '\'
Commit consists out of
  • M rtl/wasi/system.pp


* use rawbytestring instead of ansistring for the WASI file name handling
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/sysfile.inc
  • M rtl/wasi/system.pp


+ implemented SysUtils.FileClose for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileOpen for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileCreate for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


- removed the zero constants from the implementation of SysUtils.FileOpen for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileRead for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


* fixed WASI bug in do_read, where the result of the __wasi_fd_read syscall function was ignored
Commit consists out of
  • M rtl/wasi/sysfile.inc


+ implemented SysUtils.FileWrite for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileSeek for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.RenameFile for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


- don't call ToSingleByteFileSystemEncodedFileName in SysUtils.FileOpen and
.FileCreate, because ConvertToFdRelativePath already calls it
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.DeleteFile for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileAge for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileSetDate for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ also implemented FileSetDate(FileName) for WASI, via the __wasi_path_filestat_set_times API call
Commit consists out of
  • M rtl/wasi/sysutils.pp


* fixed off-by-one error when initializing current_drive in the WASI system unit
Commit consists out of
  • M rtl/wasi/system.pp


* fixed range check error in HasDriveLetter when path is 1 character long
Commit consists out of
  • M rtl/wasi/system.pp


+ implemented SysUtils.FileExists for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


* don't set InOutRes in ConvertToFdRelativePath, but return it instead. This
fixes issues in places where this function is used in a way that should not
set IOResult.
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/sysfile.inc
  • M rtl/wasi/system.pp
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.DirectoryExists for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileGetSymLinkTarget for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


* always return an error in SysUtils.FileSetAttr on WASI - this function is not supported by the WASI API
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.FileGetAttr for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ dummy implementation of dos.SetFAttr for WASI, based on the Unix version
Commit consists out of
  • M rtl/wasi/dos.pp


+ implemented DOS.GetFAttr for WASI
Commit consists out of
  • M rtl/wasi/dos.pp


+ added platform-specific helper function dos.DTToWasiDate, similar to
DTToUnixDate on Unix
Commit consists out of
  • M rtl/wasi/dos.pp


+ implemented dos.SetFTime for WASI
Commit consists out of
  • M rtl/wasi/dos.pp


* fix for the WASI datetime to epoch conversion
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysutils.pp


+ implemented SysUtils.GetLocalTime for WASI
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ init the ansistring upper and lower case tables in the WASI SysUtils unit initialization
Commit consists out of
  • M rtl/wasi/sysutils.pp


+ added a wrapper function around __wasi_path_readlink that calls it iteratively
with doubling buffer sizes, starting with 64 bytes, until it reaches 16384
bytes, and reads the link into a rawbytestring. Use that function in all
places in the WASI rtl that need to read a symlink.
Commit consists out of
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/system.pp
  • M rtl/wasi/sysutils.pp


* 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
Commit consists out of
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • M rtl/wasi/dos.pp
  • M rtl/wasi/system.pp
  • M rtl/wasi/sysutils.pp
  • A rtl/wasi/wasiutil.pp


* added the fpc_wasi_path_readlink_ansistring helper function to unit wasiutil
Commit consists out of
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • M rtl/wasi/sysutils.pp
  • M rtl/wasi/wasiutil.pp


* 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.
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/wasiutil.pp


- removed unused, commented out fields from the RtlInfoType record
Commit consists out of
  • M rtl/wasi/dos.pp


- removed the RtlInfoType record, because it is only used only once in a local
variable. Use an anonymous record instead.
Commit consists out of
  • M rtl/wasi/dos.pp


* moved the FindFirst/FindNext/FindClose code from unit DOS to WasiUtil, using
RawByteString. This will allow to reuse the same implementation in SysUtils.
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/wasiutil.pp


+ implemented DOS.FSearch for WASI
Commit consists out of
  • M rtl/wasi/dos.pp


- removed TWasiSearchRec.Mode, because it was unused
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/wasiutil.pp


* fixed range check error in the DOS unit
Commit consists out of
  • M rtl/wasi/dos.pp


* Wasmtime support
Commit consists out of
  • M packages/fpmake_add.inc
  • M packages/fpmake_proc.inc
  • A packages/wasmtime/Makefile
  • A packages/wasmtime/Makefile.fpc
  • A packages/wasmtime/examples/gcd.lpi
  • A packages/wasmtime/examples/gcd.pp
  • A packages/wasmtime/examples/gcd.wat
  • A packages/wasmtime/examples/hello.wat
  • A packages/wasmtime/examples/helloworld.lpi
  • A packages/wasmtime/examples/helloworld.pp
  • A packages/wasmtime/examples/helloworld.wasm
  • A packages/wasmtime/examples/memory.lpi
  • A packages/wasmtime/examples/memory.pp
  • A packages/wasmtime/examples/memory.wat
  • A packages/wasmtime/examples/wasi.lpi
  • A packages/wasmtime/examples/wasi.pp
  • A packages/wasmtime/fpmake.pp
  • A packages/wasmtime/src/wasmtime.pp


* Add linking examples, change pcchar to pchar
Commit consists out of
  • M packages/wasmtime/examples/gcd.lpi
  • M packages/wasmtime/examples/gcd.pp
  • M packages/wasmtime/examples/helloworld.pp
  • A packages/wasmtime/examples/linking.lpi
  • A packages/wasmtime/examples/linking.pp
  • A packages/wasmtime/examples/linking1.wat
  • A packages/wasmtime/examples/linking2.wat
  • M packages/wasmtime/examples/memory.lpi
  • M packages/wasmtime/examples/memory.pp
  • M packages/wasmtime/src/wasmtime.pp


+ define USE_NOTHREADMANAGER in the WASI system unit
Commit consists out of
  • M rtl/wasi/system.pp


* Export wasiAlloc and wasiFree
Commit consists out of
  • M rtl/wasi/system.pp


* fixes to the WebAssembly atomic function intrinsics
Commit consists out of
  • M rtl/wasm32/cpuh.inc


+ implemented InterlockedIncrement, InterlockedDecrement, InterlockedExchange,
InterlockedCompareExchange and InterlockedExchangeAdd for WebAssembly in a
thread safe way, using the thread and atomics extension, when the RTL is
compiled with -dFPC_WASM_THREADS
Commit consists out of
  • M rtl/wasm32/wasm32.inc


* patch from Pierre for working around the exitcode <= 125 limitation in wasmtime
Commit consists out of
  • M rtl/wasi/system.pp
  • M tests/utils/dotest.pp


+ added unit WebAssembly for WebAssembly-specific stuff. Currently contains
the AtomicFence intrinsic, which emits the atomic.fence instruction.
Commit consists out of
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • A rtl/wasm32/webassembly.pp


+ added AtomicAdd() and AtomicSub() intrinsics to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


+ added AtomicAnd(), AtomicOr() and AtomicXor() to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


+ added AtomicExchange() to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


+ added AtomicCompareExchange() to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


+ added AtomicLoad() to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


+ added AtomicStore() to the WebAssembly unit
Commit consists out of
  • M rtl/wasi/Makefile
  • M rtl/wasi/Makefile.fpc
  • M rtl/wasm32/webassembly.pp


+ added AtomicWait() to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


+ added AtomicNotify() to the WebAssembly unit
Commit consists out of
  • M rtl/wasm32/webassembly.pp


* AtomicWait marked as inline
Commit consists out of
  • M rtl/wasm32/webassembly.pp


* Export wasiAlloc, wasiFree
Commit consists out of
  • M rtl/wasi/system.pp


* added non-atomic implementations of the atomic operations in the WebAssembly unit, used when the RTL is compiled without -CTwasmthreads
Commit consists out of
  • M rtl/wasm32/webassembly.pp


* Correct windows DLL name
Commit consists out of
  • M packages/wasmtime/src/wasmtime.pp


+ print more exceptions debug info, when the WebAssembly RTL is compiled with -dEXCDEBUG
Commit consists out of
  • M rtl/wasm32/except_branchful.inc
  • M rtl/wasm32/except_native.inc


* refactored duplicated code for epoch to datetime and vice versa conversion
between the dos and sysutils units for the WASI platform
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysutils.pp
  • M rtl/wasi/wasiutil.pp


+ setup a thread manager (functions are still not yet implemented), when the WASI RTL is compiled with multithreading support
Commit consists out of
  • M rtl/wasi/system.pp
  • A rtl/wasi/systhrd.inc
  • M rtl/wasm32/wasm32.inc


* Wasm Threads (WIP)
Commit consists out of
  • A rtl/wasi/wasmmutex.inc
  • A rtl/wasm32/wasmmem.inc


* Comment out debug in loop
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* Fix compilation without threads
Commit consists out of
  • M rtl/wasi/system.pp


* Char -> AnsiChar
Commit consists out of
  • M rtl/wasi/dos.pp
  • M rtl/wasi/sysdir.inc
  • M rtl/wasi/sysfile.inc
  • M rtl/wasi/system.pp
  • M rtl/wasi/sysutils.pp
  • M rtl/wasi/wasiinc/wasiprocs.inc
  • M rtl/wasi/wasiutil.pp


* string -> shortstring
Commit consists out of
  • M rtl/wasi/system.pp


* Remove PChar/PPChar/PPPChar defines, they are in the system unit
Commit consists out of
  • M packages/libcups/src/cupsdyn.pp
  • M packages/wasmtime/src/wasmtime.pp
  • M packages/winunits-jedi/src/jwawinldap.pas
  • M packages/winunits-jedi/src/jwawintype.pas


* PChar -> PAnsiChar
Commit consists out of
  • M packages/wasmtime/examples/gcd.pp
  • M packages/wasmtime/examples/helloworld.pp
  • M packages/wasmtime/examples/linking.pp
  • M packages/wasmtime/examples/memory.pp
  • M packages/wasmtime/examples/wasi.pp
  • M packages/wasmtime/src/wasmtime.pp


* Dotted filenames for package wasmtime
Commit consists out of
  • A packages/wasmtime/namespaced/Api.WasmTime.pp
  • A packages/wasmtime/namespaces.lst
  • M packages/wasmtime/src/wasmtime.pp


* since exporting webassembly globals doesn't yet work accross units, added a
workaround by using property getters and setters
Commit consists out of
  • M rtl/wasi/system.pp


+ added promising _start and _initialize exports
Commit consists out of
  • M rtl/wasi/si_dll.pp
  • M rtl/wasi/si_prc.pp


* WasmEdge library import
Commit consists out of
  • M packages/fpmake_add.inc
  • M packages/fpmake_proc.inc
  • A packages/wasmedge/Makefile
  • A packages/wasmedge/fpmake.pp
  • A packages/wasmedge/namespaced/Api.WasmEdge.pp
  • A packages/wasmedge/src/libwasmedge.pp


* Git did not add .lst files
Commit consists out of
  • A packages/wasmedge/namespaces.lst


* Fix compilation in unicode rtl
Commit consists out of
  • M packages/wasmedge/src/libwasmedge.pp


* Correctly load library, make this public
Commit consists out of
  • M packages/wasmedge/src/libwasmedge.pp


* Adjust wasmtime interface to latest version
Commit consists out of
  • M packages/wasmtime/examples/helloworld.pp
  • M packages/wasmtime/examples/wasi.pp
  • M packages/wasmtime/src/wasmtime.pp


* Enable monitor support
Commit consists out of
  • M rtl/aix/system.pp
  • M rtl/bsd/system.pp
  • M rtl/nativent/system.pp
  • M rtl/solaris/system.pp
  • M rtl/wasi/system.pp
  • M rtl/win32/system.pp
  • M rtl/win64/system.pp
  • M rtl/wince/system.pp


* Add wasm-job for webassembly
Commit consists out of
  • M packages/fpmake_add.inc
  • M packages/fpmake_proc.inc
  • A packages/wasm-job/fpmake.pp
  • A packages/wasm-job/namespaced/Wasm.Job.Js.pas
  • A packages/wasm-job/namespaced/Wasm.Job.Shared.pas
  • A packages/wasm-job/src/job.js.pas
  • A packages/wasm-job/src/job.shared.pas


* not automatically committed...
Commit consists out of
  • A packages/wasm-job/namespaces.lst


* Sample unit containing all browser apis
Commit consists out of
  • A packages/wasm-job/examples/job_web.pas


* Add create_object method
Commit consists out of
  • M packages/wasm-job/src/job.shared.pas


* Remove unqualified string type, use UTF8 string or Unicode string
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Create objects directly
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Constructor
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* More complete example with dictionaries as objects
Commit consists out of
  • M packages/wasm-job/examples/job_web.pas


* Add TypedArray constructor
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* New type of argument
Commit consists out of
  • M packages/wasm-job/src/job.shared.pas


* Fix memleak, objects created directly are owned by webassembly
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* set method for typed array
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Add length
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Global memory object
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Add constructor to TJSArray that accepts array of const
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Promise implementation and demo
Commit consists out of
  • A packages/wasm-job/examples/promisedemo.lpi
  • A packages/wasm-job/examples/promisedemo.lpr
  • M packages/wasm-job/src/job.js.pas
  • M packages/wasm-job/src/job.shared.pas


* Make methods protected, so one can override
Commit consists out of
  • M packages/wasm-job/examples/job_web.pas


* Allow to cache reject/resolve
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Getters & Setters for typed arrays
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Corrections for Float64
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Forgot to commit last version: allow to use thisid from function
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Hosting example for webassembly module
Commit consists out of
  • A packages/wasm-job/examples/WebHost/README.md
  • A packages/wasm-job/examples/WebHost/bulma.min.css
  • A packages/wasm-job/examples/WebHost/hostconfig-template.js
  • A packages/wasm-job/examples/WebHost/index.html
  • A packages/wasm-job/examples/WebHost/simpleserver.ini
  • A packages/wasm-job/examples/WebHost/webhost.lpi
  • A packages/wasm-job/examples/WebHost/webhost.lpr
  • R100 packages/wasm-job/examples/promisedemo.lpi packages/wasm-job/examples/promise-1/promisedemo.lpi
  • R100 packages/wasm-job/examples/promisedemo.lpr packages/wasm-job/examples/promise-1/promisedemo.lpr
  • A packages/wasm-job/examples/promise-2/promisedemo2.lpi
  • A packages/wasm-job/examples/promise-2/promisedemo2.lpr


* Corrections from samples
Commit consists out of
  • M packages/wasm-job/examples/WebHost/simpleserver.ini
  • M packages/wasm-job/examples/WebHost/webhost.lpr


* Fetch example, demo how to reconstruct object response
Commit consists out of
  • A packages/wasm-job/examples/fetch/loadstrings.lpi
  • A packages/wasm-job/examples/fetch/loadstrings.lpr
  • A packages/wasm-job/examples/fetch/lorem.txt


* Implement TJSArrayBuffer
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Define JSJSON to as to use static methods
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* in the WASI system unit initialization, call InitSystemThreads even if
FPC_WASM_THREADS is not defined (but FPC_HAS_FEATURE_THREADING is defined),
to initialize the nothread manager. This fixes various regressions when WASI
threading is disabled, caused by calls to nil pointer functions.
Commit consists out of
  • M rtl/wasi/system.pp


* Add new constructor for typed array with length
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* revert method property
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Correct Cast class functions which were recursively calling themselves instead of JOBCreate
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Add some utility properties
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* use an empty TThread implementation in rtl/wasi/tthread.inc, in case
FPC_WASM_THREADS is not defined
Commit consists out of
  • M rtl/wasi/tthread.inc


* Add Error.Message
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* NativeInt size depends on platform.
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Use Int32 for index
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Implement DataView
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Implement DataView properties
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Redefine (T|I)JSArrayBufferView
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Correct interface ArrayBufferView
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* API to show objects in webassembly runtime in browser
Commit consists out of
  • M packages/fpmake_add.inc
  • M packages/fpmake_proc.inc
  • A packages/wasm-oi/fpmake.pp
  • A packages/wasm-oi/src/wasm.debuginspector.api.pas
  • A packages/wasm-oi/src/wasm.debuginspector.rtti.pas
  • A packages/wasm-oi/src/wasm.debuginspector.shared.pas


* Remove debug writelns
Commit consists out of
  • M packages/wasm-oi/src/wasm.debuginspector.rtti.pas


* Set event handler-type properties
Commit consists out of
  • M packages/wasm-job/examples/job_web.pas


* String must not be shortstring
Commit consists out of
  • M packages/wasm-oi/src/wasm.debuginspector.api.pas


* Send properties sorted
Commit consists out of
  • M packages/wasm-oi/src/wasm.debuginspector.rtti.pas


+ implemented CheckInitialStkLen for the WASI target (just returns the parameter
stklen as a result value, unmodified)
Commit consists out of
  • M rtl/wasi/system.pp


* fixed WasiRTLCreateEvent to actually return the result
Commit consists out of
  • M rtl/wasi/systhrd.inc


* fixes to WebAssembly RTLEventWaitFor:
* correct conversion from milliseconds to nanoseconds (multiply by 1000000,
instead of 1000)
* use a negative timeout value, instead of 0, to indicate infinite wait
timeout. Using 0 with the 'wait' instruction indicates no wait at all.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* fixed WasiRTLEventWaitFor_WaitAllowed: second parameter is expected value to wait on (0), not wait to wait for (1)
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WasiRTLEventWaitFor_WaitNotAllowed: treat timeout of 0 as zero wait time,
instead of infinite time, for consistency with WasiRTLEventWaitFor_WaitAllowed
(and other platforms, such as Windows)
Commit consists out of
  • M rtl/wasi/systhrd.inc


* fixed WebAssembly InitMutex() and DoneMutex() - pass the parameter by reference
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* optimization in WebAssembly's MutexKind() function - mark the first parameter
as const, to avoid making a copy on the stack
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: set M.Locked to 0 on UnLockMutex
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* fixed conversion between milliseconds and nanoseconds in LockMutexTimeoutNoWait and LockMutexTimeoutWait
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* fix typo in comment
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly mutex: treat all negative values of aTimeoutMS as infinite, instead of just -1
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly mutex: changed the aTimeoutMS parameters of LockMutexTimeoutNoWait
and LockMutexTimeoutWait to int64, instead of longint, since they're called
from LockMutexTimeout, which takes an int64 parameter
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly mutex: changed the timeout parameter to be in nanoseconds (these
functions are only used internally, so this doesn't break compatibility)
Commit consists out of
  • M rtl/wasi/systhrd.inc
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: bug fixes in LockMutexTimeoutWait
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: fixed race condition LockMutex in the check where Locked
is 1, but Owner still holds the current thread id, even though another thread
has just acquired a lock, but still haven't updated the owner thread ID. We
avoid this problem by setting Owner to nil before unlocking the mutex. And in
InitMutex/DoneMutex, we store the creator thread ID in a different field -
Creator, instead of Owner.
Commit consists out of
  • M rtl/wasi/sysosh.inc
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: use atomic loads and stores for accessing TRTLCriticalSection.Locked
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: also access TRTLCriticalSection.Owner using atomic loads and stores
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: reformat code in LockMutexTimeoutNoWait for better
readability by removing begin..end blocks and replacing it with an 'else if'
chain. No functional changes.
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: fixed bug in LockMutexTimeoutNoWait, caused by the use of
Result instead of Res. This stupid bug broke WebAssembly critical sections,
causing random spurious hangs and it took me quite a lot of time to find it!
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


* WebAssembly threads: don't check for GetThreadState(MyThread)<>tsRunning in
LockMutexTimeoutWait and LockMutexTimeoutNoWait
Commit consists out of
  • M rtl/wasi/wasmmutex.inc


+ WebAssembly threads: initial implementation of the WASI threads proposal:

https://github.com/WebAssembly/wasi-threads

Note that the WASI folk have already declared this proposal 'obsolete' and
only intended to be used for engines that support WASI v0.1. On the other
hand, the WASI v0.2 threads proposal is an early draft and not implemented
anywhere, so we have no choice, but to stay with v0.1 at this time, or give up
on multithreading for who knows how long it would take for the v0.2 spec to be
completed.

Regarding the WASI v0.1 engines that implement WASI threads correctly and can
be used with Free Pascal, I've discovered only one that works:

https://github.com/bytecodealliance/wasm-micro-runtime/tree/main

Wasmtime claims to support multithreading since version 15, however it doesn't
seem to work. I tested all versions until the 23.0.1, and none of them works.

Caveat: using the internal linker is not yet supported with WebAssembly and
multithreading. Please use the external linker (the -Xe option), if you want
to give this new feature a try.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: fix threadvars with the new WASI-threads implementation
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: fix TThread.WaitFor (use -1 instead of 0 to signal infinite timeout)
Commit consists out of
  • M rtl/wasi/tthread.inc


* WebAssembly threads: simplified (optimized) the implementation of
TWasmRTLEvent, so it doesn't use a Mutex. Use atomic operations instead.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* proper implementation for the function Sptr (which returns the stack pointer) for WebAssembly
Commit consists out of
  • M rtl/wasm32/wasm32.inc


+ WASI: set StackLength on startup
Commit consists out of
  • M rtl/wasi/system.pp


+ WASI: set StackBottom on startup
Commit consists out of
  • M rtl/wasi/system.pp


* WebAssembly threads: pass the stack size to InitThread when starting a new thread
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: init StackBottom (used for stack checking) more precisely
when starting a new thread. Precision is not that important for the stack
checking itself, because it uses a stack margin of 16kb, so the previous
value, set by InitThread is good enough, however it's easy to do it precisely,
since we allocate the stack and pass a pointer to it in TWasmThread, so why
not?
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: disable stack checking for the FPCWasmThreadStartPascal procedure
Commit consists out of
  • M rtl/wasi/systhrd.inc


* Install error handler to examine exceptions during callback
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Export get_object_tree
Commit consists out of
  • M packages/wasm-oi/src/wasm.debuginspector.api.pas


* Correct callback handler for object tree
Commit consists out of
  • M packages/wasm-oi/src/wasm.debuginspector.rtti.pas


* WebAssembly threads: free the stack block and TLS block in case wasi_thread_spawn fails
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: use New and Dispose instead of GetMem/FreeMem for allocating/freeing TWasmThread
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: destroy the event and mutex in WasiBeginThread in case wasi_thread_spawn fails
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: implement WasiEndThread using exceptions. There's no
other way to end a thread in WebAssembly, except by ending the thread
procedure. Therefore, the only way to implement WasiEndThread is to have it
raise an exception and handle it at the outermost level. This, of course,
requires one of the WebAssembly exception modes to be turned on, in order for
this to work.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: call fpc_wasm32_init_tls from inline asm code to avoid
race condition in branchful exceptions mode
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ added some more comments in wasi_thread_start
Commit consists out of
  • M rtl/wasi/systhrd.inc


* removed TODO comment from WasiThreadSwitch
Commit consists out of
  • M rtl/wasi/systhrd.inc


* Explicitly specify path to include files
Commit consists out of
  • M rtl/wasi/wasiapi.pp


* Correct dictionary construction
Commit consists out of
  • M packages/wasm-job/examples/job_web.pas


* Add CopyToMemory
Commit consists out of
  • M packages/wasm-job/src/job.js.pas
  • M packages/wasm-job/src/job.shared.pas


+ WebAssembly threads: initialize the ThreadId threadvar for the main thread
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: set IsMultiThread to true in WasiBeginThread
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: implemented basic events (both manual and auto reset)
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: use high(uint32) as MaxThreadSignal
Commit consists out of
  • M rtl/wasi/systhrd.inc


* Add overloads with offset and length for typed array constructor
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Objects passed in callback are ours to free
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* WebAssembly threads: RTLEvents rewritten to implement an auto reset event.
Previous implementation did a manual reset event. However, at least on Windows
and Linux, an auto reset event is used.
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: set FThreadReaped to true in TThread.WaitFor, to avoid
hang in TThread.SysDestroy after .WaitFor
Commit consists out of
  • M rtl/wasi/tthread.inc


* WebAssembly threads: moved the thread stack and TLS block free code to a new
procedure: FreeStackAndTlsBlock. No functional changes.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* WebAssembly threads: made FreeStackAndTlsBlock set the StackBlock and
TlsPointers to nil
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: call FreeStackAndTlsBlock in WasiWaitForThreadTerminate
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: introduced TWasmThread.ThreadHasFinished boolean
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: initialize TWasmThread.ThreadHasFinished to false in WasiBeginThread
Commit consists out of
  • M rtl/wasi/systhrd.inc


+ WebAssembly threads: spinwait until ThreadHasFinished becomes true in
WasiWaitForThreadTerminate, before freeing the thread TLS and stack block, to
avoid race condition with a thread that is finishing (i.e. the main threadproc
is done), but still executing internal Pascal code inside
FPCWasmThreadStartPascal.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* fixed compilation error, introduced in a0ac317aae017c1bf828084410210324448661c9
Commit consists out of
  • M rtl/wasi/systhrd.inc


* Make sure reference count is properly managed
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Webassembly HTTP request API
Commit consists out of
  • M packages/fpmake_add.inc
  • M packages/fpmake_proc.inc
  • A packages/wasm-utils/demo/http/wasmhttpdemo.lpi
  • A packages/wasm-utils/demo/http/wasmhttpdemo.pp
  • A packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.http.api.pas
  • A packages/wasm-utils/src/wasm.http.objects.pas
  • A packages/wasm-utils/src/wasm.http.shared.pas


* WebAssembly threads: in TThread.WaitFor, call CheckSynchronize in a loop,
while waiting on a thread that isn't finished, but the waiting happens on the
main thread. This fixes the hang in test tb0636.pp
Commit consists out of
  • M rtl/wasi/tthread.inc


* WebAssembly: fixed SysUtils.sleep() with large timeouts causing incorrect time
delay, due to arithmetic overflow
Commit consists out of
  • M rtl/wasi/sysutils.pp


* WebAssembly threads: fix race condition, which causes sometimes an abandoned
basic event to be reported as signalled. This should fix the test tbrtlevt.pp
sometimes failing.
Commit consists out of
  • M rtl/wasi/systhrd.inc


* Add some utility methods to TJSarray for easier pushing of values
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Webassembly websocket support and demo
Commit consists out of
  • A packages/wasm-utils/demo/README.md
  • A packages/wasm-utils/demo/websocket/wasmwebsocketdemo.lpi
  • A packages/wasm-utils/demo/websocket/wasmwebsocketdemo.pp
  • M packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.websocket.api.pas
  • A packages/wasm-utils/src/wasm.websocket.objects.pas
  • A packages/wasm-utils/src/wasm.websocket.shared.pas


* Regexp support for wasm target
Commit consists out of
  • M packages/wasm-utils/demo/README.md
  • A packages/wasm-utils/demo/regexp/wasmregexpdemo.lpi
  • A packages/wasm-utils/demo/regexp/wasmregexpdemo.pp
  • M packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.regexp.api.pas
  • A packages/wasm-utils/src/wasm.regexp.objects.pas
  • A packages/wasm-utils/src/wasm.regexp.shared.pas


* Rename some identifiers to be more unique. Fixes issue gitlab 0040915
Commit consists out of
  • M packages/wasm-utils/src/wasm.regexp.objects.pas
  • M packages/wasm-utils/src/wasm.regexp.shared.pas
  • M packages/wasm-utils/src/wasm.websocket.shared.pas


* Add license header
Commit consists out of
  • M packages/wasm-utils/demo/regexp/wasmregexpdemo.pp
  • M packages/wasm-utils/src/wasm.regexp.api.pas
  • M packages/wasm-utils/src/wasm.regexp.objects.pas
  • M packages/wasm-utils/src/wasm.regexp.shared.pas


* Allow to set lastindex
Commit consists out of
  • M packages/wasm-utils/src/wasm.regexp.api.pas
  • M packages/wasm-utils/src/wasm.regexp.objects.pas
  • M packages/wasm-utils/src/wasm.regexp.shared.pas


* CopyFromMemory
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Correct export name
Commit consists out of
  • M packages/wasm-job/src/job.js.pas
  • M packages/wasm-job/src/job.shared.pas


* Add timer API and demo
Commit consists out of
  • M packages/wasm-utils/demo/README.md
  • A packages/wasm-utils/demo/timer/timerdemo.lpi
  • A packages/wasm-utils/demo/timer/timerdemo.pp
  • M packages/wasm-utils/fpmake.pp
  • M packages/wasm-utils/src/wasm.http.api.pas
  • A packages/wasm-utils/src/wasm.logger.api.pas
  • A packages/wasm-utils/src/wasm.timer.api.pas
  • A packages/wasm-utils/src/wasm.timer.objects.pas
  • A packages/wasm-utils/src/wasm.timer.shared.pas
  • M packages/wasm-utils/src/wasm.websocket.api.pas


* JOB debugobject call
Commit consists out of
  • M packages/wasm-job/src/job.js.pas
  • M packages/wasm-job/src/job.shared.pas


* Allow message in ShowAsDebug
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Some minor improvements
Commit consists out of
  • M packages/wasm-utils/demo/timer/timerdemo.pp
  • M packages/wasm-utils/src/wasm.http.api.pas
  • M packages/wasm-utils/src/wasm.logger.api.pas
  • M packages/wasm-utils/src/wasm.websocket.api.pas


DumpLiveObjects call
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Fix warnings, hints and notes
Commit consists out of
  • M packages/wasm-utils/src/wasm.websocket.api.pas
  • M packages/wasm-utils/src/wasm.websocket.objects.pas


* Fix memleak
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


+ WASI threads: define FPC_WASM_WORKER_THREADS_CAN_WAIT. It is actually true in
all known cases (command line WASI or browser).
Commit consists out of
  • M rtl/wasi/systhrd.inc


* Simple example for JOB call
Commit consists out of
  • A packages/wasm-job/examples/bulma.min.css
  • A packages/wasm-job/examples/hostsimpletest.lpi
  • A packages/wasm-job/examples/hostsimpletest.lpr
  • A packages/wasm-job/examples/index.html
  • A packages/wasm-job/examples/simple.lpi
  • A packages/wasm-job/examples/simple.lpr
  • A packages/wasm-job/examples/simpleserver.ini


* Some fixes in handling of headers
Commit consists out of
  • M packages/wasm-utils/src/wasm.http.objects.pas


* Typecast to pointer of self() needed
Commit consists out of
  • M packages/wasm-utils/src/wasm.timer.objects.pas


* Store session info only for project files
Commit consists out of
  • M packages/wasm-utils/demo/timer/timerdemo.lpi


* Make names unique across modules
Commit consists out of
  • M packages/wasm-utils/src/wasm.timer.shared.pas


* Unique names for imports
Commit consists out of
  • M packages/wasm-utils/src/wasm.websocket.shared.pas


* Add SharedMemoryBuffer
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Fix compilation
Commit consists out of
  • M packages/wasm-utils/demo/websocket/wasmwebsocketdemo.pp


* Remove erroneously commited commented line
Commit consists out of
  • M packages/wasm-utils/src/wasm.timer.objects.pas


* Atomics
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* switch WebAssembly RTL to provide atomic intrinsic helpers instead of Interlocked* functions
Commit consists out of
  • M rtl/wasm32/wasm32.inc


Fix TJSArray._GetStrings: exit once you get correct value, do not fall through to raising error
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* New fix for fpc_atomic_cmp_xchg_alu, as suggested by Sven
Commit consists out of
  • M rtl/inc/generic.inc
  • M rtl/wasm32/cpuh.inc
  • M rtl/wasm32/wasm32.inc


+ add intrinsic for 8-bit atomic cmpxchg for wasm32 (this way the fallback for cmxchg is no longer used for wasm32)
Commit consists out of
  • M rtl/wasm32/wasm32.inc


- remove unnecessary defines
Commit consists out of
  • M rtl/wasm32/wasm32.inc


* Fix compilation when using threading
Commit consists out of
  • M rtl/wasm32/wasm32.inc


+ added function fpc_wasm_invoke_helper to the WebAssembly RTL
Commit consists out of
  • M rtl/inc/compproc.inc
  • M rtl/wasm32/wasm32.inc


* Add TJSAtomics.waitAsync
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Fix compilation for unicode
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Assign result in async
Commit consists out of
  • M packages/wasm-job/src/job.js.pas


* Allow host environmentto get main and self thread IDs. Needed for inter-thread messaging in browser
Commit consists out of
  • M rtl/wasi/systhrd.inc


* API to share JOB objects between threads (if browser allows)
Commit consists out of
  • M packages/wasm-job/fpmake.pp
  • A packages/wasm-job/namespaced/Wasm.Job.Threading.pas
  • M packages/wasm-job/namespaces.lst
  • M packages/wasm-job/src/job.js.pas
  • M packages/wasm-job/src/job.shared.pas
  • A packages/wasm-job/src/job.threading.pas


* Object ID must be controlled by wasm side
Commit consists out of
  • M packages/wasm-job/src/job.js.pas
  • M packages/wasm-job/src/job.shared.pas


* ID is now handled in webassembly
Commit consists out of
  • M packages/wasm-utils/src/wasm.websocket.api.pas
  • M packages/wasm-utils/src/wasm.websocket.objects.pas


* WASI: workaround for FindFirst/FindNext opening the current directory, by using its full name
Commit consists out of
  • M rtl/wasi/wasiutil.pp


* WASI: avoid using inner preopened dirs, that escape to the parent with '..',
in case there's an outer preopened dir
Commit consists out of
  • M rtl/wasi/system.pp


* WASI system.pp: check that WebAssembly threads are always turned off for the wasip1 target, and always turned on for the wasip1threads target
Commit consists out of
  • M rtl/wasicommon/system.pp


* forgot to commit
Commit consists out of
  • A packages/wasm-utils/src/wasm.memutils.pas


* Some additional thread debugging statements
Commit consists out of
  • M rtl/wasicommon/tthread.inc


* Correctly set current thread
Commit consists out of
  • M rtl/wasicommon/systhrd.inc


* Wake main thread when a thread is auto freed
Commit consists out of
  • M rtl/wasicommon/tthread.inc


* Fix mem leak (stack memory never freed) in wasm.
Commit consists out of
  • M rtl/wasicommon/systhrd.inc
  • M rtl/wasicommon/tthread.inc


* Fix compilation, probably also bug with mem size
Commit consists out of
  • M rtl/wasm32/wasmmem.inc


* License header
Commit consists out of
  • M packages/wasm-utils/src/wasm.pcrebridge.pas


+ API to get exception info in host environment
Commit consists out of
  • M packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.exceptions.pas


* Compile in mode objfpc
Commit consists out of
  • M packages/wasm-utils/src/wasm.exceptions.pas


* Demo for wasmedge
Commit consists out of
  • A packages/wasmedge/examples/fibonacci.wasm
  • A packages/wasmedge/examples/fibonacci.wat
  • A packages/wasmedge/examples/runfib.lpi
  • A packages/wasmedge/examples/runfib.lpr


* performance.now interface
Commit consists out of
  • M packages/wasm-utils/src/wasm.timer.api.pas
  • M packages/wasm-utils/src/wasm.timer.objects.pas
  • M packages/wasm-utils/src/wasm.timer.shared.pas


* Add some missing constants
Commit consists out of
  • M packages/wasm-utils/src/wasm.websocket.shared.pas


* log exit to be symmetrical with entry in AllocateOSInfoBlock
Commit consists out of
  • M rtl/wasm32/wasmmem.inc


* Webassembly browser storage API
Commit consists out of
  • M packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.storage.api.pas
  • A packages/wasm-utils/src/wasm.storage.objects.pas
  • A packages/wasm-utils/src/wasm.storage.shared.pas


* Demo for storage
Commit consists out of
  • A packages/wasm-utils/demo/storage/demostorage.lpi
  • A packages/wasm-utils/demo/storage/demostorage.lpr


* Add webassembly message channel api
Commit consists out of
  • A packages/wasm-utils/demo/messagechannel/channeldemo.lpi
  • A packages/wasm-utils/demo/messagechannel/channeldemo.lpr
  • M packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.messagechannel.api.pas
  • A packages/wasm-utils/src/wasm.messagechannel.objects.pas
  • A packages/wasm-utils/src/wasm.messagechannel.shared.pas


* Message handler should be "of object"
Commit consists out of
  • M packages/wasm-utils/demo/messagechannel/channeldemo.lpr
  • M packages/wasm-utils/src/wasm.messagechannel.objects.pas


* Correct type and len for unicodestring message
Commit consists out of
  • M packages/wasm-utils/src/wasm.messagechannel.api.pas


* Allow timezone correction on time call
Commit consists out of
  • M rtl/wasicommon/wasiutil.pp


* API to collect locale settings from browser
Commit consists out of
  • A packages/wasm-utils/demo/locale/localedemo.lpi
  • A packages/wasm-utils/demo/locale/localedemo.lpr
  • M packages/wasm-utils/fpmake.pp
  • A packages/wasm-utils/src/wasm.locale.api.pas
  • A packages/wasm-utils/src/wasm.locale.objects.pas
  • A packages/wasm-utils/src/wasm.locale.shared.pas


* Wasm semaphore implementation
Commit consists out of
  • M rtl/inc/Makefile.rtl
  • A rtl/namespaced/wasm32/Wasm.Semaphore.pp
  • M rtl/wasip1/Makefile
  • M rtl/wasip1/Makefile.fpc
  • M rtl/wasip1threads/Makefile
  • M rtl/wasip1threads/Makefile.fpc
  • M rtl/wasip2/Makefile.fpc
  • A rtl/wasm32/wasmsem.pas


* Add copyright header
Commit consists out of
  • M rtl/wasm32/wasmsem.pas


+ added except_exnref.inc (RTL support for WebAssembly exnref exceptions)
Commit consists out of
  • M rtl/inc/objpas.inc
  • A rtl/wasm32/except_exnref.inc
  • M rtl/wasm32/makefile.cpu


* except_native.inc renamed except_legacy.inc
Commit consists out of
  • M rtl/inc/objpas.inc
  • R100 rtl/wasm32/except_native.inc rtl/wasm32/except_legacy.inc
  • M rtl/wasm32/makefile.cpu


+ support FPC_WASM_EXNREF_EXCEPTIONS in the RTL, like the other exception modes
Commit consists out of
  • M rtl/inc/compproc.inc
  • M rtl/wasicommon/si_dll.pp
  • M rtl/wasicommon/si_prc.pp
  • M rtl/wasip2/si_dll.pp
  • M rtl/wasip2/si_prc.pp


* Verify correctness of timer objects
Commit consists out of
  • M packages/wasm-utils/src/wasm.timer.objects.pas


* Some extra safety checks
Commit consists out of
  • M packages/wasm-utils/src/wasm.pcrebridge.pas