90 Commits

Author SHA1 Message Date
Volker Berlin
9d1c9ee93b
expand a loop if there is a SWICH structure that point outside the loop. #43 2022-06-19 16:20:17 +02:00
Volker Berlin
4958cb2f46
convert also AssertErrors to WasmExceptions 2022-06-06 15:37:12 +02:00
Volker Berlin
c392afc76f
Use a BLOCK with input parameters for SWITCHES so that the start position of the SWITCH value does not have to be determined. #43 2022-06-05 23:04:12 +02:00
Volker Berlin
52dd9a1665
use "java/lang/Object" as fallback type for NULL values 2022-05-08 18:53:45 +02:00
Volker Berlin
69b8db16d1 call class initializer before access to static fields 2022-03-08 15:13:19 +01:00
Volker Berlin
097dfae696 Add a hook to run the class/static constructor only once 2022-03-06 14:27:33 +01:00
Volker Berlin
3fd3c63351 share the LocaleVariableManager between multiple WasmCodeBuilder 2022-02-27 20:44:42 +01:00
Volker Berlin
9f0f82bb06 Use also RETURN in the BranchManager to calculate the IF THEN ELSE blocks. 2022-02-19 22:15:56 +01:00
Volker Berlin
2fa6dfedf8 fix typo in class name 2022-01-02 18:20:34 +01:00
Volker Berlin
6520370e02 Handle DUP2 as two dup if used for non 64 bit values 2021-05-23 22:12:29 +02:00
Volker Berlin
6d89fa8eca Handle array component type for not init (null) values. 2021-05-02 14:19:55 +02:00
Volker Berlin
b35279a960 The needThis flag must be set already on marking a function as needing. If it will set on scan it is to late for stack calculation. 2021-04-17 20:27:28 +02:00
Volker Berlin
cf7e66901d Add support for complex block types 2021-02-27 20:40:30 +01:00
Volker Berlin
99e406958f Type specific NULL constant values. 2021-02-14 16:27:10 +01:00
Volker Berlin
3e42160655 implement more Lambda stuff 2021-01-23 22:16:16 +01:00
Volker Berlin
536fe8385f need also to use the component type for object array get/set instructions 2021-01-03 14:50:50 +01:00
Volker Berlin
4d2dfdeaa2 use array.get_s/get_u for packed array types (i8/i16) 2021-01-02 21:43:02 +01:00
Volker Berlin
856194dbce fix type handling for NUL values with GC support 2020-09-24 21:46:02 +02:00
Volker Berlin
b9a904ab42 Fix array class name for more complex object arrays 2020-09-23 19:47:06 +02:00
Volker Berlin
13e99875b0 implements class name for array objects 2020-07-08 20:54:16 +02:00
Volker Berlin
cfbadfa226 anyref --> externref, add kind to ref.null and ref.is_null, https://github.com/WebAssembly/reference-types/pull/87 2020-05-30 23:06:29 +02:00
Volker Berlin
9416628961 invokeinterface has 2 unused bytes 2020-05-08 22:19:08 +02:00
Volker Berlin
11f338eea8 implements dup_x2 instruction 2020-04-25 22:22:18 +02:00
Volker Berlin
f15fb1cdf9 implements dup_x1 instruction 2020-04-25 19:31:30 +02:00
Volker Berlin
e533c97d0f throw an ArithmeticException on a division by zero of integer values 2020-04-19 19:29:14 +02:00
Volker Berlin
25423c6bb8 pass LocalvariableManager to the BranchManager to create temp variable for CATCh blocks. 2020-04-13 16:05:41 +02:00
Volker Berlin
d6a7ead579 fix the stack inspector for catch blocks 2020-04-12 10:44:53 +02:00
Volker Berlin
5b04573469 First type check of the Exception in an catch block. WIP 2020-04-11 17:04:21 +02:00
Volker Berlin
c52bc2a0fe Rewrite stack analyze to handle conditional parameters on the stack. 2020-03-29 14:31:58 +02:00
Volker Berlin
d3f7069cc8 pass the signature from synthetic functions to the wat parser. 2020-03-27 21:10:02 +01:00
Volker Berlin
03957b0988 Add a placeholder for jumps instructions to better inspect the stack. 2020-03-26 18:21:50 +01:00
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