Changeset 195145 in webkit


Ignore:
Timestamp:
Jan 15, 2016 1:43:57 PM (8 years ago)
Author:
peavo@outlook.com
Message:

[B3][Win64] Compile fixes.
https://bugs.webkit.org/show_bug.cgi?id=153127

Reviewed by Alex Christensen.

MSVC have several overloads of fmod, pow, and ceil. We need to suggest to MSVC
which one we want to use.

  • b3/B3LowerMacros.cpp:
  • b3/B3LowerMacrosAfterOptimizations.cpp:
  • b3/B3MathExtras.cpp:

(JSC::B3::powDoubleInt32):

  • b3/B3ReduceStrength.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r195139 r195145  
     12016-01-15  Per Arne Vollan  <peavo@outlook.com>
     2
     3        [B3][Win64] Compile fixes.
     4        https://bugs.webkit.org/show_bug.cgi?id=153127
     5
     6        Reviewed by Alex Christensen.
     7
     8        MSVC have several overloads of fmod, pow, and ceil. We need to suggest to MSVC
     9        which one we want to use.
     10
     11        * b3/B3LowerMacros.cpp:
     12        * b3/B3LowerMacrosAfterOptimizations.cpp:
     13        * b3/B3MathExtras.cpp:
     14        (JSC::B3::powDoubleInt32):
     15        * b3/B3ReduceStrength.cpp:
     16
    1172016-01-15  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/JavaScriptCore/b3/B3LowerMacros.cpp

    r194873 r195145  
    7777            switch (m_value->opcode()) {
    7878            case Mod: {
     79                double (*fmodDouble)(double, double) = fmod;
    7980                if (m_value->type() == Double) {
    80                     Value* functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, fmod);
     81                    Value* functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, fmodDouble);
    8182                    Value* result = m_insertionSet.insert<CCallValue>(m_index, Double, m_origin,
    8283                        Effects::none(),
     
    8990                    Value* numeratorAsDouble = m_insertionSet.insert<Value>(m_index, FloatToDouble, m_origin, m_value->child(0));
    9091                    Value* denominatorAsDouble = m_insertionSet.insert<Value>(m_index, FloatToDouble, m_origin, m_value->child(1));
    91                     Value* functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, fmod);
     92                    Value* functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, fmodDouble);
    9293                    Value* doubleMod = m_insertionSet.insert<CCallValue>(m_index, Double, m_origin,
    9394                        Effects::none(),
  • trunk/Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp

    r194802 r195145  
    9393
    9494                Value* functionAddress = nullptr;
     95                double (*ceilDouble)(double) = ceil;
    9596                if (m_value->type() == Double)
    96                     functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, ceil);
     97                    functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, ceilDouble);
    9798                else if (m_value->type() == Float)
    9899                    functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, ceilf);
  • trunk/Source/JavaScriptCore/b3/B3MathExtras.cpp

    r193989 r195145  
    5959    // Function call.
    6060    Value* yAsDouble = functionCallCase->appendNew<Value>(procedure, IToD, origin, y);
     61    double (*powDouble)(double, double) = pow;
    6162    Value* powResult = functionCallCase->appendNew<CCallValue>(
    6263        procedure, Double, origin,
    63         functionCallCase->appendNew<ConstPtrValue>(procedure, origin, bitwise_cast<void*>(pow)),
     64        functionCallCase->appendNew<ConstPtrValue>(procedure, origin, bitwise_cast<void*>(powDouble)),
    6465        x, yAsDouble);
    6566    UpsilonValue* powResultUpsilon = functionCallCase->appendNew<UpsilonValue>(procedure, origin, powResult);
  • trunk/Source/JavaScriptCore/b3/B3ReduceStrength.cpp

    r194855 r195145  
    949949        }
    950950
    951         case CCall:
     951        case CCall: {
    952952            // Turn this: Call(fmod, constant1, constant2)
    953953            // Into this: fcall-constant(constant1, constant2)
     954            double(*fmodDouble)(double, double) = fmod;
    954955            if (m_value->type() == Double
    955956                && m_value->numChildren() == 3
    956                 && m_value->child(0)->isIntPtr(reinterpret_cast<intptr_t>(fmod))
     957                && m_value->child(0)->isIntPtr(reinterpret_cast<intptr_t>(fmodDouble))
    957958                && m_value->child(1)->type() == Double
    958959                && m_value->child(2)->type() == Double) {
     
    960961            }
    961962            break;
    962 
     963        }
    963964        case Equal:
    964965            handleCommutativity();
Note: See TracChangeset for help on using the changeset viewer.