Changeset 96306 in webkit


Ignore:
Timestamp:
Sep 29, 2011 12:12:10 AM (13 years ago)
Author:
fpizlo@apple.com
Message:

DFG checkArgumentTypes fails to check boolean predictions
https://bugs.webkit.org/show_bug.cgi?id=69059

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::checkArgumentTypes):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::checkArgumentTypes):

LayoutTests:

  • fast/js/boolean-argument-prediction-expected.txt: Added.
  • fast/js/boolean-argument-prediction.html: Added.
  • fast/js/script-tests/boolean-argument-prediction.js: Added.

(predictBooleanArgument):

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96305 r96306  
     12011-09-28  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG checkArgumentTypes fails to check boolean predictions
     4        https://bugs.webkit.org/show_bug.cgi?id=69059
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        * fast/js/boolean-argument-prediction-expected.txt: Added.
     9        * fast/js/boolean-argument-prediction.html: Added.
     10        * fast/js/script-tests/boolean-argument-prediction.js: Added.
     11        (predictBooleanArgument):
     12
    1132011-09-28  Shinichiro Hamaji  <hamaji@chromium.org>
    214
  • trunk/Source/JavaScriptCore/ChangeLog

    r96293 r96306  
     12011-09-28  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG checkArgumentTypes fails to check boolean predictions
     4        https://bugs.webkit.org/show_bug.cgi?id=69059
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        * dfg/DFGSpeculativeJIT.cpp:
     9        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
     10        * dfg/DFGSpeculativeJIT32_64.cpp:
     11        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
     12
    1132011-09-28  Gavin Barraclough  <barraclough@apple.com>
    214
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r96280 r96306  
    22862286            speculationCheck(m_jit.branchTestPtr(MacroAssembler::NonZero, temp.gpr(), GPRInfo::tagMaskRegister));
    22872287            speculationCheck(m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(temp.gpr()), MacroAssembler::TrustedImmPtr(m_jit.globalData()->jsArrayVPtr)));
     2288        } else if (isBooleanPrediction(predictedType)) {
     2289            GPRTemporary temp(this);
     2290            m_jit.loadPtr(JITCompiler::addressFor(virtualRegister), temp.gpr());
     2291            m_jit.xorPtr(TrustedImm32(static_cast<int32_t>(ValueFalse)), temp.gpr());
     2292            speculationCheck(m_jit.branchTestPtr(MacroAssembler::NonZero, temp.gpr(), TrustedImm32(static_cast<int32_t>(~1))));
    22882293        }
    22892294    }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r96247 r96306  
    22222222            m_jit.load32(JITCompiler::payloadFor(virtualRegister), temp.gpr());
    22232223            speculationCheck(m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(temp.gpr()), MacroAssembler::TrustedImmPtr(m_jit.globalData()->jsArrayVPtr)));
    2224         }
     2224        } // FIXME: need boolean predictions, but we currently don't have that support.
    22252225    }
    22262226}
Note: See TracChangeset for help on using the changeset viewer.