Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -1050,16 +1050,23 @@ IonBuilder::inlineMathAbs(CallInfo& call
- {
- if (callInfo.argc() != 1 || callInfo.constructing()) {
- trackOptimizationOutcome(TrackedOutcome::CantInlineNativeBadForm);
- return InliningStatus_NotInlined;
- }
- MIRType returnType = getInlineReturnType();
- MIRType argType = callInfo.getArg(0)->type();
- +
- + if (argType == MIRType::Undefined) {
- + callInfo.setImplicitlyUsedUnchecked();
- + pushConstant(DoubleValue(GenericNaN()));
- + return InliningStatus_Inlined;
- + }
- +
- if (!IsNumberType(argType))
- return InliningStatus_NotInlined;
- // Either argType == returnType, or
- // argType == Double or Float32, returnType == Int, or
- // argType == Float32, returnType == Double
- if (argType != returnType && !(IsFloatingPointType(argType) && returnType == MIRType::Int32)
- && !(argType == MIRType::Float32 && returnType == MIRType::Double))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement