119 Commits

Author SHA1 Message Date
Volker Berlin
9a157b74a2 Does not export memory. No JavaScript access is needed. 2020-03-11 19:34:49 +01:00
Volker Berlin
7ed9ee576a add the original method name as comment to a call_indirect. 2020-02-29 15:56:36 +01:00
Volker Berlin
f761e4bf44 add support for "instanceof", WIP 2020-02-26 10:35:20 +01:00
Volker Berlin
02696a6488 use a synthetic function call to calculate the function id of a virtual call. 2020-02-25 18:05:12 +01:00
Volker Berlin
54d2deef4f add option WASM_USE_EH to ignore exception support because currently not supported 2020-01-12 12:42:31 +01:00
Volker Berlin
7bd7e82063 Code chars in data section directly and not escaped 2019-12-23 21:28:26 +01:00
Volker Berlin
aba8052de0 Move the exports after the imports in the wat format 2019-11-28 20:50:33 +01:00
Volker Berlin
7cbb8469e2 remove unused variable 2019-11-28 20:22:23 +01:00
Volker Berlin
947f66502b Add support for i32.load to the wat parser and some small bug fixes 2019-11-18 21:32:35 +01:00
Volker Berlin
86d239986e add memory instructions 2019-11-18 20:08:18 +01:00
Volker Berlin
8f36ed4d6d initial checkin for StringManager (WIP) 2019-11-10 12:57:58 +01:00
Volker Berlin
baf7fb9cf0 Add table.set/get 2019-11-03 19:00:49 +01:00
Volker Berlin
672574abd0 Rename anyfunc -> funcref 2019-11-03 10:14:29 +01:00
Volker Berlin
87039232eb export the memory with the name "memory" 2019-11-02 19:20:28 +01:00
Volker Berlin
6ddf5b1c85 write memory/data section also with nonGC polyfill 2019-09-14 21:26:46 +02:00
Volker Berlin
a458fd2c2a Move duplicated code from implementations of writeVirtualFunctionCall() into the caller WasmCallIndirectInstruction 2019-09-13 20:34:44 +02:00
Volker Berlin
d4a2214131 Move duplicated code from implementations of writeVirtualFunctionCall() into the caller WasmCallIndirectInstruction 2019-09-13 20:04:03 +02:00
Volker Berlin
b2f1fbc195 call ref_eq polyfill in non gc mode 2019-09-10 21:41:50 +02:00
Volker Berlin
b4d2f6caa2 use WasmOptions on more places for consistency 2019-09-10 17:49:05 +02:00
Volker Berlin
4e3c11553f prepare the polyfill of struct/Object instruction 2019-09-08 13:55:22 +02:00
Volker Berlin
7c2d276de2 If nonGC mode then StructType has also a negative code type of anyref. 2019-09-07 19:52:10 +02:00
Volker Berlin
7667c1a080 rename ArrayOpertion.LENGTH -> LEN for more consistency 2019-08-11 13:06:31 +02:00
Volker Berlin
5a08ecf122 fix copy paste error 2019-08-04 17:28:03 +02:00
Volker Berlin
ae489b2f5a handle infinity values 2019-08-03 20:49:45 +02:00
Volker Berlin
0f0928f4a8 handle duplicate function names/overloaded methods 2019-07-15 21:16:47 +02:00
Volker Berlin
abeec6cca4 NaN is written in lowercase in Wasm text format. 2019-07-14 17:24:39 +02:00
Volker Berlin
588ac6db47 implement reinterpret opcodes and use it in the WatParser. 2019-07-14 12:41:40 +02:00
Volker Berlin
c50c7d15c7 API doc 2019-06-30 15:18:09 +02:00
Volker Berlin
3709e9cc55 Generalize the usage of WasmTarget 2019-06-30 14:43:45 +02:00
Volker Berlin
ab39801cf4 imported functions need of course a signature. 2019-06-28 18:01:33 +02:00
Volker Berlin
0a4d03e974 Mark override methods as needed if the super methods are needed. 2019-06-10 11:39:19 +02:00
Volker Berlin
d3bd4902fd Write the functions also in text format in the registered order. 2019-06-09 22:39:53 +02:00
Volker Berlin
90126b16da duplicate the this on stack before a virtual method call invoke 2019-06-09 21:09:05 +02:00
Volker Berlin
1ee77584d9 write the vtable of objects to the data section. Use the vtable offset into the data section in the new operation of objects. 2019-06-09 17:17:47 +02:00
Volker Berlin
6da4a93918 fix function count in table declaration 2019-06-04 18:56:53 +02:00
Volker Berlin
c410adc636 define the types in the prepare phase. 2019-06-04 18:09:34 +02:00
Volker Berlin
557c348ed7 extract writeMethodParamStart() from writeMethodStart() and prepareImport() 2019-06-02 11:44:28 +02:00
Volker Berlin
b8b751f909 fix NPE with import functions 2019-06-02 11:01:53 +02:00
Volker Berlin
57a2bd0827 save mapping between function and type. 2019-06-01 18:42:24 +02:00
Volker Berlin
6468df956f write the function type definitions to the text format 2019-06-01 13:29:29 +02:00
Volker Berlin
625e5fbef7 pass the type to a virtual function call 2019-05-20 21:28:46 +02:00
Volker Berlin
30efaaed95 pass virtual function index 2019-05-18 21:37:19 +02:00
Volker Berlin
45d1731126 print (table) in a new line 2019-05-14 21:36:04 +02:00
Volker Berlin
cd4f1cf307 remove not needed parentheses after fix of spidermonkey 2019-05-09 21:41:39 +02:00
Volker Berlin
61c6523f14 Remove Hack for SpiderMonkey bug 2019-05-08 17:26:28 +02:00
Volker Berlin
4e98efeb5d prepare the using of call_indirect 2019-05-05 17:25:43 +02:00
Volker Berlin
8e439eb83e prepare the using of memory and data section 2019-05-01 17:11:14 +02:00
Volker Berlin
fbc687ee92 Use ref types alps in globals 2019-04-27 21:14:55 +02:00
Volker Berlin
3af321a076 Use a temporary hack for SpiderMonkey WasmTextToBinary 2019-04-22 16:21:02 +02:00
Volker Berlin
b7323776d1 Use index for fields of structs in text format until there are better naming rules. 2019-04-22 15:56:11 +02:00