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

Side by Side Diff: test/mjsunit/asm/pointer-masking.js

Issue 1072353002: [turbofan] Optimize silent hole checks on legacy const context slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2015 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 var stdlib = this;
6 var foreign = {};
7 var heap = new ArrayBuffer(64 * 1024);
8
9
10 var pm1 = (function(stdlib, foreign, heap) {
11 "use asm";
12 var HEAP8 = new stdlib.Int8Array(heap);
13 const MASK1 = 1023;
14 function load1(i) {
15 i = i|0;
16 var j = 0;
17 j = HEAP8[(i & MASK1)]|0;
18 return j|0;
19 }
20 function store1(i, j) {
21 i = i|0;
22 j = j|0;
23 HEAP8[(i & MASK1)] = j;
24 }
25 return {load1: load1, store1: store1};
26 })(stdlib, foreign, heap);
27
28 assertEquals(0, pm1.load1(0));
29 assertEquals(0, pm1.load1(1025));
30 pm1.store1(0, 1);
31 pm1.store1(1025, 127);
32 assertEquals(1, pm1.load1(0));
33 assertEquals(1, pm1.load1(1024));
34 assertEquals(127, pm1.load1(1));
35 assertEquals(127, pm1.load1(1025));
OLDNEW
« no previous file with comments | « src/compiler/common-operator-reducer.cc ('k') | test/unittests/compiler/common-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698