Commit Graph

17 Commits

Author SHA1 Message Date
xujie 6430e8f31e TSAOT Exception Handler
1. Throw JS exception in tsaot
2. Print bcoffset when occur JS exception

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I046d76c092a399354ddcdedd859f0c1e622387c2
2022-06-11 16:36:16 +08:00
ding 8bfd16debf Refactor GateType
1.Change the implementation of gateType from enum to class.
2.Add some base type opeartions between GateType and GlobalTSTypeRef to simplify the code.
3.Delete class GateTypeCoder
4.Extract GlobalTSTypeRef as an independent file.

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

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I3d80595ebccc9ac942af9b9bcc67c0974bb9b712
2022-06-09 17:32:43 +08:00
lijincheng b4f461f0bc Bugfixs for AsyncFunctionReject and Poplexenv
1.Fix phi state error and parameter type error in LLVM due to wrong value-wires

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

Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-06-01 12:58:45 +08:00
openharmony_ci f17c1d64c2 !1459 Circuit IR optimizer frameworks
Merge pull request !1459 from Mingliang Zeng/master
2022-05-31 07:29:39 +00:00
Mingliang Zeng e419729e6c https://gitee.com/openharmony/ark_js_runtime/issues/I59TAQ
Circuit IR optimizer frameworks:
1. Lattice equations system solver framework
2. Subgraph rewrite framework

Signed-off-by: Mingliang Zeng <zengmingliang1@huawei.com>
Change-Id: I05e97c8b34be46d5689798ec24423228c8e14bee
2022-05-31 10:54:59 +08:00
huoqingyi 837f960832 add type infer for more bytecodes
Change-Id: I2f25d587bd8309199480add290105b8f08dd04a3
Signed-off-by: huoqingyi <huoqingyi@huawei.com>
2022-05-30 21:06:45 +08:00
taohong 4801aaebb1 refactor type infer
Signed-off-by: taohong <hongtao11@huawei.com>
Change-Id: I7805340a5b85a552a5da3d397e502838e9d8a3d9
2022-05-25 17:39:41 +08:00
Hailiang Hu f532af41e1 AOT Lowering bug fix for newlexenv and poplexenv
1. Add SetCurrentLabel on build loop to fix newlexenv and poplexenv test compile.
2. Add value input on CallRuntime to fix throwundefindeifhole lowering.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I56BND

Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I5a4e9e026b86038153212bc6fa97cad8a54fbaea
2022-05-07 21:16:07 +08:00
lijincheng e328dded9f Add Aot Lowering CopyRestArgs
1.Add aot lowering for bytecode: COPYRESTARGS_PREF_IMM16
2.Add test case fot bytecode: COPYRESTARGS_PREF_IMM16

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

Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-05-06 20:57:28 +08:00
huoqingyi 059d3e7ab6 Add Aot SlowpathLowering
Change-Id: Ie2399770c5e2d3b38b40a4b50d4ff57d23d6d1b4
Signed-off-by: huoqingyi <huoqingyi@huawei.com>
2022-04-12 21:38:05 +08:00
lijincheng b9486a89ca add slowpathlowering to 7 bytecodes
Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-03-28 15:29:41 +08:00
lijincheng a0c0ca7094 compile bugfix
add new file circuit_builder-inl for extracting methods from stub
fix code check
Signed-off-by: lijincheng <lijincheng13@huawei.com>

Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-03-09 10:57:44 +08:00
lijincheng 3fc477be6a add GateType (get or set) to gate_accessor
compile bugfix

Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-03-09 10:04:36 +08:00
Hailiang Hu e452f01e53 AOT lowering
Add lower hir to condition call, get iterator lower

Issue: I4WKOZ

Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: Ieb78a3ef0bebc35f7edd4224b55393c44bbbeee2
2022-03-08 18:49:48 +08:00
wanyanglan 37d1f2b515 Aot lowering
lowering  LDLEXENVDYN_PREF, LDA_STR_ID32, STGLOBALVAR_PREF_ID32 and
TRYLDGLOBALBYNAME_PREF_ID32

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4UAZJ?from=project-issue

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Icd7538c2187257099e846761426f07a1996f77c5
2022-03-03 19:57:10 +08:00
xujie 4a570a093c Refactoring of Slowpath Lowering
In order to make the framework code structure clearer and more readable,
it encapsulates multiple calling interfaces, uses clearer variable names,
and draws a comparison diagram before and after lowering, so that
developers can better understand the code.

issue: https://e.gitee.com/open_harmony/dashboard?issue=I4U02P

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Ied4933d8eac5e4b7b50c894ae496d7cf8d1ff1b0
2022-02-17 20:05:40 +08:00
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