[Webkit-unassigned] [Bug 20296] OpcodeStats doesn't build on platforms which don't have mergesort()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 22 08:41:42 PDT 2008


darin at apple.com changed:

           What    |Removed                     |Added
  Attachment #22933|review?                     |review-
               Flag|                            |

------- Comment #6 from darin at apple.com  2008-08-22 08:41 PDT -------
(From update of attachment 22933)
This should not be defined in Platform.h -- that goes beyond the scope of what
Platform.h should contain; just configuration macros. It belongs in a header
like MathExtras.h -- perhaps StdLibExtras.h.

This should be an inline function, not a macro. If it was going to be a macro
it should be a macro with arguments, not an unqualified macro.

The name platformSort doesn't make sense to me. If we need mergesort
specifically, then it needs to be mergesort. If it can be either qsort or
mergesort, then we can come up with a name that describes the reason we want
mergesort if we have it -- what is that reason? Why is mergesort better than
qsort for these purposes? I don't think "platform" enters into it, despite
Eric's earlier suggestion.

For example, in JSArray.cpp it's pretty clear what we want is a stable sort. In
those cases, using qsort is actually incorrect, so I don't think we should try
to make it more elegant -- the lack of a stable sort there is a problem needs
to be fixed.

Is stable sorting the issue in Opcode.cpp too? If we don't have any special
requirements, then it we can just change Opcode.cpp to use qsort instead of
doing this whole thing.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list