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

Side by Side Diff: test/mjsunit/compiler/turbo-number-feedback.js

Issue 2150553002: [turbofan] Introduces the SpeculativeNumberShiftLeft opcode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 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/compiler/verifier.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax --turbo-type-feedback 5 // Flags: --allow-natives-syntax --turbo-type-feedback
6 6
7 (function AddSubtractSmis() { 7 (function AddSubtractSmis() {
8 function f0(a, b, c) { 8 function f0(a, b, c) {
9 return a + b - c; 9 return a + b - c;
10 } 10 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 return x + b; 50 return x + b;
51 } 51 }
52 52
53 assertEquals(1, f3(0, 1)); 53 assertEquals(1, f3(0, 1));
54 assertEquals(1, f3(0, 1)); 54 assertEquals(1, f3(0, 1));
55 %OptimizeFunctionOnNextCall(f3); 55 %OptimizeFunctionOnNextCall(f3);
56 assertEquals(1, f3(0, 1)); 56 assertEquals(1, f3(0, 1));
57 assertEquals(1.5, f3(1, 1)); 57 assertEquals(1.5, f3(1, 1));
58 })(); 58 })();
59
60 (function ShiftLeftSmis() {
61 function f4(a, b) {
62 return a << b;
63 }
64
65 assertEquals(24, f4(3, 3));
66 assertEquals(40, f4(5, 3));
67 %OptimizeFunctionOnNextCall(f4);
68 assertEquals(64, f4(4, 4));
69 })();
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698