WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 238535
[JSC] Store CodeBlock in caller side
https://bugs.webkit.org/show_bug.cgi?id=238535
Summary
[JSC] Store CodeBlock in caller side
Yusuke Suzuki
Reported
2022-03-29 20:12:43 PDT
Let's not store it in the callee side since the caller typically already knows well about it. It makes unlinked code simpler.
Attachments
Patch
(43.71 KB, patch)
2022-03-29 20:21 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(47.64 KB, patch)
2022-03-30 02:14 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(47.52 KB, patch)
2022-03-30 03:47 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(47.58 KB, patch)
2022-03-30 11:29 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(53.22 KB, patch)
2022-03-30 14:44 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(53.25 KB, patch)
2022-03-30 19:03 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(53.24 KB, patch)
2022-03-30 21:14 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(60.64 KB, patch)
2022-03-31 18:29 PDT
,
Yusuke Suzuki
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(60.65 KB, patch)
2022-03-31 19:02 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(71.14 KB, patch)
2022-03-31 20:39 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(72.68 KB, patch)
2022-03-31 23:27 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(70.58 KB, patch)
2022-04-01 13:24 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(71.04 KB, patch)
2022-04-01 22:35 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(73.04 KB, patch)
2022-04-04 15:37 PDT
,
Yusuke Suzuki
saam
: review+
Details
Formatted Diff
Diff
Patch
(72.71 KB, patch)
2022-04-04 19:14 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(72.65 KB, patch)
2022-04-04 20:19 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Show Obsolete
(14)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2022-03-29 20:21:36 PDT
Created
attachment 456088
[details]
Patch
Yusuke Suzuki
Comment 2
2022-03-30 02:14:29 PDT
Created
attachment 456103
[details]
Patch
Yusuke Suzuki
Comment 3
2022-03-30 03:47:21 PDT
Created
attachment 456110
[details]
Patch
Yusuke Suzuki
Comment 4
2022-03-30 11:29:01 PDT
Created
attachment 456157
[details]
Patch
Yusuke Suzuki
Comment 5
2022-03-30 14:44:48 PDT
Created
attachment 456176
[details]
Patch
Yusuke Suzuki
Comment 6
2022-03-30 19:03:52 PDT
Created
attachment 456193
[details]
Patch
Yusuke Suzuki
Comment 7
2022-03-30 21:14:26 PDT
Created
attachment 456199
[details]
Patch
Yusuke Suzuki
Comment 8
2022-03-31 18:29:43 PDT
Created
attachment 456303
[details]
Patch
Yusuke Suzuki
Comment 9
2022-03-31 19:02:13 PDT
Created
attachment 456307
[details]
Patch
Yusuke Suzuki
Comment 10
2022-03-31 20:39:23 PDT
Created
attachment 456317
[details]
Patch
Yusuke Suzuki
Comment 11
2022-03-31 23:27:24 PDT
Created
attachment 456325
[details]
Patch
Yusuke Suzuki
Comment 12
2022-04-01 13:24:14 PDT
Created
attachment 456395
[details]
Patch
Yusuke Suzuki
Comment 13
2022-04-01 22:35:06 PDT
Created
attachment 456447
[details]
Patch
Yusuke Suzuki
Comment 14
2022-04-04 15:37:02 PDT
Created
attachment 456642
[details]
Patch
Saam Barati
Comment 15
2022-04-04 18:39:01 PDT
Comment on
attachment 456642
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=456642&action=review
r=me
> Source/JavaScriptCore/ChangeLog:9 > + This helps unlinked Baseline and DFG since we no longer need to load CodeBlock from callee via costly dependent loads: unlinked ones
and LLInt
> Source/JavaScriptCore/jit/JIT.cpp:754 > +#if ASSERT_ENABLED > + probeDebug([=](Probe::Context& ctx) { > + CodeBlock* codeBlock = ctx.fp<CallFrame*>()->codeBlock(); > + if (codeBlock->jitType() != JITType::BaselineJIT) { > + dataLogLn("FP ", RawPointer(ctx.fp<CallFrame*>())); > + RELEASE_ASSERT_NOT_REACHED(); > + } > + }); > +#endif
Why do we only do this release assert for function code? It should always be correct. Same for DFG/FTL
> Source/JavaScriptCore/runtime/FunctionExecutable.h:302 > + return 0;
can you RELEASE_ASSERT_NOT_REACHED here?
Saam Barati
Comment 16
2022-04-04 18:39:56 PDT
Comment on
attachment 456642
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=456642&action=review
>> Source/JavaScriptCore/jit/JIT.cpp:754 >> +#endif > > Why do we only do this release assert for function code? It should always be correct. Same for DFG/FTL
My unlinked baseline patch might've done things this way. But I think it's worth doing always.
Yusuke Suzuki
Comment 17
2022-04-04 19:11:53 PDT
Comment on
attachment 456642
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=456642&action=review
Thank you!
>> Source/JavaScriptCore/ChangeLog:9 >> + This helps unlinked Baseline and DFG since we no longer need to load CodeBlock from callee via costly dependent loads: unlinked ones > > and LLInt
Fixed.
>>> Source/JavaScriptCore/jit/JIT.cpp:754 >>> +#endif >> >> Why do we only do this release assert for function code? It should always be correct. Same for DFG/FTL > > My unlinked baseline patch might've done things this way. But I think it's worth doing always.
Sounds good! Changed.
>> Source/JavaScriptCore/runtime/FunctionExecutable.h:302 >> + return 0; > > can you RELEASE_ASSERT_NOT_REACHED here?
Nice, fixed.
Yusuke Suzuki
Comment 18
2022-04-04 19:14:14 PDT
Created
attachment 456661
[details]
Patch
Yusuke Suzuki
Comment 19
2022-04-04 20:19:49 PDT
Created
attachment 456664
[details]
Patch
Yusuke Suzuki
Comment 20
2022-04-04 21:10:49 PDT
Committed
r292372
(
249237@trunk
): <
https://commits.webkit.org/249237@trunk
>
Radar WebKit Bug Importer
Comment 21
2022-04-04 21:11:18 PDT
<
rdar://problem/91276034
>
Michael Catanzaro
Comment 22
2022-04-07 13:20:18 PDT
This broke s390x, see
bug #238956
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