Summary: | [AppleWin 32bit][LLInt] LLIntData.h(104) : warning C4172: returning address of local variable or temporary: id | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||
Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, pvollan, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Fujii Hironori
2021-01-18 13:30:12 PST
Created attachment 417845 [details]
WIP patch
Comment on attachment 417845 [details] WIP patch View in context: https://bugs.webkit.org/attachment.cgi?id=417845&action=review > Source/JavaScriptCore/llint/LLIntData.h:109 > +#if ENABLE(COMPUTED_GOTO_OPCODES) > inline const Opcode& getOpcode(OpcodeID id) > { > -#if ENABLE(COMPUTED_GOTO_OPCODES) > return g_opcodeMap[id]; > +} > #else > - return static_cast<Opcode>(id); > -#endif > +inline const Opcode getOpcode(OpcodeID id) I think it's a bad pattern to have the same function return 2 different return types. This made me wonder who is relying on the address of Opcode as a return value, and it looks like it's only the JIT functions (please double check this to confirm). Can you try making getOpcode() consistently returning Opcode, and add a new getOpcodeAddress() function guarded by #if ENABLE(JIT) that returns Opcode* and update the relevant clients to use it instead? See if that works better. Created attachment 419073 [details]
Patch
Comment on attachment 419073 [details]
Patch
r=me
Committed r272330: <https://trac.webkit.org/changeset/272330> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419073 [details]. |