Index: test/webkit/registerCachingAcrossBranchTargets.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/registerCachingAcrossBranchTargets.js |
similarity index 73% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/registerCachingAcrossBranchTargets.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..e2e3e7c3a3733dc270edaaa59463cbe256fbb188 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/registerCachingAcrossBranchTargets.js |
@@ -22,10 +22,11 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
-"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating." |
+"This test makes sure we don't incorrectly cache virtual registers in system registers across VM branches" |
); |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
- |
- |
+shouldBeTrue("(true ? function(){ return true; } : a.b)()"); |
+shouldBeTrue("(function(){ return true; } || a.b)()"); |
+shouldBeTrue("(function(){ return (true ? function(){return true;} : a.b)(); })()"); |
+shouldBeTrue("(function(){ return (function(){return true;} || a.b)(); })()"); |
+shouldBeTrue("(function(){ var i = 0; var result = false; var a = {c:true}.c; do { result = a; i++; } while (i < 2); return result; })()"); |