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

Side by Side Diff: test/mjsunit/minmax-simple.js

Issue 2732213005: Revert "This is a speculative chain of reverts to improve a Chrome" (Closed)
Patch Set: merge Created 3 years, 9 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 | « test/mjsunit/harmony/futex.js ('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: --expose-natives-as natives
6 // Test the MaxSimple and MinSimple internal methods in runtime.js
7
8 var MaxSimple = natives.ImportNow("MaxSimple");
9 var MinSimple = natives.ImportNow("MinSimple");
10
11 function checkEvaluations(target) {
12 var evaluations = 0;
13 var observedNumber = {
14 valueOf: function() {
15 evaluations++;
16 return 0;
17 }
18 };
19 target(observedNumber, observedNumber);
20 return evaluations;
21 }
22
23 assertEquals(1, MaxSimple(-1, 1));
24 assertEquals(2, checkEvaluations(MaxSimple));
25
26 assertEquals(-1, MinSimple(-1, 1));
27 assertEquals(2, checkEvaluations(MinSimple));
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/futex.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698