245 Commits

Author SHA1 Message Date
wanyanglan a2ec8c761d Add two HIRs RESTORE_REGISTER, SAVE_REGISTER to support generator command
Context is not saved when processing SUSPENDGENERATOR and RESUMEGENERASTOR
instructions, and contextual execution cannot be restored.
1、Add SAVE_REGISTER HIR for saving context
2、RESTORE_REGISTER HIR for restoring context

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I16b73390c6f7ae7c295f0aa1a9c9df538c2a4fec
2022-07-09 16:22:55 +08:00
openharmony_ci fe806dd8f7 !1710 aot add test and enable test on ut
Merge pull request !1710 from Hailiang/aot_lowering
2022-07-08 08:13:32 +00:00
Hailiang Hu 45dd942ea2 aot add test and enable test on ut
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5EYP3

Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I771a63cf807e9971badf7228f337cb9a62ee258e
2022-07-08 11:03:58 +08:00
wengchangcheng cf1abdca4e Descriptor: decrease compiler time
details use dynamic link of libark_ecma_debugger.so & libjsdebugtest.so
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5FYDR

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ic0f7c21d0e296dbcb28753fe038f10fa4d4c8f37
2022-07-07 20:20:23 +08:00
getingke d314d02335 fixed for proxy bug
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I6bd8842e81a7cce061190fff86345b98bb5b660e
2022-07-06 09:53:50 +08:00
getingke 3933c182ec fixed for rewrite assembler stub for aarch64
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I9b5982bc1268725e7882fd95eeb2ba07f2851b6d
2022-07-05 20:07:03 +08:00
openharmony_ci bc33472e36 !1722 add module resolvePath
Merge pull request !1722 from fanshengli/module_resolvePath
2022-07-05 08:31:24 +00:00
lifansheng b975283659 issue:I5F5ZK
add module resolvePath

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: I46ff3e6e7a10a14731f3db15b5b674bb7e1d902d
2022-07-05 09:20:21 +08:00
huoqingyi 5905b54c34 Fix bugs in ts aot
Description:
1.Fix the bug that Circuit IR args gates do not match the function args of the abc file.
2.Add class ArgumentAccessor to handle args gates of Circuit IR.
3.Modify to set the AOT function entry when constpool is being parsed.
4.For functions sharing the same instructions, add a map to collect duplicate infomation. The key of the map is the current method and the value is the first method with the same nstructions to be translated.

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

Change-Id: I08e48444eb22c4fc2841e1cdae44b90286de84ac
Signed-off-by: huoqingyi <huoqingyi@huawei.com>
2022-07-04 16:19:11 +08:00
wupengyong a539d889da reason:need tests to test bytecode
description:add operate and class test
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5FD8M?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I1c91e2acf0acfe0c1417297055b3688406482520
2022-07-04 14:55:36 +08:00
openharmony_ci 2922c2a840 !1692 fix HandleLdObjByValuePrefV8V8
Merge pull request !1692 from wpy111/master
2022-07-01 01:51:58 +00:00
wupengyong 48e08b34ce reason:fix HandleLdObjByValuePrefV8V8
description:fix asminterpreter for arm64
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5EMXU?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I1670d66d1df31e0257a440b2e05539e16724f11d
2022-06-30 21:28:58 +08:00
xujie 690ca22d2a Support Lexenv In TSAOT
1. Support lexical env when running tsaot
2. fix getunmappedargs and copyrestargs bugs

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Ia78ea4d89654d6924c0dee6f491cdf1e4fe718ee
2022-06-30 14:01:26 +08:00
openharmony_ci 313fa69d6e !1674 stub.m binary file compiled into shared library
Merge pull request !1674 from wanghuan2022/master
2022-06-28 15:03:46 +00:00
wanghuan 733093439a stub.m binary file compiled into shared library
desc: stub.m binary file compiled into shared library

solu:
1. ark_stub_compiler executable not depend libark_jsruntime.so and libark_jsoptimizer.so, but depend libark_jsruntime_set and libark_jsoptimizer_set
2. python shell read stub.m binary data, and save to extern array of stub_m.cpp;
3. file_loader.cpp read stub data from array of stub_m.cpp.

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5E4LW
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I9c95c882b59438370523179dd5949aeca51faa10
2022-06-28 17:25:33 +08:00
openharmony_ci 52dcf38c3e !1669 Resolve Compatibility Issues between TSAOT and ECMA spec
Merge pull request !1669 from dingding/aot_compatibility
2022-06-28 08:09:13 +00:00
ding c80c97bdfa Resolve Compatibility Issues between TSAOT and ECMA spec
1.Add typelowering framework.
2.Add newobjdynrange in typelowering which brings static TS type
  info to runtime phase.
3.Serialize and deserialize hclass table with snapshot, fix minor bugs
  in snapshot by the way.
4.Add IsFormTSTypeBit in HClass to distinguish hclasses which come from
  compile phase.
5.Fix compatibility issues in property operations api and some builints
  api.
6.Add 3 compatibility issues test cases.

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

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I98626e6eea01f4455ec818ba0ad872b3be98b729
2022-06-28 14:43:16 +08:00
huangfeijie a5f34993ee fix incorrect column number when exceptions happen
add SAVE_PC() to avoid incorrect offset
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5E0HV

Signed-off-by: huangfeijie <huangfeijie@huawei.com>
2022-06-27 22:13:21 +08:00
openharmony_ci 29edac057a !1671 fix IntBuildTaggedWithNoGC
Merge pull request !1671 from wpy111/master

Change-Id: I6c362f16a81a1411623dbdc06768f05e4a9f3ad5
2022-06-27 13:23:57 +08:00
openharmony_ci 67d63e5787 !1644 fix json new array join bug
Merge pull request !1644 from 堂宇/master
2022-06-23 04:54:03 +00:00
Rtangyu 779ab60aa9 fix json new array join bug
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5DFL0

Signed-off-by: Rtangyu <rentangyu@huawei.com>
2022-06-23 10:29:49 +08:00
ding c742b591fc Fix AOT DefineClass PrtotypeChain Setup Error
1. In SetClassInheritanceRelationship, use class template mistakely, fix
   it by using clone class.
2. Add corresponding test cases.

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

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I5d09f471e62b5336997df5c2877b91fdcad3b3b6
2022-06-22 14:19:21 +08:00
Hailiang Hu 171ec8fae4 aot test framework update, add test case
1. Support js test case, and multi files case, update env on arm64.
2. Add js test case for call with default args, undefined using.

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

Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I2e84914bdf5e86b38500178f38bd5723dc708ae6
2022-06-21 20:08:44 +08:00
xliu f9c09fc846 fix LdGlobaleVar and TryLdGlobalByName
1.Adjust the logic of IC for LdGlobalVar
2.Adjust the logic of IC for TryLdGlobalByName
3.Add set as SetAsMega for LoadMiss and StoreMiss
4.Container test case refactoring
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CJO2

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I3c531d072c5f2e4b6508544d9420ad4817943c24
2022-06-20 10:13:02 +08:00
openharmony_ci 1410515b8f !1616 AOT test framework support arm64
Merge pull request !1616 from Hailiang/aot_lowering
2022-06-18 14:43:43 +00:00
Hailiang Hu 351401f670 AOT test framework support arm64
Add test command run on qemu-aarch64,gdb command on debug mode.

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

Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I15dc2eaa50607a4a64148255c2f89bdc8554f092
2022-06-17 17:13:32 +08:00
hjzhangcm b835cdcb25 Test set disassembly issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5CTBJ
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-17 16:11:52 +08:00
openharmony_ci 7fa5a7f0e2 !1598 fix device UT error
Merge pull request !1598 from changcheng/fix_debugger_ut
2022-06-16 01:10:50 +00:00
wengchangcheng 2838e55071 Descriptor: fix device UT error
details: add resource file for debugger testcases
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CGVW

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Iee27e961411cebed0f843f6557dde7f05f4b5248
2022-06-15 17:58:33 +08:00
zhangyouyou 8e5d548085 https://gitee.com/openharmony/ark_ts2abc/issues/I5C02G
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-06-13 17:08:31 +08:00
openharmony_ci f00d33e9c8 !1529 Add Type Infer Test Case
Merge pull request !1529 from huoqingyi/typeinfertests
2022-06-13 07:09:09 +00:00
luochuhao d8e482f756 Modify enable logic of certain runtime options.
Change condtion for File execution branch to whether file is AOT compiled or not.

Fix bug of setting bc debug handler entry while loading stub file.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BBFH
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I5b6d47a1587631849f6c1e746473cb14b1d727a8
2022-06-13 12:15:03 +08:00
huoqingyi 1da170f1bd Add Type Infer Test Case
Description:
1.Add type infer test cases for bitwise_op, callfunctions, ldobjbyvalue and logic_op

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

Signed-off-by: huoqingyi <huoqingyi@huawei.com>
Change-Id: I486f6f91a32e1c7caa2446b12b8e6b33db8d47fe
2022-06-13 09:38:51 +08:00
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
openharmony_ci a6f3b2b8a6 !1177 Require function realization
Merge pull request !1177 from DaiHN/require
2022-06-09 12:51:21 +00:00
DaiH eee606c334 Support CommonJS's module export function
------------------------------------------
    1. Support CommonJS's module export function
    2. Related test cases
    issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5590V

Signed-off-by: DaiH <daihuina1@huawei.com>
Change-Id: I18968f6a6b971fbe833d91ef98813964cc8292c9
2022-06-08 10:59:06 +08:00
openharmony_ci cabfe1a62e !1345 Implement Prologue refactor and Add mulitple Optimized Frame In LLVM 12.0.1
Merge pull request !1345 from songzhengchao/optimizedjsfunction
2022-06-07 13:49:24 +00:00
openharmony_ci cf6cb22c00 !1511 add type infer test framework && test case
Merge pull request !1511 from hongtao/typeinfertest
2022-06-07 07:32:53 +00:00
songzhengchao e189c888a0 Merge remote-tracking branch 'szc/optimizedjsfunction'
Change-Id: I3451ce3ba039c43f4cebedbc6d5636bbf70d234c
2022-06-07 14:22:34 +08:00
taohong af9bec981f add type infer test case
add test case for AOT type infer

Signed-off-by: taohong <hongtao11@huawei.com>
Change-Id: Iff28cc77d3f309699000f76d1ed30191176a4d85
2022-06-07 12:15:43 +08:00
hjzhangcm 29aaba60ba describe:fix 262 script
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5AZHA

Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-07 09:58:11 +08:00
openharmony_ci a733eece5c !1502 add unittest case for WeakRef and FinalizationRegistry
Merge pull request !1502 from 小马奔腾/master
2022-06-06 09:29:22 +00:00
xdmal 09abe19b06 add unittest case for WeakRef and FinalizationRegistry
add unittest case for WeakRef and FinalizationRegistry

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-06-06 12:58:35 +08:00
hjzhangcm 1e34ab391f Modify script directory
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-06 10:02:30 +08:00
openharmony_ci 7048cbf1ef !1409 Add Containers List And LinkedList
Merge pull request !1409 from chenqi/list1
2022-06-05 04:05:38 +00:00
songzhengchao 69ac5a27a9 Implement Prologue refactor and Add mulitple Optimized Frame In LLVM 12.0.1
1 refactor prologue reserve dynamic slots which is setted by LLVM IR
2 callsiteSp is calculated by current function's callee saved registers size
3 and Add mulitple Optimized Frame:
OPTIMIZED_JS_FUNCTION_FRAME:argv[n-1],..., argv[0], argc, ...., returnaddr, Fp, type. this frame need to visit args and stackmap.
OPTIMIZED_ASM_FRAME: jscall/jsentry construct frame which is implemented by assemble, this frame is only link to previou frame, it don't need to visit args and stackmap

4 stackmap support parse const pool and llvm patch add deopt interface LLVMBuildCall3

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AJ9U
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ie6a0067169805cc6043ea94936dd578489b56c7b
2022-06-03 15:51:19 +08:00
openharmony_ci 33c2569bab !1488 fix 262 script
Merge pull request !1488 from hjzhangcm/master
2022-06-02 10:34:53 +00:00
hjzhangcm f288f606d0 Modify compilation script
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-02 17:38:39 +08:00
chenqi 666eb6b8bd Add Containers List And LinkedList
Description
    1.To ensure the high performance of container classes, List and LinkedList is provided in ark.
    2.modify Copyright 2021->2022.
    3.fix containers.
Related issue
    #I58XA9:Add Containers List And LinkedList.

Signed-off-by: chenqi <chenqi151@huawei.com>
2022-06-02 17:02:40 +08:00
wengchangcheng 419394270f Descriptor: fix proxy bug
details:SetMethod always is nullptr, set right method: CallJsProxy
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AIBR

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ia0fa992d302b9183a20faafeffbfce31f01cd072
2022-06-02 11:52:38 +08:00