Bug 217055

Summary: Add Bounds Check Elimination validation for debugging.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, keith_miller, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. keith_miller: review+

Description Mark Lam 2020-09-28 10:22:05 PDT
rdar://69122891
Comment 1 Mark Lam 2020-09-28 19:07:56 PDT
Created attachment 409946 [details]
proposed patch.
Comment 2 Keith Miller 2020-09-28 19:13:10 PDT
Comment on attachment 409946 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=409946&action=review

r=me with nit

> Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:-381
> -

Undo please.

> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:4654
> +        RELEASE_ASSERT(Options::validateBoundsCheckElimination());

Does this really do anything?
Comment 3 Mark Lam 2020-09-28 19:20:29 PDT
Comment on attachment 409946 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=409946&action=review

Thanks for the review.

>> Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:-381
>> -
> 
> Undo please.

will do.

>> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:4654
>> +        RELEASE_ASSERT(Options::validateBoundsCheckElimination());
> 
> Does this really do anything?

Just a sanity check that this node should never be emitted if the option isn't enabled.  I suppose there's no strong reason it needs to be a RELEASE_ASSERT.  I'll change it to an ASSERT.
Comment 4 Mark Lam 2020-09-28 21:55:16 PDT
Landed in r267726: <http://trac.webkit.org/r267726>.