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

Side by Side Diff: test/mjsunit/compiler/deopt-tonumber-compare.js

Issue 1140583004: [turbofan] Add frame state before JavaScript comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove obsolete #if 0. Slightly refactor strong mode check. Created 5 years, 7 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/operator-properties.cc ('k') | test/unittests/compiler/js-operator-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
(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 var m = (function() {
8 "use asm";
9 function f(x) {
10 return x < 0;
11 }
12 function g(x) {
13 return 0 < x;
14 }
15 return { f: f, g: g };
16 })();
17 var f = m.f;
18 var g = m.g;
19
20 var counter = 0;
21
22 function deopt(f) {
23 return {
24 toString : function() {
25 %DeoptimizeFunction(f);
26 counter++;
27 return "2";
28 }
29 };
30 }
31
32 assertEquals(false, f(deopt(f)));
33 assertEquals(1, counter);
34
35 assertEquals(true, g(deopt(g)));
36 assertEquals(2, counter);
37
38 %OptimizeFunctionOnNextCall(f);
39 assertEquals(false, f(deopt(f)));
40 assertEquals(3, counter);
41
42 %OptimizeFunctionOnNextCall(g);
43 assertEquals(true, g(deopt(g)));
44 assertEquals(4, counter);
OLDNEW
« no previous file with comments | « src/compiler/operator-properties.cc ('k') | test/unittests/compiler/js-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698