mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
!1861 Remove Useless Old Code
Merge pull request !1861 from Gargoyle.h/wzfmaster-dev
This commit is contained in:
commit
7eb4dad46f
@ -246,9 +246,9 @@
|
||||
// get foo's Frame by bar's Frame prev field
|
||||
|
||||
#include "ecmascript/base/aligned_struct.h"
|
||||
|
||||
#include "ecmascript/mem/chunk_containers.h"
|
||||
#include "ecmascript/mem/visitor.h"
|
||||
|
||||
namespace panda::ecmascript {
|
||||
class JSThread;
|
||||
class EcmaVM;
|
||||
@ -810,9 +810,7 @@ struct OptimizedLeaveFrame {
|
||||
FrameType type;
|
||||
uintptr_t callsiteFp; // thread sp set here
|
||||
uintptr_t returnAddr;
|
||||
#ifndef PANDA_TARGET_32
|
||||
uint64_t argRuntimeId;
|
||||
#endif
|
||||
uint64_t argc;
|
||||
// argv[0]...argv[argc-1] dynamic according to agc
|
||||
static OptimizedLeaveFrame* GetFrameFromSp(const JSTaggedType *sp)
|
||||
@ -822,11 +820,7 @@ struct OptimizedLeaveFrame {
|
||||
}
|
||||
uintptr_t GetCallSiteSp() const
|
||||
{
|
||||
#ifndef PANDA_TARGET_32
|
||||
return ToUintPtr(this) + MEMBER_OFFSET(OptimizedLeaveFrame, argRuntimeId);
|
||||
#else
|
||||
return ToUintPtr(this) + MEMBER_OFFSET(OptimizedLeaveFrame, argc) + argc * sizeof(JSTaggedType);
|
||||
#endif
|
||||
}
|
||||
inline JSTaggedType* GetPrevFrameFp() const
|
||||
{
|
||||
@ -848,11 +842,8 @@ struct OptimizedWithArgvLeaveFrame {
|
||||
FrameType type;
|
||||
uintptr_t callsiteFp; // thread sp set here
|
||||
uintptr_t returnAddr;
|
||||
#ifndef PANDA_TARGET_32
|
||||
uint64_t argRuntimeId;
|
||||
#endif
|
||||
uint64_t argc;
|
||||
// uintptr_t argv[]
|
||||
static OptimizedWithArgvLeaveFrame* GetFrameFromSp(const JSTaggedType *sp)
|
||||
{
|
||||
return reinterpret_cast<OptimizedWithArgvLeaveFrame *>(reinterpret_cast<uintptr_t>(sp) -
|
||||
@ -860,11 +851,7 @@ struct OptimizedWithArgvLeaveFrame {
|
||||
}
|
||||
uintptr_t GetCallSiteSp() const
|
||||
{
|
||||
#ifndef PANDA_TARGET_32
|
||||
return ToUintPtr(this) + MEMBER_OFFSET(OptimizedWithArgvLeaveFrame, argRuntimeId);
|
||||
#else
|
||||
return ToUintPtr(this) + MEMBER_OFFSET(OptimizedWithArgvLeaveFrame, argc) + argc * sizeof(JSTaggedType);
|
||||
#endif
|
||||
}
|
||||
inline JSTaggedType* GetPrevFrameFp()
|
||||
{
|
||||
|
@ -81,15 +81,6 @@ struct BCStubEntries {
|
||||
return reinterpret_cast<Address*>(stubEntries_);
|
||||
}
|
||||
|
||||
static int32_t GetStubEntryOffset(int32_t stubId)
|
||||
{
|
||||
#ifdef PANDA_TARGET_32
|
||||
return stubId * sizeof(uint32_t);
|
||||
#else
|
||||
return stubId * sizeof(uint64_t);
|
||||
#endif
|
||||
}
|
||||
|
||||
Address Get(size_t index)
|
||||
{
|
||||
ASSERT(index < COUNT);
|
||||
|
@ -54,12 +54,6 @@ public:
|
||||
{
|
||||
ASSERT(elemSize != 0);
|
||||
size_t size = DATA_OFFSET + elemSize * length;
|
||||
#ifdef PANDA_TARGET_32
|
||||
size_t sizeLimit = (std::numeric_limits<size_t>::max() - DATA_OFFSET) / elemSize;
|
||||
if (UNLIKELY(sizeLimit < static_cast<size_t>(length))) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
return size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user