Diff
Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (149895 => 149896)
--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-05-10 18:39:53 UTC (rev 149895)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-05-10 18:47:32 UTC (rev 149896)
@@ -1,5 +1,23 @@
2013-05-10 Filip Pizlo <[email protected]>
+ fourthTier: FTL should support LogicalNot
+ https://bugs.webkit.org/show_bug.cgi?id=115924
+
+ Reviewed by Mark Hahnenberg.
+
+ * ftl/FTLAbbreviations.h:
+ (JSC::FTL::buildNot):
+ * ftl/FTLCapabilities.cpp:
+ (JSC::FTL::canCompile):
+ * ftl/FTLLowerDFGToLLVM.cpp:
+ (JSC::FTL::LowerDFGToLLVM::compileNode):
+ (JSC::FTL::LowerDFGToLLVM::compileLogicalNot):
+ (LowerDFGToLLVM):
+ * ftl/FTLOutput.h:
+ (JSC::FTL::Output::bitNot):
+
+2013-05-10 Filip Pizlo <[email protected]>
+
fourthTier: FTL should support CompareGreater, CompareLessEq, and CompareGreaterEq
https://bugs.webkit.org/show_bug.cgi?id=115923
Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLAbbreviations.h (149895 => 149896)
--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLAbbreviations.h 2013-05-10 18:39:53 UTC (rev 149895)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLAbbreviations.h 2013-05-10 18:47:32 UTC (rev 149896)
@@ -195,6 +195,7 @@
static inline LValue buildShl(LBuilder builder, LValue left, LValue right) { return LLVMBuildShl(builder, left, right, ""); }
static inline LValue buildAShr(LBuilder builder, LValue left, LValue right) { return LLVMBuildAShr(builder, left, right, ""); }
static inline LValue buildLShr(LBuilder builder, LValue left, LValue right) { return LLVMBuildLShr(builder, left, right, ""); }
+static inline LValue buildNot(LBuilder builder, LValue value) { return LLVMBuildNot(builder, value, ""); }
static inline LValue buildLoad(LBuilder builder, LValue pointer) { return LLVMBuildLoad(builder, pointer, ""); }
static inline LValue buildStore(LBuilder builder, LValue value, LValue pointer) { return LLVMBuildStore(builder, value, pointer); }
static inline LValue buildZExt(LBuilder builder, LValue value, LType type) { return LLVMBuildZExt(builder, value, type, ""); }
Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCapabilities.cpp (149895 => 149896)
--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCapabilities.cpp 2013-05-10 18:39:53 UTC (rev 149895)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCapabilities.cpp 2013-05-10 18:47:32 UTC (rev 149896)
@@ -146,6 +146,7 @@
break;
return false;
case Branch:
+ case LogicalNot:
if (node->child1().useKind() == BooleanUse)
break;
return false;
Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp (149895 => 149896)
--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp 2013-05-10 18:39:53 UTC (rev 149895)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp 2013-05-10 18:47:32 UTC (rev 149896)
@@ -373,6 +373,9 @@
case CompareGreaterEq:
compileCompareGreaterEq();
break;
+ case LogicalNot:
+ compileLogicalNot();
+ break;
case Branch:
compileBranch();
break;
@@ -1040,6 +1043,20 @@
RELEASE_ASSERT_NOT_REACHED();
}
+ void compileLogicalNot()
+ {
+ switch (m_node->child1().useKind()) {
+ case BooleanUse: {
+ m_booleanValues.add(m_node, m_out.bitNot(lowBoolean(m_node->child1())));
+ break;
+ }
+
+ default:
+ RELEASE_ASSERT_NOT_REACHED();
+ break;
+ }
+ }
+
void compileBranch()
{
switch (m_node->child1().useKind()) {
Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLOutput.h (149895 => 149896)
--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLOutput.h 2013-05-10 18:39:53 UTC (rev 149895)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLOutput.h 2013-05-10 18:47:32 UTC (rev 149896)
@@ -138,6 +138,7 @@
LValue shl(LValue left, LValue right) { return buildShl(m_builder, left, right); }
LValue aShr(LValue left, LValue right) { return buildAShr(m_builder, left, right); }
LValue lShr(LValue left, LValue right) { return buildLShr(m_builder, left, right); }
+ LValue bitNot(LValue value) { return buildNot(m_builder, value); }
LValue addWithOverflow32(LValue left, LValue right)
{