Commit Graph

24 Commits

Author SHA1 Message Date
wengchangcheng e7be0def3b Descriptor: fix debugger testcase fail
details: free hook after thread terminate
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I56588

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ifdf47d989ad4f49ffcb4ccb71ce910a5ef4996c8
2022-05-06 20:21:52 +08:00
wengchangcheng dcac52ac03 Descriptor:fix ut fail and modify debugger test
details:
1. fix icu path error
2. modify debugger unittest
3. modify gn target
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I55WGN

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I1c924fd90297a5172ca5aabace36b6e250dc312b
2022-05-05 20:49:16 +08:00
h00611971 aa3faab847 clear extractors when destroy instances
1.remove the info concerned in the extractors when release JSPandafile.
2.clear the extractors when JSPandafile's destructor is called.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I55CK0
Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-05-05 10:16:09 +08:00
openharmony_ci 4bcfb3a72c !1179 disable unstable testcase
Merge pull request !1179 from changcheng/fix_ut_error
2022-04-28 23:36:19 +00:00
wengchangcheng ed785a039e Descriptor: disable unstable testcase
details: disable debugger single step test
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I559CM

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I5913f96c782211ff93b26cf1259a4d96e93bb801
2022-04-28 23:13:43 +08:00
wengchangcheng e8144ffd5a Descriptor: modify performance of debugger
details: skip check -1 when there's no step event
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I558VZ

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ie65d521cbc79ddd36d05c263dd5ccfd5d82e0b5c
2022-04-28 21:12:37 +08:00
openharmony_ci e5c716767e !1160 Avoid JSBackend's pause caused by HandleBreakPoint(...) function right after its pause caused by HandleStep() function in one ByteCodePcChanged(...) function
Merge pull request !1160 from Gongyuhang/master
2022-04-28 09:48:29 +00: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
zhuguanghui123 495985a93b Funtions MatchWithOffset and callbackFunc split to two functions.Search separately by row and column.
variable extracted: methodId,offset

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

Signed-off-by: zhuguanghui123 <zhuguanghui9@huawei.com>
Change-Id: I4951f10f17fe2af756b336e56e61033ea7fab689
2022-04-28 13:30:51 +08:00
Gymee 909b9081a9 debugger refactor
Change-Id: Idff2f871926a3893b5bd962f13b4a10c39f9f6d9
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-04-24 11:35:13 +08: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
lifansheng a725676a6c Runtime architecture adjustment
Description
  Cut out most of the initialization logic in Runtime::Create and disconnect the
  inheritance relationship of most classes such as JSThread.
Issue:
  #I53418: Runtime architecture adjustment

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: Ib9c1a40354f77d32e515e23334e7f4b4a4fa3259
2022-04-21 14:37:31 +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 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
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
openharmony_ci 2215456260 !835 Clean Code For CodeHub Issues
Merge pull request !835 from wanyanglan/master
2022-03-22 04:42:20 +00:00
wanyanglan b6e56d3c3f Clean Code For CodeHub Issues
Modified file permissions, word spelling errors, and
programming specifications suggesting EXPECT_EQ instead
of EXPECT_TRUE

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I00eb9be48d481ce2bdaa4a621246ff6c405abecf
2022-03-22 11:34:13 +08:00
xujie 479b7c3785 Clean Code For CodeHub Issues #96-#123 And #250-#264
According to the problems pointed out by the issuer and the
specifications compiled by Huawei, modify the non-compliant
parts of jsruntime.

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Iceb771dfd9f3aa9017205068fc50ab1a63aae08b
2022-03-21 17:09:19 +08:00
wengchangcheng 41b6272a74 fix testcase resource
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-26 14:50:25 +08:00
wengchangcheng e9bde01e45 add exception testcase
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-26 10:40:56 +08:00
wengchangcheng b5af7ac677 support column debugger
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-26 10:40:48 +08:00
wengchangcheng 0aae4c36a6 modify debugger events and api test
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I2b63f2d9af7eba0b5319e7ed459bb48e665f13d8
2022-01-14 15:24:38 +08:00