mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-06 23:54:03 +00:00
Fix arm64 build after build time PR
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAH020 Change-Id: I47923c619af17a3a8425eee9a3b6ed8f6132d912 Signed-off-by: Andrey Efremov <efremov.andrey@huawei-partners.com>
This commit is contained in:
parent
d735a33462
commit
0c4c9d6125
@ -20,6 +20,7 @@
|
||||
#include "ecmascript/js_api/js_api_tree_set.h"
|
||||
#include "ecmascript/js_array.h"
|
||||
#include "ecmascript/object_factory.h"
|
||||
#include "ecmascript/tagged_array-inl.h"
|
||||
#include "ecmascript/tagged_tree.h"
|
||||
|
||||
namespace panda::ecmascript {
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "ecmascript/module/js_shared_module.h"
|
||||
#include "ecmascript/patch/quick_fix_manager.h"
|
||||
#include "ecmascript/pgo_profiler/pgo_profiler.h"
|
||||
#include "ecmascript/tagged_array-inl.h"
|
||||
|
||||
#include "ecmascript/pgo_profiler/pgo_profiler_manager.h"
|
||||
#include "ecmascript/pgo_profiler/pgo_utils.h"
|
||||
|
@ -34,7 +34,15 @@ inline void TaggedArray::Set(const JSThread *thread, uint32_t idx, const JSHandl
|
||||
}
|
||||
}
|
||||
|
||||
inline JSTaggedValue TaggedArray::Get(uint32_t idx) const
|
||||
#ifndef ECMASCRIPT_TAGGED_ARRAY_CPP
|
||||
// `Get` is inlined when possible, including the case when it's used outside libark_jsruntime.
|
||||
// For other cases `Get` is defined with external linkage in tagged_array.cpp
|
||||
#define MAYBE_INLINE inline
|
||||
#else
|
||||
#define MAYBE_INLINE
|
||||
#endif // ECMASCRIPT_TAGGED_ARRAY_CPP
|
||||
|
||||
MAYBE_INLINE JSTaggedValue TaggedArray::Get(uint32_t idx) const
|
||||
{
|
||||
ASSERT(idx < GetLength());
|
||||
// Note: Here we can't statically decide the element type is a primitive or heap object, especially for
|
||||
@ -44,5 +52,21 @@ inline JSTaggedValue TaggedArray::Get(uint32_t idx) const
|
||||
return JSTaggedValue(Barriers::GetValue<JSTaggedType>(GetData(), offset));
|
||||
}
|
||||
|
||||
#undef MAYBE_INLINE
|
||||
|
||||
template <bool needBarrier>
|
||||
inline void TaggedArray::Set(const JSThread *thread, uint32_t idx, const JSTaggedValue &value)
|
||||
{
|
||||
ASSERT(idx < GetLength());
|
||||
size_t offset = JSTaggedValue::TaggedTypeSize() * idx;
|
||||
|
||||
// NOLINTNEXTLINE(readability-braces-around-statements, bugprone-suspicious-semicolon)
|
||||
if (needBarrier && value.IsHeapObject()) {
|
||||
Barriers::SetObject<true>(thread, GetData(), offset, value.GetRawData());
|
||||
} else { // NOLINTNEXTLINE(readability-misleading-indentation)
|
||||
Barriers::SetPrimitive<JSTaggedType>(GetData(), offset, value.GetRawData());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace panda::ecmascript
|
||||
#endif // ECMASCRIPT_TAGGED_ARRAY_INL_H
|
||||
|
@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ECMASCRIPT_TAGGED_ARRAY_INL_H
|
||||
#define ECMASCRIPT_TAGGED_ARRAY_INL_H
|
||||
#define ECMASCRIPT_TAGGED_ARRAY_CPP
|
||||
|
||||
#include "ecmascript/tagged_array.h"
|
||||
#include "ecmascript/tagged_array-inl.h"
|
||||
|
||||
#include "ecmascript/mem/barriers.h"
|
||||
#include "ecmascript/js_thread.h"
|
||||
@ -24,15 +24,6 @@
|
||||
#include "ecmascript/object_factory.h"
|
||||
|
||||
namespace panda::ecmascript {
|
||||
JSTaggedValue TaggedArray::Get(uint32_t idx) const
|
||||
{
|
||||
ASSERT(idx < GetLength());
|
||||
// Note: Here we can't statically decide the element type is a primitive or heap object, especially for
|
||||
// dynamically-typed languages like JavaScript. So we simply skip the read-barrier.
|
||||
size_t offset = JSTaggedValue::TaggedTypeSize() * idx;
|
||||
// NOLINTNEXTLINE(readability-braces-around-statements, bugprone-suspicious-semicolon)
|
||||
return JSTaggedValue(Barriers::GetValue<JSTaggedType>(GetData(), offset));
|
||||
}
|
||||
|
||||
JSTaggedValue TaggedArray::Get([[maybe_unused]] const JSThread *thread, uint32_t idx) const
|
||||
{
|
||||
@ -71,23 +62,6 @@ void TaggedArray::SetBit(const JSThread *thread, uint32_t idx, uint32_t bitOffse
|
||||
Set<false>(thread, idx, JSTaggedValue(element));
|
||||
}
|
||||
|
||||
template <bool needBarrier>
|
||||
void TaggedArray::Set(const JSThread *thread, uint32_t idx, const JSTaggedValue &value)
|
||||
{
|
||||
ASSERT(idx < GetLength());
|
||||
size_t offset = JSTaggedValue::TaggedTypeSize() * idx;
|
||||
|
||||
// NOLINTNEXTLINE(readability-braces-around-statements, bugprone-suspicious-semicolon)
|
||||
if (needBarrier && value.IsHeapObject()) {
|
||||
Barriers::SetObject<true>(thread, GetData(), offset, value.GetRawData());
|
||||
} else { // NOLINTNEXTLINE(readability-misleading-indentation)
|
||||
Barriers::SetPrimitive<JSTaggedType>(GetData(), offset, value.GetRawData());
|
||||
}
|
||||
}
|
||||
|
||||
template void TaggedArray::Set<true>(const JSThread *thread, uint32_t idx, const JSTaggedValue &value);
|
||||
template void TaggedArray::Set<false>(const JSThread *thread, uint32_t idx, const JSTaggedValue &value);
|
||||
|
||||
void TaggedArray::Set(uint32_t idx, const JSTaggedValue &value)
|
||||
{
|
||||
ASSERT(idx < GetLength());
|
||||
@ -271,4 +245,3 @@ void MutantTaggedArray::InitializeWithSpecialValue(JSTaggedType initValue, uint3
|
||||
}
|
||||
}
|
||||
} // namespace panda::ecmascript
|
||||
#endif // ECMASCRIPT_TAGGED_ARRAY_INL_H
|
||||
|
@ -40,10 +40,10 @@ public:
|
||||
JSTaggedValue GetBit(uint32_t idx, uint32_t bitOffset) const;
|
||||
|
||||
template<typename T>
|
||||
void Set(const JSThread *thread, uint32_t idx, const JSHandle<T> &value);
|
||||
inline void Set(const JSThread *thread, uint32_t idx, const JSHandle<T> &value);
|
||||
|
||||
template <bool needBarrier = true>
|
||||
void PUBLIC_API Set(const JSThread *thread, uint32_t idx, const JSTaggedValue &value);
|
||||
inline void Set(const JSThread *thread, uint32_t idx, const JSTaggedValue &value);
|
||||
|
||||
void Set(uint32_t idx, const JSTaggedValue &value);
|
||||
void SetBit(const JSThread* thread, uint32_t idx, uint32_t bitOffset, const JSTaggedValue& value);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "ecmascript/global_env.h"
|
||||
#include "ecmascript/js_tagged_value.h"
|
||||
#include "ecmascript/js_handle.h"
|
||||
#include "ecmascript/tagged_array.h"
|
||||
#include "ecmascript/tagged_array-inl.h"
|
||||
|
||||
namespace panda::ecmascript {
|
||||
enum TreeColor : uint8_t { BLACK = 0, RED };
|
||||
|
@ -11,6 +11,7 @@
|
||||
vtable?for?panda::ecmascript::kungfu::ObjectLiteralSnapshotInfo;
|
||||
vtable?for?panda::ecmascript::kungfu::StringSnapshotInfo;
|
||||
vtable?for?panda::ecmascript::Taskpool;
|
||||
vtable?for?panda::ecmascript::base::Utf8JsonParser;
|
||||
|
||||
panda::ecmascript::COMMON_HELP_HEAD_MSG*;
|
||||
panda::ecmascript::HELP_OPTION_MSG*;
|
||||
@ -131,6 +132,7 @@
|
||||
panda::ecmascript::BindSmallCpuCore*;
|
||||
panda::ecmascript::ClassHelper::MatchFieldType*;
|
||||
panda::ecmascript::ConstantPool::GetMethodFromCache*;
|
||||
panda::ecmascript::ConstantPool::GetStringFromCacheForJit*;
|
||||
panda::ecmascript::ConvertToStdString*;
|
||||
panda::ecmascript::ConvertToString*;
|
||||
panda::ecmascript::Deoptimizier::ComputeShift*;
|
||||
@ -303,6 +305,7 @@
|
||||
panda::ecmascript::base::NumberHelper::DoubleInRangeInt32*;
|
||||
panda::ecmascript::base::NumberHelper::StringToBigInt*;
|
||||
panda::ecmascript::base::NumberHelper::TruncateDouble*;
|
||||
panda::ecmascript::base::Utf8JsonParser::Parse*;
|
||||
panda::ecmascript::kungfu::AOTSnapshot::StoreConstantPoolInfo*;
|
||||
panda::ecmascript::kungfu::ArkStackMapBuilder::Collect*;
|
||||
panda::ecmascript::kungfu::ArkStackMapBuilder::GenerateArkStackMap*;
|
||||
|
Loading…
Reference in New Issue
Block a user