59 Commits

Author SHA1 Message Date
Volker Berlin
a4040a8d3b optimize the DUP instruction, only use a temp local variable if needed. 2020-03-01 19:02:49 +01:00
Volker Berlin
8379416cb8 add support for multi dimension array allocation 2020-02-09 18:05:31 +01:00
Volker Berlin
ce05e7aa5d remove obsolete hack 2020-02-01 20:31:27 +01:00
Volker Berlin
5410764249 implement CAST operation, WIP 2020-02-01 20:29:29 +01:00
Volker Berlin
8c12f5a3c9 implement "instanceof", WIP 2020-02-01 16:49:52 +01:00
Volker Berlin
43b41d4fad interface call, WIP 2020-01-25 23:42:22 +01:00
Volker Berlin
45b5a4a955 InvokeDynamic, WIP 2020-01-25 21:17:42 +01:00
Volker Berlin
10b754e3e3 Use a Placeholder Instruction for Java DUP opertions. 2019-11-16 19:17:22 +01:00
Volker Berlin
ca9efce370 constant pool can also contains string constants 2019-11-03 13:52:07 +01:00
Volker Berlin
be12f047dd move some helper method into the parent 2019-10-02 18:56:35 +02:00
Volker Berlin
d1bb7cac23 pass the method with signature to the VariableManager as fallback 2019-09-23 20:33:21 +02:00
Volker Berlin
713020ef60 add "ref_eq" polyfill function 2019-09-08 21:45:28 +02:00
Volker Berlin
083ebf263e improve the type handling of arrays 2019-08-21 20:52:12 +02:00
Volker Berlin
0b28099674 Add ArrayType and improve the Java type parser. 2019-08-14 20:07:39 +02:00
Volker Berlin
7667c1a080 rename ArrayOpertion.LENGTH -> LEN for more consistency 2019-08-11 13:06:31 +02:00
Volker Berlin
5883adc2af pass the compiler properties to sub classes 2019-08-08 19:28:27 +02:00
Volker Berlin
8f09d4d04a detect all needed types in the prepare phase 2019-05-19 11:14:32 +02:00
Volker Berlin
983d78de54 next step in handling virtual methods 2019-05-14 21:47:49 +02:00
Volker Berlin
272fa76af0 Write the type of Object fields in structs as ref type instead of anyref. 2019-04-26 17:28:57 +02:00
Volker Berlin
e8a4613d74 split addStructInstruction() 2019-04-24 19:54:30 +02:00
Volker Berlin
02a2e9d8ff Write also the fields of super classes in the struct description. 2019-04-21 21:33:22 +02:00
Volker Berlin
09b817117a Generalize the usage of SyntheticFuctionName 2019-04-20 18:44:23 +02:00
Volker Berlin
cb65505596 use temporary variables for a DUP instead a function call with multiple return types because SpiderMonkey it does not support it currently and it also seems more efficient. 2019-04-19 10:58:00 +02:00
Volker Berlin
481bffe31a Fix the type of array.get operation. Before it was ever i32 from array index. 2019-04-17 18:26:52 +02:00
Volker Berlin
9653520c2b Rewrite the LocalVariableManager to handle the Java reuse of a variable slot with different type. 2019-04-14 14:29:09 +02:00
Volker Berlin
0ad94fbc56 Fix the lineNumer in some WasmExceptions 2019-04-14 14:06:56 +02:00
Volker Berlin
cd7e20f5ed pass the LocalVariableTable and the code position of variable using to the VariableManager 2019-04-06 17:51:29 +02:00
Volker Berlin
5e40f1603e pass the line number to the parsed instructions for a source map generation #6 2019-03-31 11:23:45 +02:00
Volker Berlin
7ce99bec72 throw an exception for old byte code instructions 2019-03-23 16:05:14 +01:00
Volker Berlin
0b3c1987f5 first support for "goto_w" Java bytecode instruction 2019-03-20 19:11:38 +01:00
Volker Berlin
1b6fd3c7a5 Replace the fix length of 3 byte for GOTO with a nextPosition because goto_w use 5 bytes. 2019-03-19 19:35:42 +01:00
Volker Berlin
40d61c56a8 support for more as 255 variable slots added. 2019-03-13 22:09:21 +01:00
Volker Berlin
c2be64a525 implements java bytecode frem and drem 2019-03-12 21:27:23 +01:00
Volker Berlin
2e7370dcfd ignore monitorenter and monitorexit from synchronized blocks. see #5 2019-03-10 18:32:26 +01:00
Volker Berlin
fb3ed8795e Add UNREACHABLE also if the branchkmanger adds some blocks instructions 2019-03-03 21:33:09 +01:00
Volker Berlin
cd2f07733d improve the compiling of exceptions 2019-03-02 21:54:27 +01:00
Volker Berlin
09a9e66e42 Fix missing END of TRY CATCH with RETURN in CATCH block. 2019-02-23 14:59:43 +01:00
Volker Berlin
f5ed8aeeb6 get_local --> local.get, set_local --> local.set, see #3 2019-02-20 21:42:52 +01:00
Volker Berlin
24f1c24a84 Cleanup 2019-01-23 20:24:47 +01:00
Volker Berlin
145a39079b use AnyType instead ValueType in the VariableManager 2019-01-20 19:58:23 +01:00
Volker Berlin
29911bc586 use synthetic method for dup instruction to handle the type dynamically 2019-01-20 10:41:33 +01:00
Volker Berlin
1376af2f3f Rename StorageType to AnyType. 2019-01-14 20:09:00 +01:00
Volker Berlin
522f25c326 improve supported array opertions 2019-01-13 14:42:24 +01:00
Volker Berlin
caa59cab83 implements struct.get/set 2019-01-13 11:36:07 +01:00
Volker Berlin
56fdf9018d write the struct type into the type section 2019-01-06 16:29:26 +01:00
Volker Berlin
bfc6cbb3f0 add TypeManager 2018-12-19 20:10:26 +01:00
Volker Berlin
6196648cc0 add support for objects equals/not equals (if_acmpeq,if_acmpne) 2018-12-17 21:22:10 +01:00
Volker Berlin
ad30f90f48 implements ifnull and ifnotnull 2018-12-15 22:33:25 +01:00
Volker Berlin
9958a2bed9 implements instruction aconst_null 2018-12-14 20:50:08 +01:00
Volker Berlin
2410694151 implements invokespecial 2018-12-14 19:59:49 +01:00