Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: test/mjsunit/asm/int32array-constant-key.js

Issue 638853004: [turbofan] Eliminate typed array bounds checks if both key and length are constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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, heap) {
6 "use asm";
7 var MEM32 = new stdlib.Int32Array(heap);
8 function load0() {
9 return MEM32[0];
10 }
11 function load4() {
12 return MEM32[4];
13 }
14 function store0(v) {
15 MEM32[0] = v;
16 }
17 function store4(v) {
18 MEM32[4] = v;
19 }
20 return { load0: load0, store0: store0, load4: load4, store4: store4 };
21 }
22
23 var m = Module(this, {}, new ArrayBuffer(4));
24
25 assertEquals(0, m.load0());
26 assertEquals(undefined, m.load4());
27 m.store0(0x12345678);
28 assertEquals(0x12345678, m.load0());
29 assertEquals(undefined, m.load4());
30 m.store4(43);
31 assertEquals(0x12345678, m.load0());
32 assertEquals(undefined, m.load4());
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | test/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698