Bug 158911

Summary: InlineAccess should do StringLength
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, ews-watchlist, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, pnormand, sukolsak, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
keith_miller: review+
patch
none
patch none

Saam Barati
Reported 2016-06-19 12:51:02 PDT
...
Attachments
patch (14.29 KB, patch)
2016-06-20 12:56 PDT, Saam Barati
keith_miller: review+
patch (14.05 KB, patch)
2018-08-29 18:08 PDT, Saam Barati
no flags
patch (14.05 KB, patch)
2018-08-29 18:49 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2016-06-20 12:56:09 PDT
Keith Miller
Comment 2 2016-06-20 13:09:05 PDT
Comment on attachment 281668 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=281668&action=review r=me with comments. > Source/JavaScriptCore/bytecode/InlineAccess.cpp:305 > + auto branchToSlowPath = jit.patchableBranch8( > + CCallHelpers::NotEqual, > + CCallHelpers::Address(base, JSCell::typeInfoTypeOffset()), > + CCallHelpers::TrustedImm32(StringType)); I think it would be helpful here to put a comment saying the the patchableBranch is used to avoid branch compaction.
Yusuke Suzuki
Comment 3 2018-08-03 18:17:47 PDT
Are you planning landing this patch? I think InlinedAccessCase for StringLength is profitable.
Saam Barati
Comment 4 2018-08-03 18:46:46 PDT
(In reply to Yusuke Suzuki from comment #3) > Are you planning landing this patch? I think InlinedAccessCase for > StringLength is profitable. I forgot about this! I'll rebase and land it soon.
Saam Barati
Comment 5 2018-08-28 23:15:46 PDT
Will try to get this landed tomorrow.
Saam Barati
Comment 6 2018-08-29 18:08:55 PDT
EWS Watchlist
Comment 7 2018-08-29 18:10:27 PDT
Attachment 348456 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/bytecode/InlineAccess.cpp:51: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/JavaScriptCore/bytecode/InlineAccess.cpp:52: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 8 2018-08-29 18:49:26 PDT
Yusuke Suzuki
Comment 9 2018-08-30 11:21:42 PDT
Comment on attachment 348460 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=348460&action=review r=me > Source/JavaScriptCore/bytecode/InlineAccess.cpp:173 > + GPRReg base = stubInfo.baseGPR(); Nice improvement. > Source/JavaScriptCore/bytecode/StructureStubInfo.h:201 > #endif I think we can use GPRReg directly here (instead of int8_t), since they are `enum : int8_t` now!
Saam Barati
Comment 10 2018-08-30 11:38:38 PDT
Comment on attachment 348460 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=348460&action=review >> Source/JavaScriptCore/bytecode/StructureStubInfo.h:201 >> #endif > > I think we can use GPRReg directly here (instead of int8_t), since they are `enum : int8_t` now! Let's do this as a follow up for all these fields.
Saam Barati
Comment 11 2018-08-30 11:39:55 PDT
(In reply to Saam Barati from comment #10) > Comment on attachment 348460 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=348460&action=review > > >> Source/JavaScriptCore/bytecode/StructureStubInfo.h:201 > >> #endif > > > > I think we can use GPRReg directly here (instead of int8_t), since they are `enum : int8_t` now! > > Let's do this as a follow up for all these fields. https://bugs.webkit.org/show_bug.cgi?id=189166
Mark Lam
Comment 12 2018-08-30 12:06:25 PDT
Comment on attachment 348460 [details] patch FWIW, r=me too.
WebKit Commit Bot
Comment 13 2018-08-30 12:47:06 PDT
Comment on attachment 348460 [details] patch Clearing flags on attachment: 348460 Committed r235517: <https://trac.webkit.org/changeset/235517>
WebKit Commit Bot
Comment 14 2018-08-30 12:47:08 PDT
All reviewed patches have been landed. Closing bug.
Philippe Normand
Comment 15 2018-08-31 04:49:13 PDT
This patch broke my ARMv7 linux WPE build: Source/JavaScriptCore/bytecode/InlineAccess.cpp:53:13: error: 'class JSC::CCallHelpers' has no member named 'patchableBranch8'; did you mean 'patchableBranch32'? jit.patchableBranch8( ^~~~~~~~~~~~~~~~ patchableBranch32 In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource29.cpp:5:0: Source/JavaScriptCore/bytecode/InlineAccess.cpp: In static member function 'static bool JSC::InlineAccess::generateStringLength(JSC::StructureStubInfo&)': /home/phil/workspace/sources/wpewebkit/Source/JavaScriptCore/bytecode/InlineAccess.cpp:298:33: error: 'class JSC::CCallHelpers' has no member named 'patchableBranch8'; did you mean 'patchableBranch32'? auto branchToSlowPath = jit.patchableBranch8( ^~~~~~~~~~~~~~~~ patchableBranch32
Radar WebKit Bug Importer
Comment 16 2018-08-31 04:49:23 PDT
Philippe Normand
Comment 17 2018-08-31 05:06:16 PDT
The JSCOnly ARMv7 build bots also expose this issue.
Radar WebKit Bug Importer
Comment 18 2018-08-31 05:06:31 PDT
Mark Lam
Comment 19 2018-08-31 09:55:38 PDT
Mark Lam
Comment 20 2018-08-31 10:07:30 PDT
ARMv7 speculative build fix landed in r235557: <https://trac.webkit.org/r235557>.
Note You need to log in before you can comment on or make changes to this bug.