Frame Handler directly operate frame(set
callsitesp/returnAddr/getPrevFrame,etc) which is hard to maintain.
Frames are operated by FrameIterator.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5CKVR?from=project-issue
Change-Id: Iba1c44c1ab1afec8b5bea0111f4e986b47cc8bc4
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
The background of the problems is as follows:
1 Current iterator current Frame, visit previous Frame stackmap, it's hard to understand.
2 refactor llvm_stackmap_parser
3 refactor frameHandler, we should provider iterator to visit frame.
The solution of the problems is as follows:
1 FrameHandler Ietrator only visit current Frame stackmap
2 In the future, multiple vm may be existed such as multiple worker.while llvm_stackmap_parser is singleton which is not good, each vm should have one stackmap.
3. refactor frame add FrameIterator to visit frame
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BSW4
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I65988624ef42a28788a5268d898e37ebf752c901
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
1. fix getthis on x64
2. adapt optimization of newobjdynrange on arm64
3. add bridge frame to support GC of setter and getter
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BNC7?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I09c5fc89b2486d0b9988d9bef0af65f77dc2f684
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
Rsp is used in future work, therefore .S file should be deleted.
Issue: #I5AGW3
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib1fb140d40d259bc4519fbf547857e5f80e9ee0c
description:
1 Refactor Call Dispatcher, and Regactor common call
2 use circuit IR implments getter/setter
issue: I59POB
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
description:
1 add align up for rodata section, incase movdqa crash
2 set gc leaf function attribute for no gc all
3 fix mega ic run slowpath bug for asm interpreter
4 remove trampoline unused code
issue: #I58VFA
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
Remove/improve some unused data structures like FrameConstants, which
should be moved to some arch-related places.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I57TGW
Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: If6699f5916e5c289375f97995c8e2570b081cda8
1.add lastFp_ into GlueData to restore rsp in exception handler
2.add AsmInterpreterEntryFrame to exit Execute when use rsp
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5733D?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ia3c9301f3854b7d9cfb46dabbae82186b86348a3
Add new stackless stub to syncronize asm interpreter with C interpreter.
Issue: #I54DXV
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie6bef96e4ecd692d5a32a13eaa719859424c4b24
1. add fp to support discontinuous frame gc and resume rsp
2. assemble execute and impl entry frame with rsp
3. use assembler to refactor .s
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52BQE?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I6966672dc065d63144fe7fa145ab76571189d540
description:
Add SaveCurrentFrame for interpreter handler call stub and
get get callsite sp when gc run
issue: I54IMV
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
when function need call another js function, it will lowering to call "JSCall" trampoline function
JSCall trampoline function will check calltarget function, then correct the arguments, finally jump
the native or optimized code address of the target function.
JSCall(glue, argc, calltarget, ....)
then proxy call(glue, argc, callTarget, argv[])
if proxy->GetHandler is function
tail call JSCall(glue, argc, callTarget, argv); // consider performance
else
//Call(trap, handler, «target, thisArgument, argArray»)
call CreateArrayFromList(glue, argc, argv[]) ---> arrHandle // maybe trigger GC, construct OptimizedWithArgvLeaveFrame, visitor argv[0]..argv[argc-1]
call JSCall(glue, argc, method, argv[])
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52T6B?from=project-issue
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I994aae1eb9cbf51982348ae6e203c24c326f617e
Change several structures for call stub.
Related issue: #I4XK12
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie7389ff96c619451304a3f0d352b271310c4b73e