mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
code review
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
This commit is contained in:
parent
32e1e3341c
commit
08f5ec2df0
@ -199,11 +199,11 @@ public:
|
||||
|
||||
void IterateWeakEcmaGlobalStorage(const WeakRootVisitor &visitor);
|
||||
|
||||
uintptr_t* GetLastOptCallRuntimePc_() const
|
||||
uintptr_t* GetLastOptCallRuntimePc() const
|
||||
{
|
||||
return lastOptCallRuntimePc_;
|
||||
}
|
||||
void SetLastOptCallRuntimePc_(uintptr_t* pc)
|
||||
void SetLastOptCallRuntimePc(uintptr_t* pc)
|
||||
{
|
||||
lastOptCallRuntimePc_ = pc;
|
||||
}
|
||||
|
@ -53,12 +53,12 @@ public:
|
||||
|
||||
class CallRuntimeTrampolinesScope {
|
||||
public:
|
||||
CallRuntimeTrampolinesScope(JSThread *thread, uintptr_t *newFp, uintptr_t *fp)
|
||||
CallRuntimeTrampolinesScope(JSThread *thread, uintptr_t *newFp, uintptr_t *pc)
|
||||
:oldFramePointer_(nullptr),
|
||||
thread_(thread)
|
||||
{
|
||||
lastOptCallRuntimePc_ = thread->GetRuntimeTrampolinesFP();
|
||||
thread->SetRuntimeTrampolinesFP(fp);
|
||||
lastOptCallRuntimePc_ = thread->GetLastOptCallRuntimePc();
|
||||
thread->SetLastOptCallRuntimePc(pc);
|
||||
JSTaggedType *cursp = const_cast<JSTaggedType *>(thread->GetCurrentSPFrame());
|
||||
oldFramePointer_ = static_cast<uintptr_t *>(static_cast<void *>(cursp));
|
||||
JSTaggedType *newSp = static_cast<JSTaggedType *>(static_cast<void *>(newFp));
|
||||
@ -80,7 +80,7 @@ public:
|
||||
std::cout << __FUNCTION__ << "type = " << as_integer(type) << std::endl;
|
||||
JSTaggedType *oldSp = static_cast<JSTaggedType *>(static_cast<void *>(oldFramePointer_));
|
||||
thread_->SetCurrentSPFrame(oldSp);
|
||||
thread_->SetRuntimeTrampolinesFP(lastOptCallRuntimePc_);
|
||||
thread_->SetLastOptCallRuntimePc(lastOptCallRuntimePc_);
|
||||
}
|
||||
private:
|
||||
uintptr_t *oldFramePointer_;
|
||||
|
Loading…
Reference in New Issue
Block a user