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

Side by Side Diff: test/mjsunit/regress/regress-crbug-478612.js

Issue 1224623017: [x64] Fix handling of Smi constants in LSubI and LBitI (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Flags: --allow-natives-syntax
6
7 // This is used to force binary operations below to have tagged representation.
8 var z = {valueOf: function() { return 3; }};
9
10
11 function f() {
12 var y = -2;
13 return (1 & z) - y++;
14 }
15
16 assertEquals(3, f());
17 assertEquals(3, f());
18 %OptimizeFunctionOnNextCall(f);
19 assertEquals(3, f());
20
21
22 function g() {
23 var y = 2;
24 return (1 & z) | y++;
25 }
26
27 assertEquals(3, g());
28 assertEquals(3, g());
29 %OptimizeFunctionOnNextCall(g);
30 assertEquals(3, g());
31
32
33 function h() {
34 var y = 3;
35 return (3 & z) & y++;
36 }
37
38 assertEquals(3, h());
39 assertEquals(3, h());
40 %OptimizeFunctionOnNextCall(h);
41 assertEquals(3, h());
42
43
44 function i() {
45 var y = 2;
46 return (1 & z) ^ y++;
47 }
48
49 assertEquals(3, i());
50 assertEquals(3, i());
51 %OptimizeFunctionOnNextCall(i);
52 assertEquals(3, i());
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698