mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-26 19:50:55 +00:00
Fix return value of ark_aot_compiler
Issue: IAOZIY Signed-off-by: sunzibo <sunzibo@huawei.com>
This commit is contained in:
parent
ce168b8bc4
commit
e16fcd5a4d
@ -211,7 +211,7 @@ int Main(const int argc, const char **argv)
|
||||
|
||||
passManager.CompileValidFiles(generator, ret, compilerStats);
|
||||
if (compilerStats.GetCompilerMethodCount() == 0) {
|
||||
return ERR_AN_EMPTY;
|
||||
return runtimeOptions.IsPartialCompilerMode() ? ERR_AN_EMPTY : ERR_OK;
|
||||
}
|
||||
if (!generator.SaveAOTFile(cOptions.outputFileName_ + AOTFileManager::FILE_EXTENSION_AN, appSignature)) {
|
||||
return ERR_AN_FAIL;
|
||||
|
@ -403,6 +403,7 @@ group("ark_aot_ts_assert_test") {
|
||||
"and",
|
||||
"array_bounds_check_elimination",
|
||||
"check_dump",
|
||||
"empty",
|
||||
]
|
||||
foreach(test, assert_test_list) {
|
||||
deps += [ "${test}:${test}AotAssertAction" ]
|
||||
|
19
test/aottest/empty/BUILD.gn
Normal file
19
test/aottest/empty/BUILD.gn
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//arkcompiler/ets_runtime/test/test_helper.gni")
|
||||
|
||||
host_aot_assert_test_action("empty") {
|
||||
deps = []
|
||||
is_enable_pgo = true
|
||||
}
|
14
test/aottest/empty/empty.ts
Normal file
14
test/aottest/empty/empty.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
@ -14,3 +14,4 @@
|
||||
[trace] Opcode: LOAD_ELEMENT Count:2
|
||||
6
|
||||
7
|
||||
true
|
||||
|
@ -13,3 +13,4 @@
|
||||
|
||||
6
|
||||
7
|
||||
false
|
||||
|
@ -42,6 +42,10 @@ class C3 {
|
||||
}
|
||||
const v9 = new C3(SendableMap, '-39635');
|
||||
|
||||
let x = "filter"["length"]
|
||||
x++
|
||||
print(x)
|
||||
function testInc() {
|
||||
let x = "filter"["length"]
|
||||
x++
|
||||
print(x)
|
||||
}
|
||||
testInc()
|
||||
print(ArkTools.isAOTCompiled(testInc))
|
||||
|
Loading…
Reference in New Issue
Block a user