FTL should support StringFromCharCode
https://bugs.webkit.org/show_bug.cgi?id=154267
Source/JavaScriptCore:

rdar://problem/24192536

Reviewed by Mark Lam.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode): Fix a bug preventing the UntypedUse from being effective.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStringFromCharCode): Implement the opcode.
* tests/stress/string-from-char-code-slow.js: Added.

LayoutTests:


Reviewed by Mark Lam.

* js/regress/script-tests/string-from-char-code.js: Added.
(result):
* js/regress/script-tests/untyped-string-from-char-code.js: Added.
(result):
* js/regress/string-from-char-code-expected.txt: Added.
* js/regress/string-from-char-code.html: Added.
* js/regress/untyped-string-from-char-code-expected.txt: Added.
* js/regress/untyped-string-from-char-code.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@196642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
index 2f235ad..b461e7f 100644
--- a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
@@ -602,11 +602,10 @@
         }
 
         case StringFromCharCode:
-            if (node->child1()->shouldSpeculateUntypedForArithmetic()) {
+            if (node->child1()->shouldSpeculateInt32())
+                fixEdge<Int32Use>(node->child1());
+            else
                 fixEdge<UntypedUse>(node->child1());
-                break;
-            }
-            fixEdge<Int32Use>(node->child1());
             break;
 
         case StringCharAt: