Index: test/mjsunit/compiler/alloc-number-debug.js |
diff --git a/test/mjsunit/compiler/alloc-number.js b/test/mjsunit/compiler/alloc-number-debug.js |
similarity index 87% |
copy from test/mjsunit/compiler/alloc-number.js |
copy to test/mjsunit/compiler/alloc-number-debug.js |
index 85c39de431fd7ec7264e277f7ce727ad5f7f1a63..ccfcc0c185a6d29c0acfc3c217276434b71f130a 100644 |
--- a/test/mjsunit/compiler/alloc-number.js |
+++ b/test/mjsunit/compiler/alloc-number-debug.js |
@@ -1,4 +1,4 @@ |
-// Copyright 2010 the V8 project authors. All rights reserved. |
+// Copyright 2014 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -25,15 +25,20 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+// Flags: --allow-natives-syntax |
// Try to get a GC because of a heap number allocation while we |
// have live values (o) in a register. |
function f(o) { |
var x = 1.5; |
var y = 2.5; |
- for (var i = 1; i < 100000; i+=2) o.val = x + y + i; |
+ for (var i = 1; i < 3; i += 1) { |
+ %SetAllocationTimeout(1, 0, false); |
+ o.val = x + y + i; |
+ %SetAllocationTimeout(-1, -1, true); |
+ } |
return o; |
} |
var o = { val: 0 }; |
-for (var i = 0; i < 100; i++) f(o); |
+f(o); |