1 gcc complains that these overloaded uses of pow and max are ambiguous.
2 Casts were used to for the selection of a specific version of the
3 overloaded function, but it is unclear whether they are correct or it is a
6 file upstream bug to determine correct fix
8 diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp
9 index b211ed6..13b6945 100644
10 --- a/Source/JavaScriptCore/dfg/DFGOperations.cpp
11 +++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp
12 @@ -2921,7 +2921,7 @@ JSC_DEFINE_JIT_OPERATION(operationLoadVarargs, void, (JSGlobalObject* globalObje
14 JSC_DEFINE_JIT_OPERATION(operationFModOnInts, double, (int32_t a, int32_t b))
17 + return fmod(float(a), float(b));
21 diff --git a/Source/WebCore/rendering/shapes/BoxShape.cpp b/Source/WebCore/rendering/shapes/BoxShape.cpp
22 index c2e53dd..8f3068b 100644
23 --- a/Source/WebCore/rendering/shapes/BoxShape.cpp
24 +++ b/Source/WebCore/rendering/shapes/BoxShape.cpp
25 @@ -43,7 +43,7 @@ static inline LayoutUnit adjustRadiusForMarginBoxShape(LayoutUnit radius, Layout
27 LayoutUnit ratio = radius / margin;
29 - return LayoutUnit(radius + (margin * (1 + pow(ratio - 1, 3.0))));
30 + return LayoutUnit(radius + (margin * (1 + pow(static_cast<double>(ratio) - 1, 3.0))));
32 return radius + margin;
34 diff --git a/Source/WebCore/rendering/shapes/RasterShape.cpp b/Source/WebCore/rendering/shapes/RasterShape.cpp
35 index d52092b..10b22e3 100644
36 --- a/Source/WebCore/rendering/shapes/RasterShape.cpp
37 +++ b/Source/WebCore/rendering/shapes/RasterShape.cpp
38 @@ -142,7 +142,7 @@ const RasterShapeIntervals& RasterShape::marginIntervals() const
41 int shapeMarginInt = clampToPositiveInteger(ceil(shapeMargin()));
42 - int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(2);
43 + int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(static_cast<float>(2));
44 if (!m_marginIntervals)
45 m_marginIntervals = m_intervals->computeShapeMarginIntervals(std::min(shapeMarginInt, maxShapeMarginInt));
47 --- a/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp.orig
48 +++ b/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp
53 - block->executionCount = pow(10, m_graph.m_cpsNaturalLoops->loopDepth(block));
54 + block->executionCount = powf(10, m_graph.m_cpsNaturalLoops->loopDepth(block));
57 // Estimate branch weights based on execution counts. This isn't quite correct. It'll