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

Unified Diff: test/codegen/expect/DeltaBlue.js

Issue 1979013003: fix #569, cache constants defined in methods (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 side-by-side diff with in-line comments
Download patch
« test/browser/language_tests.js ('K') | « test/browser/language_tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/DeltaBlue.js
diff --git a/test/codegen/expect/DeltaBlue.js b/test/codegen/expect/DeltaBlue.js
index 1792313ab2d7b511e206408e0862c9e7d798c540..17c388d596c4c2547b37ebbd1343f735f02f1e69 100644
--- a/test/codegen/expect/DeltaBlue.js
+++ b/test/codegen/expect/DeltaBlue.js
@@ -81,13 +81,14 @@ dart_library.library('DeltaBlue', null, /* Imports */[
dart.setSignature(DeltaBlue$.DeltaBlue, {
constructors: () => ({DeltaBlue: [DeltaBlue$.DeltaBlue, []]})
});
+ let const$;
DeltaBlue$.Strength = class Strength extends core.Object {
Strength(value, name) {
this.value = value;
this.name = name;
}
nextWeaker() {
- return dart.const(dart.list([DeltaBlue$.STRONG_PREFERRED, DeltaBlue$.PREFERRED, DeltaBlue$.STRONG_DEFAULT, DeltaBlue$.NORMAL, DeltaBlue$.WEAK_DEFAULT, DeltaBlue$.WEAKEST], DeltaBlue$.Strength))[dartx.get](this.value);
+ return (const$ || (const$ = dart.const(dart.list([DeltaBlue$.STRONG_PREFERRED, DeltaBlue$.PREFERRED, DeltaBlue$.STRONG_DEFAULT, DeltaBlue$.NORMAL, DeltaBlue$.WEAK_DEFAULT, DeltaBlue$.WEAKEST], DeltaBlue$.Strength))))[dartx.get](this.value);
}
static stronger(s1, s2) {
return dart.notNull(s1.value) < dart.notNull(s2.value);
« test/browser/language_tests.js ('K') | « test/browser/language_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698