Ignore:
Timestamp:
Jan 29, 2019, 2:04:47 PM (6 years ago)
Author:
[email protected]
Message:

ValueRecovery::recover() should purify NaN values it recovers.
https://bugs.webkit.org/show_bug.cgi?id=193978
<rdar://problem/47625488>

Reviewed by Saam Barati.

JSTests:

  • stress/value-recovery-of-double-displaced-in-jsstack-should-be-purified.js: Added.

Source/JavaScriptCore:

According to DFG::OSRExit::executeOSRExit() and DFG::OSRExit::compileExit(),
recovered DoubleDisplacedInJSStack values need to be purified.
ValueRecovery::recover() should do the same.

  • bytecode/ValueRecovery.cpp:

(JSC::ValueRecovery::recover const):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/ValueRecovery.cpp

    r189192 r240681  
    11/*
    2  * Copyright (C) 2011, 2013, 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4444        return jsNumber(exec->r(virtualRegister().offset()).unboxedStrictInt52());
    4545    case DoubleDisplacedInJSStack:
    46         return jsNumber(exec->r(virtualRegister().offset()).unboxedDouble());
     46        return jsNumber(purifyNaN(exec->r(virtualRegister().offset()).unboxedDouble()));
    4747    case CellDisplacedInJSStack:
    4848        return exec->r(virtualRegister().offset()).unboxedCell();
Note: See TracChangeset for help on using the changeset viewer.