WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239578
[JSC] Remove TempRegisterSet
https://bugs.webkit.org/show_bug.cgi?id=239578
Summary
[JSC] Remove TempRegisterSet
Yusuke Suzuki
Reported
2022-04-20 17:24:22 PDT
[JSC] Remove TempRegisterSet
Attachments
Patch
(31.28 KB, patch)
2022-04-21 14:55 PDT
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2022-04-20 17:27:27 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/337
EWS
Comment 2
2022-04-20 22:29:18 PDT
Committed
r293146
(
249842@main
): <
https://commits.webkit.org/249842@main
> Reviewed commits have been landed. Closing PR #337 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2022-04-20 22:30:14 PDT
<
rdar://problem/92073330
>
WebKit Commit Bot
Comment 4
2022-04-21 10:30:58 PDT
Re-opened since this is blocked by
bug 239613
Yusuke Suzuki
Comment 5
2022-04-21 14:55:32 PDT
Created
attachment 458095
[details]
Patch
Mark Lam
Comment 6
2022-04-21 15:15:03 PDT
Comment on
attachment 458095
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458095&action=review
r=me
> Source/JavaScriptCore/ChangeLog:10 > + We can always use RegisterSet. TempRegisterSet can save several bytes, but we have no code using TempRegisterSet in > + heap-allocated class, so this does not make sense anymore. Instead of TempRegisterSet, we should consistently use > + ScratchRegisterAllocator.
I suggest slightly rephrasing this as follows: We can always use RegisterSet. TempRegisterSet can save several bytes, but we have no code using TempRegisterSet in heap-allocated classes. So, this does not make sense anymore. Instead of TempRegisterSet, we will consistently use RegisterSet to pass register info and ScratchRegisterAllocator to manage allocation of temp / scratch registers.
> Source/JavaScriptCore/ChangeLog:14 > + We also remove copyCalleeSavesToEntryFrameCalleeSavesBuffer function with no scratch register. We were using TempRegisterSet > + to allocate scratch register, but the caller of this function has particular assumption on how register is allocated from > + TempRegisterSet. This is very fragile and dangerous. We should pass scratch register explicitly in that case.
We also remove the copyCalleeSavesToEntryFrameCalleeSavesBuffer function which takes no scratch register. It was using TempRegisterSet to allocate a scratch register, but the caller of this function was making assumptions on how TempRegisterSet will allocate that scratch. This is very fragile and dangerous. We should explicitly pass a scratch register instead in that case.
Yusuke Suzuki
Comment 7
2022-04-21 16:08:25 PDT
Comment on
attachment 458095
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458095&action=review
Thank you!
>> Source/JavaScriptCore/ChangeLog:10 >> + ScratchRegisterAllocator. > > I suggest slightly rephrasing this as follows: > > We can always use RegisterSet. TempRegisterSet can save several bytes, but we have no code using TempRegisterSet in > heap-allocated classes. So, this does not make sense anymore. Instead of TempRegisterSet, we will consistently use > RegisterSet to pass register info and ScratchRegisterAllocator to manage allocation of temp / scratch registers.
Sounds good, changed.
>> Source/JavaScriptCore/ChangeLog:14 >> + TempRegisterSet. This is very fragile and dangerous. We should pass scratch register explicitly in that case. > > We also remove the copyCalleeSavesToEntryFrameCalleeSavesBuffer function which takes no scratch register. It was > using TempRegisterSet to allocate a scratch register, but the caller of this function was making assumptions on how > TempRegisterSet will allocate that scratch. This is very fragile and dangerous. We should explicitly pass a scratch > register instead in that case.
Changed.
Yusuke Suzuki
Comment 8
2022-04-21 17:52:05 PDT
Committed
r293203
(?): <
https://commits.webkit.org/r293203
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug