| // Copyright 2014 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| return (function() { if (x-- == 0) throw error;}); |
| // TODO(asm): This module is not valid asm.js. |
| return { w0: w0, w1: w1, w2: w2, w3: w3 }; |
| assertThrowsEquals(function() { m.w0(counter(5)) }, error); |
| assertThrowsEquals(function() { m.w1(counter(5)) }, error); |
| assertThrowsEquals(function() { m.w2(counter(5)) }, error); |
| assertEquals(111, m.w3(counter(5))); |