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

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

Issue 1965213003: simplify constructors, fixes #564 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 | « 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_sdk' 2 'dart_sdk'
3 ], function(exports, dart_sdk) { 3 ], function(exports, dart_sdk) {
4 'use strict'; 4 'use strict';
5 const core = dart_sdk.core; 5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart; 6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx; 7 const dartx = dart_sdk.dartx;
8 const BenchmarkBase$ = Object.create(null); 8 const BenchmarkBase$ = Object.create(null);
9 BenchmarkBase$.Expect = class Expect extends core.Object { 9 BenchmarkBase$.Expect = class Expect extends core.Object {
10 static equals(expected, actual) { 10 static equals(expected, actual) {
(...skipping 15 matching lines...) Expand all
26 }; 26 };
27 dart.setSignature(BenchmarkBase$.Expect, { 27 dart.setSignature(BenchmarkBase$.Expect, {
28 methods: () => ({fail: [dart.dynamic, [dart.dynamic]]}), 28 methods: () => ({fail: [dart.dynamic, [dart.dynamic]]}),
29 statics: () => ({ 29 statics: () => ({
30 equals: [dart.void, [dart.dynamic, dart.dynamic]], 30 equals: [dart.void, [dart.dynamic, dart.dynamic]],
31 listEquals: [dart.void, [core.List, core.List]] 31 listEquals: [dart.void, [core.List, core.List]]
32 }), 32 }),
33 names: ['equals', 'listEquals'] 33 names: ['equals', 'listEquals']
34 }); 34 });
35 BenchmarkBase$.BenchmarkBase = class BenchmarkBase extends core.Object { 35 BenchmarkBase$.BenchmarkBase = class BenchmarkBase extends core.Object {
36 BenchmarkBase(name) { 36 new(name) {
37 this.name = name; 37 this.name = name;
38 } 38 }
39 run() {} 39 run() {}
40 warmup() { 40 warmup() {
41 this.run(); 41 this.run();
42 } 42 }
43 exercise() { 43 exercise() {
44 for (let i = 0; i < 10; i++) { 44 for (let i = 0; i < 10; i++) {
45 this.run(); 45 this.run();
46 } 46 }
(...skipping 23 matching lines...) Expand all
70 }), 2000); 70 }), 2000);
71 this.teardown(); 71 this.teardown();
72 return result; 72 return result;
73 } 73 }
74 report() { 74 report() {
75 let score = this.measure(); 75 let score = this.measure();
76 core.print(`${this.name}(RunTime): ${score} us.`); 76 core.print(`${this.name}(RunTime): ${score} us.`);
77 } 77 }
78 }; 78 };
79 dart.setSignature(BenchmarkBase$.BenchmarkBase, { 79 dart.setSignature(BenchmarkBase$.BenchmarkBase, {
80 constructors: () => ({BenchmarkBase: [BenchmarkBase$.BenchmarkBase, [core.St ring]]}), 80 constructors: () => ({new: [BenchmarkBase$.BenchmarkBase, [core.String]]}),
81 methods: () => ({ 81 methods: () => ({
82 run: [dart.void, []], 82 run: [dart.void, []],
83 warmup: [dart.void, []], 83 warmup: [dart.void, []],
84 exercise: [dart.void, []], 84 exercise: [dart.void, []],
85 setup: [dart.void, []], 85 setup: [dart.void, []],
86 teardown: [dart.void, []], 86 teardown: [dart.void, []],
87 measure: [core.double, []], 87 measure: [core.double, []],
88 report: [dart.void, []] 88 report: [dart.void, []]
89 }), 89 }),
90 statics: () => ({measureFor: [core.double, [core.Function, core.int]]}), 90 statics: () => ({measureFor: [core.double, [core.Function, core.int]]}),
91 names: ['measureFor'] 91 names: ['measureFor']
92 }); 92 });
93 // Exports: 93 // Exports:
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