183 Commits

Author SHA1 Message Date
Volker Berlin
74e6c0db06 Split the ModuleGenerator in WasmCodeBuilder and ModuleGenerator 2018-11-04 20:28:42 +01:00
Volker Berlin
a49288449d Simplify the usage of the exception 2018-11-04 20:25:55 +01:00
Volker Berlin
f15e9c8341 experimental exception handling 2018-11-03 18:01:42 +01:00
Volker Berlin
ce3e2d7546 improve exception message 2018-10-13 21:51:34 +02:00
Volker Berlin
c3b04e7016 exception value type 2018-10-13 21:21:53 +02:00
Volker Berlin
97c73adcfb Exception opcodes 2018-10-13 20:48:34 +02:00
Volker Berlin
563075a578 write local method names if DebugNames is enabled 2018-10-13 18:10:05 +02:00
Volker Berlin
8e8489ee77 Write function names for debugging 2018-10-13 15:29:34 +02:00
Volker Berlin
3c2ec0f516 add writeString() 2018-10-09 22:33:14 +02:00
Volker Berlin
a10d029e00 pass compiler properties to the module writers 2018-10-08 22:02:19 +02:00
Volker Berlin
cd50b9c203 add compileToText(File) 2018-10-08 20:46:35 +02:00
Volker Berlin
0c25c89d2b Refactor the writing of sections more object oriented. 2018-10-07 21:53:45 +02:00
Volker Berlin
df7cb74bcc Refactor the writing of sections more object oriented. 2018-10-07 21:20:14 +02:00
Volker Berlin
53494d55be Add get/setProperty 2018-10-07 18:57:41 +02:00
Volker
41e66c8a14 Add more TODO for open opcodes 2018-08-14 22:34:53 +02:00
Volker
6ade59d02d fix structure problems with globals in text writer. 2018-08-14 22:09:01 +02:00
Volker
658b859b62 Fix the signum of compare operations in the text format. 2018-08-14 21:28:17 +02:00
Volker
a07e7fe4b1 Fix the signum of numeric operations in the text format. 2018-08-14 18:24:50 +02:00
Volker
5f0c24f5af Fix "import" in the text format 2018-08-14 18:17:48 +02:00
Volker
dd29280641 Add support for global (static) variables 2018-08-14 15:11:21 +02:00
Volker
c269bae443 Move method getValueType() into class ValueType. 2018-08-14 12:14:36 +02:00
Volker
2c6fb9aae0 Add handling of global section. 2018-08-13 17:39:14 +02:00
Volker
758557f76b Fix getTempI32() that it work without the removed prepare phase. 2018-08-11 20:36:09 +02:00
Volker
fcaa15d22d Fix SWITCH start position detection and replace erroneous ValueStackManager 2018-08-11 18:12:40 +02:00
Volker
3e9c26f198 Add writeOpCode(int) for simpler handling of 2 byte opcodes 2018-08-11 16:18:01 +02:00
Volker
d7c13c018e Use the new Non-trapping float-to-int conversions for Java like behavior. 2018-08-11 15:46:20 +02:00
Volker
0822d9af8c END can not be outside of parent block 2018-08-10 20:35:17 +02:00
Volker
9b554b114b calculate the block type of a if block for the conditional operator. 2018-08-10 18:52:29 +02:00
Volker
4e4fa8a28f pass the ValueType to the return WasmBlockInstruction 2018-08-10 18:50:54 +02:00
Volker
b78e6054c6 Add getPopCount() 2018-08-10 18:25:38 +02:00
Volker
cd8dd10182 Add method getPushValueType() 2018-08-06 12:52:44 +02:00
Volker
d3e80bf709 Move method name creation into WasmCallInstruction 2018-08-06 12:46:18 +02:00
Volker
d16b2b63c2 Add constructor with ConstantRef 2018-08-06 12:44:47 +02:00
Volker
a736f41eb4 generalize exception handling 2018-08-06 12:23:42 +02:00
Volker
ff3662db43 The different writeConst summarized to one method 2018-08-05 18:27:06 +02:00
Volker
b1eb27c474 support dynamic result type for an if block 2018-08-05 14:45:18 +02:00
Volker
c8aecea7ab Add getLastValueType() 2018-08-05 14:40:56 +02:00
Volker
a27733234f use experimental Sign-extension operators 2018-08-03 21:49:42 +02:00
Volker
0df046a644 add TODO for not implemented byte codes 2018-08-03 19:41:21 +02:00
Volker
cc742b6259 docu 2018-08-03 18:29:53 +02:00
Volker
e3764913c3 negate compare condition of if operations in the branch manager instead on parsing the byte code. 2018-08-03 18:04:08 +02:00
Volker
fbe2d97fc6 Add negateCompare() and fix typos in method names. 2018-08-03 17:25:31 +02:00
Volker
ce82010721 pass the compare instruction of an IF operation to the branch manager 2018-08-03 15:17:07 +02:00
Volker
e1fa502b2d docu 2018-08-03 12:50:12 +02:00
Volker
f2942bffc5 Improve the loop compiling and add support for while{} loops with condition on loop start. 2018-08-02 12:18:31 +02:00
Volker
9c1215720d fix non i32 compare operations 2018-08-02 12:13:54 +02:00
Volker
4ce2fed5fa add method for patching code position 2018-08-02 12:12:51 +02:00
Volker
3a74ebbe20 Finish refactoring with an intermediate model in the memory of WASM instructions. 2018-07-27 23:27:27 +02:00
Volker
d81da1f342 Use byte values for ValeTypes instead of Varint values. Prepare for ref
values.
2018-07-27 18:30:04 +02:00
Volker
776cf133bc Use UNREACHABLE operation after endless loop. 2018-07-27 17:51:36 +02:00