Bug 194399

Summary: Fix more doesGC() for CheckTraps, GetMapBucket, and Switch nodes.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, keith_miller, mcatanzaro, 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. ysuzuki: review+

Description Mark Lam 2019-02-07 10:33:55 PST
CheckTraps, GetMapBucket, and Switch nodes can GC.
Comment 1 Radar WebKit Bug Importer 2019-02-07 11:02:26 PST
<rdar://problem/47889777>
Comment 2 Mark Lam 2019-02-07 11:09:15 PST
Created attachment 361420 [details]
proposed patch.
Comment 3 Yusuke Suzuki 2019-02-07 11:11:07 PST
Comment on attachment 361420 [details]
proposed patch.

r=me
Comment 4 Mark Lam 2019-02-07 12:20:52 PST
Thanks for the review.  Landed in r241140: <http://trac.webkit.org/r241140>.
Comment 5 Michael Catanzaro 2019-02-12 13:17:30 PST
Note GCC doesn't like this:

[1181/3497] Building CXX object Source...sources/UnifiedSource-bfc896e1-6.cpp.o
In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-bfc896e1-6.cpp:3:
../../Source/JavaScriptCore/dfg/DFGDoesGC.cpp: In function ‘bool JSC::DFG::doesGC(JSC::DFG::Graph&, JSC::DFG::Node*)’:
../../Source/JavaScriptCore/dfg/DFGDoesGC.cpp:464:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
         switch (node->switchData()->kind) {
         ^~~~~~
../../Source/JavaScriptCore/dfg/DFGDoesGC.cpp:479:5: note: here
     case LastNodeType:
     ^~~~

I'll also remove the two unreachable returns while I'm fixing this.
Comment 6 Michael Catanzaro 2019-02-12 13:17:51 PST
Committed r241314: <https://trac.webkit.org/changeset/241314>