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

Side by Side Diff: test/codegen/expect/BenchmarkBase.js

Issue 1195523002: Handle dynamic as bottom inside of function type reps (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Fix typo in comment Created 5 years, 6 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/browser/runtime_tests.js ('k') | test/codegen/expect/DeltaBlue.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('BenchmarkBase', null, /* Imports */[ 1 dart_library.library('BenchmarkBase', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 ], function(exports, dart, core) { 5 ], function(exports, dart, core) {
6 'use strict'; 6 'use strict';
7 let dartx = dart.dartx; 7 let dartx = dart.dartx;
8 class Expect extends core.Object { 8 class Expect extends core.Object {
9 static equals(expected, actual) { 9 static equals(expected, actual) {
10 if (!dart.equals(expected, actual)) { 10 if (!dart.equals(expected, actual)) {
11 throw `Values not equal: ${expected} vs ${actual}`; 11 throw `Values not equal: ${expected} vs ${actual}`;
12 } 12 }
13 } 13 }
14 static listEquals(expected, actual) { 14 static listEquals(expected, actual) {
15 if (expected[dartx.length] != actual[dartx.length]) { 15 if (expected[dartx.length] != actual[dartx.length]) {
16 throw `Lists have different lengths: ${expected[dartx.length]} vs ${actu al[dartx.length]}`; 16 throw `Lists have different lengths: ${expected[dartx.length]} vs ${actu al[dartx.length]}`;
17 } 17 }
18 for (let i = 0; dart.notNull(i) < dart.notNull(actual[dartx.length]); i = dart.notNull(i) + 1) { 18 for (let i = 0; dart.notNull(i) < dart.notNull(actual[dartx.length]); i = dart.notNull(i) + 1) {
19 Expect.equals(expected[dartx.get](i), actual[dartx.get](i)); 19 Expect.equals(expected[dartx.get](i), actual[dartx.get](i));
20 } 20 }
21 } 21 }
22 fail(message) { 22 fail(message) {
23 throw message; 23 throw message;
24 } 24 }
25 } 25 }
26 dart.setSignature(Expect, { 26 dart.setSignature(Expect, {
27 methods: () => ({fail: [core.Object, [core.Object]]}), 27 methods: () => ({fail: [dart.dynamic, [dart.dynamic]]}),
28 statics: () => ({ 28 statics: () => ({
29 equals: [dart.void, [core.Object, core.Object]], 29 equals: [dart.void, [dart.dynamic, dart.dynamic]],
30 listEquals: [dart.void, [core.List, core.List]] 30 listEquals: [dart.void, [core.List, core.List]]
31 }), 31 }),
32 names: ['equals', 'listEquals'] 32 names: ['equals', 'listEquals']
33 }); 33 });
34 class BenchmarkBase extends core.Object { 34 class BenchmarkBase extends core.Object {
35 BenchmarkBase(name) { 35 BenchmarkBase(name) {
36 this.name = name; 36 this.name = name;
37 } 37 }
38 run() {} 38 run() {}
39 warmup() { 39 warmup() {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 measure: [core.double, []], 86 measure: [core.double, []],
87 report: [dart.void, []] 87 report: [dart.void, []]
88 }), 88 }),
89 statics: () => ({measureFor: [core.double, [core.Function, core.int]]}), 89 statics: () => ({measureFor: [core.double, [core.Function, core.int]]}),
90 names: ['measureFor'] 90 names: ['measureFor']
91 }); 91 });
92 // Exports: 92 // Exports:
93 exports.Expect = Expect; 93 exports.Expect = Expect;
94 exports.BenchmarkBase = BenchmarkBase; 94 exports.BenchmarkBase = BenchmarkBase;
95 }); 95 });
OLDNEW
« no previous file with comments | « test/browser/runtime_tests.js ('k') | test/codegen/expect/DeltaBlue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698