Commit Graph

6 Commits

Author SHA1 Message Date
xujie fb4de0245a Implement frame of generic lowering(HIR To MIR)
Replace all JS_BYTECODE in HIR. In order to simplify the code
implementation, no type judgment is made on the input, and the
slowpath is directly implemented by calling the trampoline function
without affecting the original function. For complex function
implementation, directly encapsulate the entire interpreted code as
a trampoline function.

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Icd24f7cebb496e4376170784ce1e2e2ef1a7ee71
2022-02-16 09:21:41 +08:00
wanyanglan 7750051d88 Refactoring HIR IF_EXCEPTION and bytecode ldai fdai instructions
The exception object is passed directly as a value inside the IR
will cause acc to generate many phi nodes (other vreg rarely generate
phi nodes when exceptions are handled). The current modification
is to add a GET_EXCEPTION directive (placed at the beginning of
the catch part) to indicate that the exception object is read after
an exception occurs, in this case lowering is simpler and does not
need to consider different value outputs, the logic is more concise
and the number of code instructions is reduced.
Replace ladi and fdai HIR with MIR: these two instructions to get
the immediate number, do not need to use HIR to handle, this will
increase the number of HIR instructions, simplify lowering.

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4T6HX

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I751677e11b50976af4e2fc5a6cac4457fa9a44df
2022-02-11 16:24:43 +08:00
songzhengchao 2f2525b90f implement machineType INT* FLOAT* rename to I* and F*
current machineType INT * FLOAT* confuse people to associate UINT*.
the INT* is simlar with LLVM IR too
we reanme  machineType INT* FLOAT* rename to I* and F*

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4SC94

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ie188e07039cd9f26aed436ce96618ea4143fccd6
2022-02-10 15:51:18 +08:00
wanyanglan 5fc124da79 Redefine the layout of TypeCode to accommodate MIR, TS types
The current TypeCode is only used to represent the type of the MIR
and cannot represent the TS type data type. The type derivation
process needs to get the TS type information from the circuit ir.

Redefining the layout of TypeCode

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4SFHE

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I53292db81712b84210114f9f92c44b6236c356af
2022-01-30 11:03:57 +08:00
wanyanglan 01a613ecac independent running ts aot
ts aot should be a separate part that needs to generate the
corresponding file before executing xxx.abc and should not
depend on the execution of xxx.abc

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4RP3H

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I4ed7d7ee5528dcb479e08486f332a48c16ea88d7
2022-01-26 15:22:50 +08:00
wanyanglan 51ecdc254f review comments revision
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4RP3H

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Ic7edae930dc9e206c66cd453040c789f2a6b49d3
2022-01-26 11:33:05 +08:00