OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 function Module(stdlib, foreign, buffer) { |
| 6 "use asm"; |
| 7 var HEAP32 = new stdlib.Int32Array(buffer); |
| 8 function g(a) { |
| 9 HEAP32[a] = 9982 * 100; |
| 10 return a; |
| 11 } |
| 12 function f(i1) { |
| 13 i1 = i1 | 0; |
| 14 var i2 = HEAP32[i1 >> 2] | 0; |
| 15 g(i1); |
| 16 L2909: { |
| 17 L2: { |
| 18 if (0) { |
| 19 if (0) break L2; |
| 20 g(i2); |
| 21 break L2909; |
| 22 } |
| 23 } |
| 24 var r = (HEAP32[1] | 0) / 100 | 0; |
| 25 g(r); |
| 26 return r; |
| 27 } |
| 28 } |
| 29 return {f: f}; |
| 30 } |
| 31 |
| 32 var f = Module(this, {}, new ArrayBuffer(64 * 1024)).f; |
| 33 assertEquals(9982, f(1)); |
OLD | NEW |