Commit Graph

68 Commits

Author SHA1 Message Date
hecunmao
14f68e0ae1 Bugfix:[Bug]: An exception was generated while throwing an exception
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9EUBS
Signed-off-by: hecunmao <hecunmao@huawei.com>

Change-Id: I8087345cb5ad6b94be69ba3e99db3357309e1ff8
2024-04-09 15:46:29 +08:00
Gymee
1fafa359a2 Support SharedSet
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I93TZC
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I753a39066561ca9948784dd44dabf42aa782a165
2024-03-22 22:07:40 +08:00
DaiHN
cd342f8e6e Exception log Rectification
issue : https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I978SO

Signed-off-by: DaiHN <daihuina1@huawei.com>
Change-Id: Ic957fb2771cf5843e13745707bcf6d4fe75c011a
2024-03-10 21:33:51 +08:00
lukai
783fa0a6d2 Forbidden Calling GetJSThread by Region
Forbidden calling getJSThread by region
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8VGW7?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: Ieb42714f4ed7c44194134f4f0b4845217ef44d5e
2024-01-19 17:38:00 +08:00
linxiang8
f2bc0dba7e fix mandreel workload
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7WMDA
Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: Ia8a8ac4109c45316e707ff06c6ff4b515dfc7090
2024-01-16 17:40:06 +08:00
wengchangcheng
b2fda867a4 Fix c statck overflow
Chceck c stack limit

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8SKJM

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I910eece936a5d40c98c9ddfa4e42b47f930f7a6c
2023-12-31 16:23:56 +08:00
chenjx-huawei
f364a3bc76 Handle OOM error immediately to avoid being caught incorretly
Issue: https://gitee.com/open_harmony/dashboard?issue_id=I8GGZP

Signed-off-by: chenjx-huawei <chenjingxiang1@huawei.com>
Change-Id: I5c32c7e2d4b8bf331ec50e14e957628502ced4f6
2023-12-07 21:23:34 +08:00
dingwen
8f5e2fa5b4 Implement serialize base class
Description:Implement serialize base class
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8GZGX
Signed-off-by: dingwen <dingwen6@huawei.com>

Change-Id: Ia03fc9cac949d73cafbd6a2603da053d2f886cd1
2023-12-01 09:02:26 +08:00
yaoyuan
64894a3a73 GC BugFix Layout Sync
Issue: I8DT4U

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: Id4915b82ec4ae4ead274fb6c7c7d503092dbd8ac
2023-11-06 09:31:42 +08:00
huangfeijie
1387d7eede issue:https://gitee.com/openharmony/commonlibrary_ets_utils/issues/I83868
support TerminateExecution in Taskpool
Throw the exception when find the temination flag

Signed-off-by: huangfeijie <huangfeijie@huawei.com>
2023-10-31 16:44:57 +08:00
wuzhefeng
c9f42a0bc9 [Bug]: Fix the symbol section info (part-1)
The information of the symbols inside AOT-generated AN file should be fixed to support profiling tools parsing. After fixing the missing symbol information, the call-stack would display the functions' symbols in perf data.

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7ZA9B

Testing: unittests/test262/workload

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>

Change-Id: I9c822fc81577e496383ba86eec53246165cb7b15
2023-09-10 18:15:50 +08:00
wanghuan2022
1a115a3de1 [Bug]: TakeHeapSnapShot数组相关性能优化二
desc: TakeHeapSnapShot数组相关性能优化二

solu:
对于array里的elements元素,其下标不以字符串的形式存在stringtable,而是直接存整数。这样可以减少生成文件shapshot的strings一栏的条目数,加快解析速度

issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VFNS

Signed-off-by: wanghuan2022 <wanghuan80@huawei.com>
Change-Id: I098200293249d617ff417b9346e6232bbc946ed1
2023-08-30 11:41:47 +08:00
quiet-thought
88dc8aab97 Bugfix on BuiltinsArray::Join cicular reference problem
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7NB0T

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: Ie63a9f76b0dcdee0e9422b6fa8e8886a78256c96
2023-07-24 15:58:59 +08:00
yingguofeng@huawei.com
3b107f900a Feat(Aot): Track Double/Int field for aot compiler
Issue: #I7JI0Z
Change-Id: I24f762d505cf467e86d5a12f3fc78c9ecd4513f1
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2023-07-12 21:55:16 +08:00
王笑佳
a3db09c594 Fix ecmascript::ObjectFactory::NewJSError存在空指针异常拒绝服务漏洞
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7C91I

Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
2023-06-27 17:22:31 +08:00
quiet-thought
3914d254ed Bugfix on Promise.all for memory leak
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6Y2WG

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: Id0ffce897afc63bb19384d9669012fd18bad44ab
2023-04-25 09:47:39 +08:00
openharmony_ci
bea7e416e2
!3571 Internationalized module isolation scheme (function isolation)
Merge pull request !3571 from zhujie/master
2023-03-14 08:17:46 +00:00
zhujie81
4f1af05245 Internationalized module isolation scheme (function isolation)
Isolation intl function code

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

Signed-off-by: zhujie81 <zhujie81@huawei.com>
2023-03-13 14:52:07 +08:00
zhangyukun8
62a3e35295 AOT support js stacktrace
1. add pcOffset into stackmap before call In AOT
2. parse stackmap to find pcOffset before any OptimziedJSFunctionFrame
3. remove use code of stubs in AOT
4. add testcase for js stacktrace of AOT

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6GXRR?from=project-issue

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: Ib21646b7319628fb425ac8ce489dc2370a347b81
2023-03-03 10:08:54 +08:00
lijiamin
96bbb22283 Add a JSNApi Interface to allow cross thread execution
Signed-off-by: lijiamin <lijiamin24@huawei.com>
Change-Id: I37cef273b6ce5b3eea167a71f3a88fa7d1b35c38
2023-02-28 11:08:46 +08:00
DaiHN
1d676b9df7 Throw JS error when find abc failed
--------
1. Remove redundant function interface.
2. Throw JS error when find abc failed
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I67R5D?from=project-issue

Signed-off-by: DaiHN <daihuina1@huawei.com>
Change-Id: I7b8cdc521d660d6651cf9b08863154756bbd0973
2023-01-17 21:01:22 +08:00
ding
d37f6d4596 AOT and ASM-Interpreter share builtins stub with call and new
1.Support new Builtins Constructor in Builtins Stub framework.
2.Support invoking Builtins Stub both ASM interpreter and AOT.
3.Add BooleanCosntructor implementation in Builtins Stub.
4.Add new log component: builtins
5.Add corresponding test case which can trace builtins execution path.
6.Add iterate stack map handler when entering by assembler.

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I631G9

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ie3a485a0383464ecc0b42be0a21baf50bb35bc21
2022-11-28 19:15:55 +08:00
wengchangcheng
22b88766fc Descriptor: Check module for quickfix and fix record name conflict with base and patch
Details:
1. Check import and export of base and patch
2. Add prefix of "Patch." for patch record

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5T0GG

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ibf55612e329915ce983798fc182fb1e1eaf21822
2022-09-26 17:33:03 +08:00
wengchangcheng
447847cb1d Merge remote-tracking branch 'origin/master' into wcc_0808
Change-Id: I1566e28d02d931b390ac5d7c3cb11c3485aed5de
2022-08-30 19:19:34 +08:00
dingwen
8448df7965 Throw OOMError instead of Fatal when jsheap is used up
Description:When jsheap is used up, throw OOMError instead of LOG(Fatal)
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5NXCQ

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I0f561f81fcd8a85ef5cf7792f9b455f0b5942959
2022-08-29 11:41:11 +08:00
wengchangcheng
ab13a0da91 Descriptor: support first level instruction
Details:
1. Add old Opcode defines
2. Add new inst handler of throw & wide & deprecated
3. Modify interpreter for new inst
4. Modify typeinfer for new inst
5. Modify asm interpreter for new inst
6. Modify aot circuit builder for new inst
7. Translate old inst to first level inst

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5LPNL

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If9e0b60cafc32a662a5fb1676887939d5a2b9ebf
2022-08-24 14:12:42 +08:00
Riachel
96adb30222 Descriptor: delete native_stack.h, trace.h and mem.h
details: delete native_stack.h, trace.h and mem.h
issue:https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I5IS38

Signed-off-by: Riachel <caolili14@huawei.com>
2022-07-28 19:15:13 +08:00
linxiang
4a082f4f0b use full-path for all headers.
Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: I20b5cf6245799839362b1999d3d9fb6955bf609a
2022-07-25 20:32:55 +08:00
linxiang
c2a5bbf66d Incorrect use of ACCESSORS interface, and delete the Interface
Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: I48c1e5529d8a2a3071c1e0df09c19af041f11cc3
2022-07-21 21:19:42 +08:00
wengchangcheng
6e5a7e8362 Descriptor: ark hilog refactor
details:
1. use hilog in ohos device
2. use panda logger in host
issue:  https://gitee.com/openharmony/ark_js_runtime/issues/I5FR5J

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6f5de00751154bdb6aac3101515961a3a4432e80
2022-07-06 22:55:49 +08:00
g00416891
b6588744f2 New EcmaRuntimeCallInfo in stack pointer
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I466a4107e6e073ffecea12e6986c112731d2d3bf
2022-07-05 14:54:43 +08:00
suchongwei
311fbeeb2a fix pending job hitrace
add hitrace point for pending job enque job and execute job

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

Signed-off-by: suchongwei <suchongwei@huawei.com>
2022-06-29 18:44:27 +08:00
wengchangcheng
cc184ba66c Descriptor: delete some internal unused code
details: delete unused code
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5COHE

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I5fe62c58353839d4aac1144fc99e2cf87f4374eb
2022-06-17 23:03:42 +08:00
xujie
81a69cf09f 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
xiongluo
4ef6863643 Add interface to dump in faultlog and private param to hide string and number
Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-05-17 22:42:10 -10:00
ding
574d8ca344 Fix aot newobjdynrange, Add relevant testcase, Some aot Refactor
1.Fix aot newobjdynrange by call JSFunction::Construct.

2.Add native new test case(new non-native constructor depends on
`defineclass`).

3.Add StackAssertScope in debug mode.

4.Delete retired `call` code in runtime_stubs.

5.Refactor GetArg from macros to inline function in RuntimeStubs.

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ic89b98af11f2e2fc97aaeba1704d27a95d2c0c7b
2022-05-17 15:49:53 +08:00
wenlong12
6c951ee7e4 replace bytrace key to hitrace_meter
Signed-off-by: wenlong12 <wenlong12@huawei.com>

Signed-off-by: wenlong12 <wenlong12@huawei.com>
2022-05-12 16:37:03 +08:00
ZhenyuPan
ba7849273d for ark_js_vm on mac
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I55GYU
Change-Id: I3faad1171ed2ef08660c62f0ff6c88b34c5cbcfa
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-05-09 09:06:58 +08:00
wenlong12
a3dd452528 update bytrace warehouse name
Signed-off-by: wenlong12 <wenlong12@huawei.com>

Signed-off-by: wenlong12 <wwx1097114@DESKTOP-2021EGU.localdomain>
2022-05-05 10:05:13 +08:00
yingguofeng@huawei.com
5037c8aac6 Delete useless code dependencies
To reduce 'libark_ jsruntime.so' ROM size, delete useless code dependencies.

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

Profit: libark_jsruntime.so size reduce from 3455(kb) to 2001(kb)

Change-Id: Ie7430fca6f539c9baff1f4aae7942da6fc9ef135
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-24 18:02:32 +08:00
guobingbing
1f9cc2e2cd check if thread have exception before GetJSError
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: If0e26e1cf25a2b25339020cdcc3ec081daa25b3e
2022-04-22 14:28:09 +08:00
ding
b018a9b0f2 Control whether to print compiler logs through JSRuntime Options
Add option log-compiled-methods to print the compiler(both stub and aot) in units of methods.

Add class CompilerLog.

Refactor some compiler logs.

Unie the log invoked way(COMPILER_LOG or COMPILER_OPTIONAL_LOG).

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I43ce61d0ba9d453713ab3e6349d07f6d9cde3e5e
2022-04-14 16:14:34 +08:00
dingwen
1a2fdbb738 Add snapshot generation step for aot compiler and testing entry of aot compiled function.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOXH
Signed-off-by: dingwen <dingwen6@huawei.com>

Change-Id: I2a52b06453f48407c418e57b3ce62e710042768b
2022-04-10 14:59:33 +08:00
dingwen
861d97bb87 SnapShot serialize and deserialize by using ObjectXray visit object
field
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOXH

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I6e03cfb4f7b89786b612b56adc0877f8b178058e
2022-04-10 12:32:07 +08:00
xliu
bddb55c976 ObjectFactory New Ecmastring Rectification
Description
  1. There are many kinds of interfaces to construct ecmastring from objectfactory
     in the virtual machine, and the name is not clear, so it is complex to use;
  2. Some of the unchecked interfaces are prone to errors during use. If there is
     no compression where compression is required, unpredictable errors will occur.
Issue:
  #I4ZL7X: ObjectFactory New Ecmastring Rectification

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I856f4e2e1df62823d928d738fa35affa97dbd3ed
2022-04-09 10:34:11 +08:00
guobingbing
96190e252b FFI optimization for call params
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I61b820e91b85364e4f41d35ca0172ad059a1b916
2022-04-07 21:13:46 +08:00
wuzhefeng
6b35395855 Refactor redundant codes
Remove redundant codes, like the variables that have the same
functionality. Besides, Some variables and functions' names are improper
and should be renamed in order to improve the readability.

issues: I50D00

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Iecb75cd924167d53b4f12c572f18a8b9e3a9c0a7
2022-03-29 23:49:20 -07:00
wengchangcheng
99934b9037 add Wextra and Werror in gn args
1. add -Wextra and -Werror to check code format error
2. modify all compiler error

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If5fdd1980494269b4c06bf1bb38a8eba7952adea
2022-03-24 21:45:19 +08:00
luochuhao
905d0496dc Refactor ID definition and callSignature initialization mechanism of stubs
Refactor ID definition and callSignature initialization mechanism of runtime stub,
optimizer stub and bytecode handler stub,
reduce amount and complexity of macro used in calling those stubs.

Add stubDes struct to classify stubs both in AOT file generation phase
and AOT file loading phase.

Fix some circular dependency problems in including header files.

Fix certain inline function declaration and definition format problems, which could lead to
compiling errors.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VMLD?from=project-issue
Test: stubTest(unit test), richards with asm interpreter enabled
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ibd5fcd963347b97f8dec227f3245d2064463b0b0
2022-03-18 22:01:52 +08:00
zhaozhibo
763eeb3140 Fix internal issue list problem
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-03-14 15:19:45 +08:00