mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
Fix compilation issue on ArkUI-X
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6D1KG Signed-off-by: Zhenyu Pan <panzhenyu1@huawei.com> Change-Id: I741d4a2ccd14ec5f9cda336593af6615f2fa609b
This commit is contained in:
parent
bc4484cb7d
commit
016bcbb26b
20
BUILD.gn
20
BUILD.gn
@ -22,7 +22,7 @@ group("ark_js_packages") {
|
||||
"//arkcompiler/ets_runtime/ecmascript/js_vm:ark_js_vm",
|
||||
"//arkcompiler/ets_runtime/ecmascript/quick_fix:quick_fix",
|
||||
]
|
||||
if (current_cpu == "arm64") {
|
||||
if (current_cpu == "arm64" && is_ohos) {
|
||||
deps += [ "ecmascript/compiler:ark_aot_compiler($build_root/toolchain/ohos:ohos_clang_arm64)" ]
|
||||
}
|
||||
}
|
||||
@ -706,13 +706,19 @@ if (is_mingw) {
|
||||
"ecmascript/platform/unix/mac/os.cpp",
|
||||
"ecmascript/platform/unix/mac/backtrace.cpp",
|
||||
]
|
||||
} else if ((is_ohos && is_standard_system) || target_os == "android") {
|
||||
ecma_platform_source += [
|
||||
"ecmascript/platform/unix/linux/os.cpp",
|
||||
"ecmascript/platform/unix/ohos/backtrace.cpp",
|
||||
]
|
||||
} else if (is_linux) {
|
||||
ecma_platform_source += [
|
||||
"ecmascript/platform/unix/linux/os.cpp",
|
||||
"ecmascript/platform/unix/linux/backtrace.cpp",
|
||||
]
|
||||
} else {
|
||||
ecma_platform_source += [ "ecmascript/platform/unix/linux/os.cpp" ]
|
||||
if (is_ohos && is_standard_system) {
|
||||
ecma_platform_source += [ "ecmascript/platform/unix/ohos/backtrace.cpp" ]
|
||||
} else {
|
||||
ecma_platform_source += [ "ecmascript/platform/unix/linux/backtrace.cpp" ]
|
||||
}
|
||||
print("Invalid os!")
|
||||
assert(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ JSTaggedValue BuiltinsFunction::FunctionPrototypeBind(EcmaRuntimeCallInfo *argv)
|
||||
// 10. Let status be DefinePropertyOrThrow(F, "length", PropertyDescriptor {[[Value]]: L,
|
||||
// [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
|
||||
PropertyDescriptor desc(thread, JSHandle<JSTaggedValue>(thread, JSTaggedValue(lengthValue)), false, false, true);
|
||||
bool status =
|
||||
[[maybe_unused]] bool status =
|
||||
JSTaggedValue::DefinePropertyOrThrow(thread, JSHandle<JSTaggedValue>(boundFunction), lengthKey, desc);
|
||||
// 11. Assert: status is not an abrupt completion.
|
||||
ASSERT_PRINT(status, "DefinePropertyOrThrow failed");
|
||||
|
@ -222,14 +222,14 @@ JSHandle<JSArray> JSLocale::SupportedLocales(JSThread *thread, const JSHandle<Ta
|
||||
// a. Let options be ? ToObject(options).
|
||||
// b. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
|
||||
// 2. Else, let matcher be "best fit".
|
||||
LocaleMatcherOption matcher = LocaleMatcherOption::BEST_FIT;
|
||||
if (!options->IsUndefined()) {
|
||||
JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, options);
|
||||
RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSArray, thread);
|
||||
|
||||
matcher = GetOptionOfString<LocaleMatcherOption>(thread, obj, globalConst->GetHandledLocaleMatcherString(),
|
||||
{LocaleMatcherOption::LOOKUP, LocaleMatcherOption::BEST_FIT},
|
||||
{"lookup", "best fit"}, LocaleMatcherOption::BEST_FIT);
|
||||
[[maybe_unused]] LocaleMatcherOption matcher = GetOptionOfString<LocaleMatcherOption>(thread,
|
||||
obj, globalConst->GetHandledLocaleMatcherString(),
|
||||
{LocaleMatcherOption::LOOKUP, LocaleMatcherOption::BEST_FIT}, {"lookup", "best fit"},
|
||||
LocaleMatcherOption::BEST_FIT);
|
||||
RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSArray, thread);
|
||||
}
|
||||
|
||||
|
@ -649,7 +649,7 @@ int SourceTextModule::Evaluate(JSThread *thread, const JSHandle<SourceTextModule
|
||||
{
|
||||
// 1. Let module be this Source Text Module Record.
|
||||
// 2. Assert: module.[[Status]] is "instantiated" or "evaluated".
|
||||
ModuleStatus status = module->GetStatus();
|
||||
[[maybe_unused]] ModuleStatus status = module->GetStatus();
|
||||
ASSERT((status == ModuleStatus::INSTANTIATED || status == ModuleStatus::EVALUATED));
|
||||
// 3. Let stack be a new empty List.
|
||||
CVector<JSHandle<SourceTextModule>> stack;
|
||||
|
@ -38,7 +38,7 @@ void WaiterList::DeleteNode(WaiterListNode *node)
|
||||
auto iter = locationListMap_.find(node->waitPointer_);
|
||||
ASSERT(iter != locationListMap_.end());
|
||||
WaiterListNode *temp = iter->second.pHead;
|
||||
bool flag = false;
|
||||
[[maybe_unused]] bool flag = false;
|
||||
while (temp != nullptr) {
|
||||
if (temp == node) {
|
||||
flag = true;
|
||||
|
Loading…
Reference in New Issue
Block a user