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

Unified Diff: pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js

Issue 2934623003: fix #29753, use ES5 constructors for ddc (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/dev_compiler/test/browser/runtime_tests.js ('k') | pkg/dev_compiler/test/codegen_expected/closure.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js
diff --git a/pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js b/pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js
index 8d2a44d562145742e6e18e9d814326a099f43feb..cb7f09f141914ffafe19813d4b2ae7cf1a5b8945 100644
--- a/pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js
+++ b/pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js
@@ -23,6 +23,8 @@ define(['dart_sdk'], function(dart_sdk) {
dart.throw(message);
}
};
+ (BenchmarkBase$.Expect.new = function() {
+ }).prototype = BenchmarkBase$.Expect.prototype;
dart.setSignature(BenchmarkBase$.Expect, {
methods: () => ({fail: dart.fnType(dart.dynamic, [dart.dynamic])}),
statics: () => ({
@@ -38,9 +40,6 @@ define(['dart_sdk'], function(dart_sdk) {
set name(value) {
super.name = value;
}
- new(name) {
- this[name$] = name;
- }
run() {}
warmup() {
this.run();
@@ -55,7 +54,7 @@ define(['dart_sdk'], function(dart_sdk) {
static measureFor(f, timeMinimum) {
let time = 0;
let iter = 0;
- let watch = new core.Stopwatch();
+ let watch = new core.Stopwatch.new();
watch.start();
let elapsed = 0;
while (dart.notNull(elapsed) < dart.notNull(timeMinimum)) {
@@ -81,6 +80,9 @@ define(['dart_sdk'], function(dart_sdk) {
core.print(dart.str`${this.name}(RunTime): ${score} us.`);
}
};
+ (BenchmarkBase$.BenchmarkBase.new = function(name) {
+ this[name$] = name;
+ }).prototype = BenchmarkBase$.BenchmarkBase.prototype;
const name$ = Symbol("BenchmarkBase.name");
dart.setSignature(BenchmarkBase$.BenchmarkBase, {
fields: () => ({name: dart.finalFieldType(core.String)}),
« no previous file with comments | « pkg/dev_compiler/test/browser/runtime_tests.js ('k') | pkg/dev_compiler/test/codegen_expected/closure.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698