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

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

Issue 3009733002: fix how DDC finds its undefined constant (Closed)
Patch Set: rebase and rebuild JS files Created 3 years, 4 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
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 cb7f09f141914ffafe19813d4b2ae7cf1a5b8945..22cf8ccbb6c65b4481813951fd021045770251cf 100644
--- a/pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js
+++ b/pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js
@@ -4,6 +4,8 @@ define(['dart_sdk'], function(dart_sdk) {
const dart = dart_sdk.dart;
const dartx = dart_sdk.dartx;
const BenchmarkBase$ = Object.create(null);
+ const $length = dartx.length;
+ const $_get = dartx._get;
let VoidToNull = () => (VoidToNull = dart.constFn(dart.fnType(core.Null, [])))();
BenchmarkBase$.Expect = class Expect extends core.Object {
static equals(expected, actual) {
@@ -12,11 +14,11 @@ define(['dart_sdk'], function(dart_sdk) {
}
}
static listEquals(expected, actual) {
- if (expected[dartx.length] != actual[dartx.length]) {
- dart.throw(dart.str`Lists have different lengths: ${expected[dartx.length]} vs ${actual[dartx.length]}`);
+ if (expected[$length] != actual[$length]) {
+ dart.throw(dart.str`Lists have different lengths: ${expected[$length]} vs ${actual[$length]}`);
}
- for (let i = 0; i < dart.notNull(actual[dartx.length]); i++) {
- BenchmarkBase$.Expect.equals(expected[dartx._get](i), actual[dartx._get](i));
+ for (let i = 0; i < dart.notNull(actual[$length]); i++) {
+ BenchmarkBase$.Expect.equals(expected[$_get](i), actual[$_get](i));
}
}
fail(message) {
@@ -25,6 +27,7 @@ define(['dart_sdk'], function(dart_sdk) {
};
(BenchmarkBase$.Expect.new = function() {
}).prototype = BenchmarkBase$.Expect.prototype;
+ dart.addTypeTests(BenchmarkBase$.Expect);
dart.setSignature(BenchmarkBase$.Expect, {
methods: () => ({fail: dart.fnType(dart.dynamic, [dart.dynamic])}),
statics: () => ({
@@ -83,6 +86,7 @@ define(['dart_sdk'], function(dart_sdk) {
(BenchmarkBase$.BenchmarkBase.new = function(name) {
this[name$] = name;
}).prototype = BenchmarkBase$.BenchmarkBase.prototype;
+ dart.addTypeTests(BenchmarkBase$.BenchmarkBase);
const name$ = Symbol("BenchmarkBase.name");
dart.setSignature(BenchmarkBase$.BenchmarkBase, {
fields: () => ({name: dart.finalFieldType(core.String)}),
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | pkg/dev_compiler/test/codegen_expected/closure.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698