diff --git a/es2panda/BUILD.gn b/es2panda/BUILD.gn index 86804569e550da0371d2d514c78e79b4723cde97..ea572054368bebb5d5c18c6896ebf67850c99235 100644 --- a/es2panda/BUILD.gn +++ b/es2panda/BUILD.gn @@ -436,22 +436,9 @@ ohos_executable("es2panda") { } else { libs = [ libcpp_static_lib ] } - - # for statically linking pthread - ldflags += [ - "-Wl,--whole-archive", - "-lrt", - "-lpthread", - "-Wl,--no-whole-archive", - ] - } - - if (!is_mac) { - static_link = true } if (!use_musl) { - static_link = false ldflags += [ "-lc++" ] } diff --git a/es2panda/compiler/core/function.cpp b/es2panda/compiler/core/function.cpp index e9bd8fb4a3005d2e87ac1cbb9ddc845a803ad989..b7b8e9c39311201d4c84979d870c5f726726814a 100644 --- a/es2panda/compiler/core/function.cpp +++ b/es2panda/compiler/core/function.cpp @@ -82,11 +82,8 @@ static void CompileFunctionParameterDeclaration(PandaGen *pg, const ir::ScriptFu if (param->IsAssignmentPattern()) { RegScope rs(pg); - if (ref.Kind() == ReferenceKind::DESTRUCTURING) { - pg->LoadAccumulator(func, paramReg); - } else { - ref.GetValue(); - } + ref.Kind() == ReferenceKind::DESTRUCTURING ? + pg->LoadAccumulator(func, paramReg) : ref.GetValue(); auto *nonDefaultLabel = pg->AllocLabel(); diff --git a/es2panda/compiler/core/regAllocator.h b/es2panda/compiler/core/regAllocator.h index 202d43a1264017ef0c536b16eddbb58c388286ce..dd0f440c5f2ac206d9009db5b6e653a07a63fe90 100644 --- a/es2panda/compiler/core/regAllocator.h +++ b/es2panda/compiler/core/regAllocator.h @@ -85,17 +85,16 @@ private: std::vector *regsKind = nullptr) { Formats formats = ins->GetFormats(); - limit_ = 0; for (const auto &format : formats) { + limit_ = 0; for (const auto &formatItem : format.GetFormatItem()) { if (regsKind && formatItem.IsVReg()) { regsKind->push_back(formatItem.Kind()); } - if (formatItem.IsVReg()) { + if (formatItem.IsVReg() && limit_ == 0) { limit_ = 1 << formatItem.Bitwidth(); - break; } } diff --git a/merge_abc/BUILD.gn b/merge_abc/BUILD.gn index be0d3d72976acb0b7dcbc5e194b6b55b66083708..67efc3cb022dbe2881c531f9d67611ddd814fcf7 100644 --- a/merge_abc/BUILD.gn +++ b/merge_abc/BUILD.gn @@ -186,26 +186,13 @@ ohos_executable("merge_abc") { } defines = [ "PANDA_TARGET_LINUX" ] - - # for statically linking pthread - ldflags += [ - "-Wl,--whole-archive", - "-lrt", - "-lpthread", - "-Wl,--no-whole-archive", - ] } else if (is_mac) { defines = [ "PANDA_TARGET_MACOS" ] } else if (is_mingw) { defines = [ "PANDA_TARGET_WINDOWS" ] } - if (!is_mac) { - static_link = true - } - if (!use_musl) { - static_link = false ldflags += [ "-lc++" ] }