| // 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. |
| var buffer = new ArrayBuffer(64 * 1024); |
| var m = (function Module(stdlib, foreign, heap) { |
| var MEM64 = new stdlib.Float64Array(heap); |
| return +MEM64[i + 8 >> 3]; |
| return { load: load, store: store, load8: load8, store8: store8 }; |
| })(stdlib, foreign, buffer); |
| assertEquals(NaN, m.load(-8)); |
| assertEquals(NaN, m.load8(-16)); |
| assertEquals(42.0, m.load8(-8)); |
| assertEquals(99.0, m.load(0)); |
| assertEquals(99.0, m.load8(-8)); |