Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.96 KB | None | 0 0
  1. @@ -1050,16 +1050,23 @@ IonBuilder::inlineMathAbs(CallInfo& call
  2.  {
  3.      if (callInfo.argc() != 1 || callInfo.constructing()) {
  4.          trackOptimizationOutcome(TrackedOutcome::CantInlineNativeBadForm);
  5.          return InliningStatus_NotInlined;
  6.      }
  7.  
  8.      MIRType returnType = getInlineReturnType();
  9.      MIRType argType = callInfo.getArg(0)->type();
  10. +
  11. +    if (argType == MIRType::Undefined) {
  12. +        callInfo.setImplicitlyUsedUnchecked();
  13. +        pushConstant(DoubleValue(GenericNaN()));
  14. +        return InliningStatus_Inlined;
  15. +    }
  16. +
  17.      if (!IsNumberType(argType))
  18.          return InliningStatus_NotInlined;
  19.  
  20.      // Either argType == returnType, or
  21.      //        argType == Double or Float32, returnType == Int, or
  22.      //        argType == Float32, returnType == Double
  23.      if (argType != returnType && !(IsFloatingPointType(argType) && returnType == MIRType::Int32)
  24.          && !(argType == MIRType::Float32 && returnType == MIRType::Double))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement