Commit 023d1c71 authored by oliver@apple.com's avatar oliver@apple.com

fourthTier: FTL should support CompareStrictEq

https://bugs.webkit.org/show_bug.cgi?id=115927

Reviewed by Mark Hahnenberg.

Do the sensible thing, and make it so that for common cases, CompareEq is
implemented in terms of CompareStrictEq in the FTL backend. All of the cases
we currently support can be done this way.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(LowerDFGToLLVM):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent afce403e
2013-05-10 Filip Pizlo <fpizlo@apple.com>
fourthTier: FTL should support CompareStrictEq
https://bugs.webkit.org/show_bug.cgi?id=115927
Reviewed by Mark Hahnenberg.
Do the sensible thing, and make it so that for common cases, CompareEq is
implemented in terms of CompareStrictEq in the FTL backend. All of the cases
we currently support can be done this way.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(LowerDFGToLLVM):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
2013-05-10 Filip Pizlo <fpizlo@apple.com>
fourthTier: FTL should support Int32ToDouble
......
......@@ -130,6 +130,7 @@ bool canCompile(Graph& graph)
}
break;
case CompareEq:
case CompareStrictEq:
if (node->isBinaryUseKind(Int32Use))
break;
if (node->isBinaryUseKind(NumberUse))
......
......@@ -364,6 +364,9 @@ private:
case CompareEq:
compileCompareEq();
break;
case CompareStrictEq:
compileCompareStrictEq();
break;
case CompareLess:
compileCompareLess();
break;
......@@ -951,6 +954,18 @@ private:
}
void compileCompareEq()
{
if (m_node->isBinaryUseKind(Int32Use)
|| m_node->isBinaryUseKind(NumberUse)
|| m_node->isBinaryUseKind(ObjectUse)) {
compileCompareStrictEq();
return;
}
RELEASE_ASSERT_NOT_REACHED();
}
void compileCompareStrictEq()
{
if (m_node->isBinaryUseKind(Int32Use)) {
m_booleanValues.add(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment