des: fix FastTypeOf error in bigint
solution:
1. add big int type judgment.
2. change variable name to be reasonable.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I51A5R
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I7f3284ea6d98b006c2df80585f7c946a0a4c1790
Because there are some redundant/unused/improper functions, this PR
remove them and improve the readability.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I50LRT
Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Ifa08f33a2819f3113234fdbf3ee2bb0e976d4071
description: fix getresumemode stub handle error
solution:
1.load offset error, should be GetIntptr;
2.get value from bitfield error because of lack of lsr;
3.set acc value error, should be build tagged.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOD5
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I96a35d134d5441f040cbf42d4e8ab2be208f166f
Implement llvmIRGeneration Pass in aot compiler pipeline.
Rename and reconstruct LLVMStubModule and LLVMModuleAssembler class. Move aot code infos
related to describe current (code size, begin addr, entry offset of each func etc.) AOT
snippet and corresponding serialization/deserialization func to NEW class called AotCodeInfo.
Move functions related to file reading/writing to NEW class called AotFileManager.
Add new call opcode in circuit IR to differentiate call into common stubs and call into
runtime interfaces without GC.
Adapt js runtime option for above changes.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZDY5
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: If0ab5927ad2551fe5567d1c7b18540fbcc38bc15
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
1. add HandleOverflow in unused positions of bcHandlers
2. add bytecode helper at the end of bcHandlers
3. Refactor Dispatch
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4YIQG?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Id51d1f2cc3c86f8fa1a59f6e79024bef406f7a21
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
Change several structures for call stub.
Related issue: #I4XK12
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie7389ff96c619451304a3f0d352b271310c4b73e
Description:
FastMul convert Int into Double, and lead to the result
call the double constructor of JSTaggedValue
Solution:
add Int Case for FastMul
Issue: #I4XK3U
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
1.modify transitions to weak reference and delete parent field in JSHClass.
2.add targeted test case to intercept the issue.
3.fix weak ref in parallel gc
4.fix TaggedCastToWeakReferentUnChecked() in stub
Change-Id: I118d293a04390fba6c21179a0a8ac7993dae5e96
Signed-off-by: ding <dingding5@huawei.com>
This PR refactors the design of JSThread by introducing aligned struct,
which is more friendly for ASM-Interpreter and Compiler IRs. Meanwhile,
to facilitate debugging, a macro enable_bytrace is introduced to control
the lib dependencies of ark-js-runtime.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4X0TG
Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I56835deec5d372d7c827ded26544a87766f29002
Modifications:
1 rewrite Add/Stub2Dyn
2 bytecode Inc/Dec use .rodata store a float 1.0 and crashed on amd64.
close double label for Inc/Dec on amd64
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
Modifications:
* Rename StubMachineType to VariableType
* Remove the information about signed/unsigned
* VariableType is a class that bundled MachineType and GateType (not an enumerator anymore)
Signed-off-by: Mingliang Zeng <zengmingliang1@huawei.com>
Reason: fix FastStub SetPropertyByName crash bug
Description: SetLayoutToHClass set the wrong machine type, and cause a crash.
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
Use Stub to impl handlers of bytecodes and use tail call to impl
dispatch of handlers of bytecodes
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I7afabdc40ddfa11345aa1029059514aa4f55b9f8
Description
To ensure the high performance of container classes, ArrayList is provided in ark.
Related issue
#I4T65T:Add Container ArrayList
Signed-off-by: liuganlin <liuganlin@huawei.com>
current machineType INT * FLOAT* confuse people to associate UINT*.
the INT* is simlar with LLVM IR too
we reanme machineType INT* FLOAT* rename to I* and F*
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4SC94
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ie188e07039cd9f26aed436ce96618ea4143fccd6
current stub Word*** function sometime handle unsigned int or signed
int, we refactor name it uint** or int** whichi is more clear
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4SC94
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ieb6e201d18c59fdd3fa7130b70389c54d619e3b2
construct function and refactor stub call runtime offset which's relative with
arch framework
current stub call runtime writebarrier, writebarrier stub is conveient
to optimized by llvm pass
region class markingbitmap should be not nullptr, it's good way to
inilized on construct class other than lazy inilized
current stub get member offset of runtime class, need to modify multiple
places which is not coveient to maintance. stub call offset by GetOldToxxxOffset and
CheckLayout which is checked by compile phase
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4SC94
Change-Id: Iec087f07ca27ef95b20ff65ea8bb9408b5887d9c
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
The current TypeCode is only used to represent the type of the MIR
and cannot represent the TS type data type. The type derivation
process needs to get the TS type information from the circuit ir.
Redefining the layout of TypeCode
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4SFHE
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I53292db81712b84210114f9f92c44b6236c356af
The current circuit ir is translated to llvm ir according to the type of opcode,
and depends on different platforms. circuit ir, as an intermediate state from MIR
to LLVM IR, only performs the conversion role and should not depend on different
platforms for different conversion operations.
The uniqueness of the opcode is removed, and the opcode is combined with a valuecode,
which indicates the uniqueness of each MIR.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4RP3H
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I2804e7ba9be58fcc4acf3d95a417224b7984018a