commit | 81c68cce2f6fa445e3350441e2ec8a4ae04fd8d8 | [log] [tgz] |
---|---|---|
author | ggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Sat Apr 27 06:43:33 2013 +0000 |
committer | ggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Sat Apr 27 06:43:33 2013 +0000 |
tree | bb71408063d15819450cc42d4c8876adf8262843 | |
parent | cc6c60df17001f785362835a4b303689d4225f39 [diff] |
Source/JavaScriptCore: Re-landing <http://trac.webkit.org/changeset/148999> Filled out more cases of branch folding in bytecode when emitting expressions into a branching context https://bugs.webkit.org/show_bug.cgi?id=115057 Reviewed by Phil Pizlo. We can't fold the number == 1 case to boolean because all non-zero numbers down-cast to true, but only 1 is == to true. Source/WTF: Filled out more cases of branch folding in bytecode when emitting expressions into a branching context https://bugs.webkit.org/show_bug.cgi?id=115057 Reviewed by Filip Pizlo. Added a helper constructor for TriState so clients can make one without branching or making assumptions about the integer values of TriStates. * wtf/TriState.h: (WTF::triState): (WTF): LayoutTests: Re-landing <http://trac.webkit.org/changeset/148999> Filled out more cases of branch folding in bytecode when emitting expressions into a branching context https://bugs.webkit.org/show_bug.cgi?id=115057 Reviewed by Phil Pizlo. Added a more exhaustive correctness test. * fast/js/branch-fold-correctness-expected.txt: Added. * fast/js/branch-fold-correctness.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149236 268f45cc-cd09-0410-ab3c-d52691b4dbfc