diff options
author | isaacs <i@izs.me> | 2012-09-18 15:20:38 -0700 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-09-21 01:52:24 +0200 |
commit | 3411a03dd114d635800cc50749d2351cd734eb2a (patch) | |
tree | 0ba1e52ab2236286894b33400302181ece91b63a /deps/v8/test/mjsunit/array-bounds-check-removal.js | |
parent | cc1b09d6b7c3cc6b8729804cbf644634ba5d0815 (diff) | |
download | android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.tar.gz android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.tar.bz2 android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.zip |
V8: Upgrade to 3.13.7.1
Diffstat (limited to 'deps/v8/test/mjsunit/array-bounds-check-removal.js')
-rw-r--r-- | deps/v8/test/mjsunit/array-bounds-check-removal.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/deps/v8/test/mjsunit/array-bounds-check-removal.js b/deps/v8/test/mjsunit/array-bounds-check-removal.js index 81064aa237..0ab3096326 100644 --- a/deps/v8/test/mjsunit/array-bounds-check-removal.js +++ b/deps/v8/test/mjsunit/array-bounds-check-removal.js @@ -123,7 +123,7 @@ check_test_minus(7,false); // ALWAYS: 3 // NEVER: 4 -if (false) { +// Test that we still deopt on failed bound checks test_base(5,true); test_base(6,true); test_base(5,false); @@ -139,7 +139,21 @@ test_base(6,false); %OptimizeFunctionOnNextCall(test_base); test_base(2048,true); assertTrue(%GetOptimizationStatus(test_base) != 1); + +// Specific test on negative offsets +var short_a = new Array(100); +for (var i = 0; i < short_a.length; i++) short_a[i] = 0; +function short_test(a, i) { + a[i + 9] = 0; + a[i - 10] = 0; } +short_test(short_a, 50); +short_test(short_a, 50); +%OptimizeFunctionOnNextCall(short_test); +short_a.length = 10; +short_test(a, 0); +assertTrue(%GetOptimizationStatus(short_test) != 1); + gc(); |