Summary: | Get rid of the bizarre Darwin/x86-only MacroAssembler::shouldBlindForSpecificArch(uintptr_t) overload | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||
Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aestes, barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Filip Pizlo
2013-11-08 16:57:19 PST
Created attachment 216464 [details]
the patch
Landed in http://trac.webkit.org/changeset/158981 Comment on attachment 216464 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=216464&action=review > Source/JavaScriptCore/assembler/MacroAssembler.h:992 > + if (sizeof(void*) == 4) > + return shouldBlindForSpecificArch(static_cast<uint32_t>(value)); > + return shouldBlindForSpecificArch(static_cast<uint64_t>(value)); Why doesn’t this work? return shouldBlindForSpecificArch(value); I’d expect that overloading would take care of the rest. No need for the if statement. Comment on attachment 216464 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=216464&action=review >> Source/JavaScriptCore/assembler/MacroAssembler.h:992 >> + return shouldBlindForSpecificArch(static_cast<uint64_t>(value)); > > Why doesn’t this work? > > return shouldBlindForSpecificArch(value); > > I’d expect that overloading would take care of the rest. No need for the if statement. On some compilers (including a version of clang in one of the toolchains that we build on), uint32_t, uint64_t and uintptr_t are different types. Hence passing uintptr_t causes a compile error; the compiler claims that the call overload is ambiguous. This patch fixes that compile error. It also removes a Darwin-only, and x86-only hack to avoid this ambiguity. See the code I remove in MacroAssemblerX86Common. |