Commit Graph

12 Commits

Author SHA1 Message Date
wuzhefeng bf8671a948 Refactor Compilation Framework Part-3
There are many similar "call" in the CircuitBuilder and most of them can
be merged or removed. Merge the similar ones and remove the redundant
ones to improve the maintainability and readability.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Ie575580a5d4d3eae67eff49efd8df126d96db48f
2022-05-14 20:21:38 -07: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
zhaozhibo e0ad13d0c4 fix codex warning
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-25 14:33:01 +08:00
songzhengchao ecf5fd6eb0 Refactor Logical shift operation
the logical shift does't care signed/unsigned.sometime using UINTxx/Intxx, which is very confusing.

logical operation don't distinguish with int/uint and remove Archxx function

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

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Idaf71b46227917d2cb08c35118e71c2a66b79fd3
2022-04-21 20:08:23 +08:00
songzhengchao fb35927a32 Implement Proxy Lowering on x86
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
2022-04-15 16:39:42 +08:00
taohong b82a13c5f1 Add STLETTOGLOBALRECORD etc slow path
Add STLETTOGLOBALRECORD bytecode slow path

Signed-off-by: hongtao <hongtao11@huawei.com>
Change-Id: Ie0f504b67b8fd8b9e1e339acdfb1831fbdeba601
2022-04-11 20:47:16 +08:00
openharmony_ci 9213c20372 !953 fix setpropertyby*** stub error
Merge pull request !953 from wanghuan2022/master
2022-04-11 07:13:22 +00:00
wanghuan 541d798d35 fix setpropertyby*** stub error
desc: fix setpropertyby*** stub error

solu:
1.add useown stub and not useown stub in common stub
2.Unit useown stub and not useown by using bool value in stub

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I7a0f68d065cb5b27f60db91af8a87216c47a1f6f
2022-04-09 18:30:26 +08:00
lijincheng 98e9ee462d Aot Lowering
1.lower GETNEXTPROPNAME_PREF_V8, COPYDATAPROPERTIES_PREF_V8_V8, CREATEOBJECTWITHEXCLUDEDKEYS_PREF_IMM16_V8_V8
      CREATEREGEXPWITHLITERAL_PREF_ID32_IMM8, STOWNBYVALUE_PREF_V8_V8, STOWNBYINDEX_PREF_V8_IMM32, STOWNBYNAME_PREF_ID32_V8
      DEFINEGENERATORFUNC_PREF_ID16_IMM16_V8, DEFINEASYNCFUNC_PREF_ID16_IMM16_V8, COPYMODULE_PREF_V8

2.move CompilationConfig to CircuitBuilder. Enable aot's ability to identify platform differences.

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

Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-04-07 10:30:33 +08:00
wuzhefeng 1e2aa2a487 Refactor Code
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
2022-03-31 16:16:31 -07:00
wengchangcheng 4f169b31a5 add -Werror -Wextra gn flag for 'compiler'
1. ignore llvm warning
2. fix warning of compiler module

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I09774e431743a26ea366ed28e3276ff027ae0d31
2022-03-25 15:31:59 +08:00
wuzhefeng aa44e06513 Fix compilation errors
Because there are some macros that trigger compilation errors when
compiling stub-compiler and aot-compiler. The root cause is that several
classes declarations are missing from the associated macros. This PR
fixes the issues via adding the lost classes to the macros. Besides, we
also rename the FastStub to CommonStubs in order to make the stub-arch
more readable.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I16263fef7deeadf8a9ce4e5252a6e9898a7742bc
2022-03-18 18:17:21 -07:00