Commit Graph

65 Commits

Author SHA1 Message Date
wengchangcheng c2e20b03d5 Descriptor: debugger refactor of independent js_runtime [ part-1 ]
details: using stl instead of js_runtime container ans string
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AYKS

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I32b4809a4bbd759a562326a59e0cfb0e8e728297
2022-06-07 17:47:53 +08:00
Riachel 557c07bb07 Descriptor: support heapprofiler domain
details:
1. add statsUpdate event
2. add lastObjectId event
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AUJA

Signed-off-by: Riachel <caolili14@huawei.com>
2022-06-07 11:29:50 +08:00
wengchangcheng 9ea13c48f9 Descriptor: debugger refactor [ part-1 ]
details:
1. delete unused method
2. modify file dir
3. add event channel for every domain
4. implement domain function in agent and delete js_backend
5. modify dispatchTable to static
6. modify debugger_api
7. modify js_debugger and add debugger_executor
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I58LOO

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I7747bf3ad66e9a180d6179e45be5bcaf4161b29b
2022-06-01 23:00:13 +08:00
yaoyuan cfdfd3e1b9 Description:
Reduce redundant code by using predefined global constants instead of creating new constant strings
Move all global constant strings into nonmovable space to improve code efficiency.

Issues: https://gitee.com/openharmony/ark_js_runtime/issues/I588TY

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I1f92188175c3129c5d8cec72a0396f11ce17c1c7
2022-05-31 17:38:54 +08:00
Gongyuhang 77411b7e75 Descriptor:
The debugger behaves unexpectedly after step operations
    act on the commands after a command modified by "await"
Details:
    Make the debugger pause at the begin of
    PendingJob::ExecutePendingJob function
Issue:
    https://gitee.com/openharmony/ark_js_runtime/issues/I5936Z

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-05-25 14:55:05 +08:00
zhangyukun 9f15b59632 Fix 262 of rsp on x64
1. skip builtin frame and asm interpreter entry frame when upframe
2. skip push args when argc is 0
3. check thread exception, rather not ret value
4. deal with fp when entry Execute
5. deal with call class Constructor
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I58I4H?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I874f1437d5d21a8cf50a8d9ca73d7a92007f1bab
2022-05-23 18:42:48 +08:00
wengchangcheng a4f9603e75 Descriptor: modify stream and add switch of enable_dump_in_faultlog
details:
1. call EndOfStream after WriteChunk
2. add switch of enable_dump_in_faultlog
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I58KLM

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I1c9b26873eae47f8e9e5788cd7a477f32738efc9
2022-05-21 16:37:04 +08:00
xiongluo 5122d18dca 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
Riachel df34983177 add reportprogress
reportprogress value before StopHeapTracking or DumpHeapSnapshot
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I57VAP

Signed-off-by: Riachel <caolili14@huawei.com>
2022-05-17 20:12:15 +08:00
Gymee 3fe7a9313e fix crash when JsDebuggerManager destroyed
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: Ia11785865c0f68f1fe562a9cb6439026334b11ac
2022-05-16 16:18:59 +08:00
openharmony_ci 42355bd8fb !1262 Refactor Compilation Framework Part-2
Merge pull request !1262 from Gargoyle.h/wzfmaster-dev
2022-05-11 12:29:01 +00:00
wuzhefeng 662f2b78a6 Refactor Compilation Framework Part-2
1. Rename IR builder to improve the readability.
2. Remove redundant Headers to decouple the relationships of components.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I0c8da6cd55bb8e7f33421ba846bab89bd5e06c55
2022-05-11 04:28:10 -07:00
Gymee 832160451d update local scope object when it changed
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I3b7bfdf71aec34fb42e393148048765b4d51ef65
2022-05-09 16:24:11 +08:00
Gymee 904a4300da support evaluate on target callframe
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I4e4b4b4f621706e5bb7e88e651fd9f3fb21c2b37
2022-05-09 13:56:17 +08:00
openharmony_ci 221548d043 !1201 add closure variables to local scope
Merge pull request !1201 from Gymee/fix_localscope
2022-05-05 15:46:54 +00:00
openharmony_ci 1c06dd45fe !1062 [js_runtime]support multi-instance in ark debugger
Merge pull request !1062 from huangfeijie/master
2022-05-05 13:41:29 +00:00
Gymee 96292cb45c add closure variables to local scope
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I0ce49467a5cfa027b7ab2f87d9c35ca8c9cd9ba6
2022-05-05 21:24:53 +08:00
openharmony_ci a746af5fb6 !1200 fix construction of framehandler for debugger evaluation
Merge pull request !1200 from Gymee/bugfix
2022-05-05 13:20:19 +00:00
openharmony_ci de6782e141 !1187 add FileStream::Good
Merge pull request !1187 from wwx1083752/master
2022-05-05 10:44:56 +00:00
Gymee f4e412ef1e fix bug for refactoring FrameHandler
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I475f474c29a9e7e79dd1eab5fe3b495ebc3be24f
2022-05-05 15:48:50 +08:00
h00611971 24809b8239 support multi-instance in ark debugger
modify the interface in ark debugger
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53TEF
Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-05-05 11:31:18 +08:00
wwx1083752 cf9ab9530c support dump default heapfile
1. add FileStream::Good
2. dump default file when input file is invalid

issue:https://gitee.com/wwx1083752/ark_js_runtime/issues/I55E7O

Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-05-05 10:43:08 +08:00
guobingbing 129ebdbf25 refactor class FrameHandler
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I9f3ff0c04d34a31a34f21da637689eb61d4166f1
2022-05-04 10:36:44 +08:00
openharmony_ci d15ba0db5c !1168 add heapprofiler domain
Merge pull request !1168 from Riachel/master
2022-04-28 13:19:48 +00:00
Riachel 3cbf8878ac add heapprofiler domain
Signed-off-by: Riachel <caolili14@huawei.com>
2022-04-28 16:15:49 +08:00
Gongyuhang 7d3a405863 Change the type of the returned value from "void" to "bool" for
JSPtHooks::SingleStep(...) function, make it return true only when it
has actually invoked the backend_'s NotifyPaused(...) function.
And let the ByteCodePcChanged(...) function pass over the
HandleBreakPoint(...) function when the HandleStep(...) function returns
 true.

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

Changes:
    modified:   ecmascript/tooling/agent/js_backend.cpp
    modified:   ecmascript/tooling/agent/js_backend.h
    modified:   ecmascript/tooling/agent/js_pt_hooks.cpp
    modified:   ecmascript/tooling/agent/js_pt_hooks.h
    modified:   ecmascript/tooling/interface/js_debug_interface.h
    modified:   ecmascript/tooling/interface/js_debugger.cpp
    modified:   ecmascript/tooling/test/utils/testcases/js_single_step_test.h
    modified:   ecmascript/tooling/test/utils/test_hooks.h

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-28 15:20:07 +08:00
wengchangcheng a666966691 Descriptor: add file stream for heap dump
details: add file stream for heap dump
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I54S6V

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I45435df049d5e67480b5d8332d3e54895f15f796
2022-04-26 16:07:39 +08:00
Gymee 909b9081a9 debugger refactor
Change-Id: Idff2f871926a3893b5bd962f13b4a10c39f9f6d9
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-04-24 11:35:13 +08:00
openharmony_ci 9228e821e7 !1100 add host debugger module test
Merge pull request !1100 from changcheng/debugger_host_testcase
2022-04-22 13:57:18 +00:00
wengchangcheng 3ae043afa5 Descriptor: enable testcase with ecmavm instead of runtime
details:
1. add debugger module testcase in host
2. fix debugger crash when throw exception in interpreter
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53WBO

Change-Id: Ia7d878b0b81c011d940a9187d39c854f6a592e6d
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-04-22 20:42:16 +08:00
Riachel 6991e9269f add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 12:09:04 +08:00
Riachel fe1a836f43 add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 11:05:59 +08:00
Riachel e45be79574 add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 10:57:29 +08:00
Riachel 03262e3bda add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 10:42:00 +08:00
xiongluo 771d51b546 refactor jsMethod
1. Move necessary fileds in jsMethod
2. Make jsMethod inherit aligned struct
3. Change some function names for easy reading

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-20 23:17:00 -10:00
Gymee 902e99d08c fix code review problems
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: If382b34005b2e76861106e40beff8d430c8d3a7f
2022-04-19 09:36:45 +08:00
Gymee 83048efbf1 support watch expression and conditional breakpoint
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I794a5ee770f251e6fea4de5058575519ff0490e6
2022-04-18 20:04:33 +08:00
wengchangcheng d6c835caea Descriptor: debugger refactor
details:
1. debugger refactor, don't use runtime debugger
2. fix debugger crash

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I08e3c86bf659b9e0a44d014d13b11462d50218b3
2022-04-17 01:16:26 +08:00
wengchangcheng 2e4dbad3a3 [part-1] support watch expression
1. delete unused execute arguments
2. support select execute entry
3. support get execute return value

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I40139e2f4afa36ad7d169d7f6c367a62a40bf476
2022-04-09 22:53:42 +08:00
guobingbing 589234007e FFI optimization for call params
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I61b820e91b85364e4f41d35ca0172ad059a1b916
2022-04-07 21:13:46 +08:00
wengchangcheng 4e08cec6ee [part-1] delete "*-inl.h" of newest codex rule
move the definition to the declare head file

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ieeb0ec96281cda51d0bebd6a2e771fc8d4078306
2022-04-07 14:14:49 +08:00
wengchangcheng 0b4981525d refactor stl container
1. using runtime container instead of stl container
2. change debugger line amd column type to int32_t

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I0eb4651f17c6f6894f11de1ba904bcbe83a57db7
2022-04-06 16:05:22 +08:00
wengchangcheng 7c0ca961f5 refactor debugger extractor
1. rename js_pt_extractor
2. move debug_info_extractor to js_runtime
3. use map to store MethodDebug info and LocalVariable info
4. refactor ScopeInfo extractor

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Id64d718aa9360afd53398ee729714c859bd61768
2022-03-30 17:49:11 +08:00
wengchangcheng 4804cd80d3 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
openharmony_ci 9614384797 !815 Fix code review from issue
Merge pull request !815 from songzhengchao/reviewcode0321
2022-03-22 08:36:13 +00:00
songzhengchao 718b37beb0 Fix code review from issue
bool variable shoule assign value;
code delete reduant ";" and " ";
class construct function signal parameter shoule add explicit;
function declare return void when caller don't need return value;
and etc

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4YXYH?from=project-issue
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I59e26d49f94e98a4cced7a5852df3029a5544d47
2022-03-22 14:25:18 +08:00
wengchangcheng fbf3c4a035 share constpool, and modify some code refactor
1. cache constpool in ecma vm
2. use JSPandaFile instead of panda_file::File
3. make GenerateProgram as a static function
4. add a singleton of JSPandaFileManager::GetInstance()

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ic7ccd66764c3a020e575d4046e1792475d45be6b
2022-03-21 21:46:25 +08:00
sunzhe23 57fe644984 refactor runtime trampoline id
Description:
add runtime_trace for runtime trampoline
mov runtime_trampolines.cpp info cmascript/trampoline/
rename FAST_STUB_ID as RUNTIME_CALL_ID

issue: #I4XBC9

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-11 02:17:24 -08:00
y00576111 a1796a573e EcmaScript Standard Module Implementation
Delete the existing module implementation and
re implement the module function according to the ECMA 2018 specification

issue: #I4NZQT [https://gitee.com/openharmony/ark_ts2abc/issues/I4NZQT]

Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I8d381db7f8bf2f3d6b2a5c21cbc3cbab1aef0b9b
2022-03-10 19:10:42 +08:00
wengchangcheng 7c7b0e5097 fix actor bug
modify actor for app start

issue:https://gitee.com/openharmony/js_worker_module/issues/I4SMW8

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Iad48f3173a963c4290701a708f41832359c88b02
2022-03-02 15:33:19 +08:00