REGRESSION: `if (false === (true && undefined)) console.log("wrong!");` logs "wrong!", shouldn't!
https://bugs.webkit.org/show_bug.cgi?id=123179

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore: 

* parser/NodeConstructors.h:
(JSC::LogicalOpNode::LogicalOpNode):
* parser/ResultType.h:
(JSC::ResultType::forLogicalOp): Don't assume that && produces a boolean.
This is JavaScript (aka Sparta).

LayoutTests: 

* js/dom/branch-fold-correctness.html: Added a test for this case.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed