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

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

Issue 1043003002: keep mixin and interface implementation info at runtime (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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/codegen/expect/server_mode/html_input.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var sunflower; 1 var sunflower;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let ORANGE = "orange"; 4 let ORANGE = "orange";
5 let SEED_RADIUS = 2; 5 let SEED_RADIUS = 2;
6 let SCALE_FACTOR = 4; 6 let SCALE_FACTOR = 4;
7 let TAU = dart.notNull(math.PI) * 2; 7 let TAU = dart.notNull(math.PI) * 2;
8 let MAX_D = 300; 8 let MAX_D = 300;
9 let centerX = dart.notNull(MAX_D) / 2; 9 let centerX = dart.notNull(MAX_D) / 2;
10 let centerY = centerX; 10 let centerY = centerX;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 exports.context.beginPath(); 60 exports.context.beginPath();
61 exports.context.lineWidth = 2; 61 exports.context.lineWidth = 2;
62 exports.context.fillStyle = this.color; 62 exports.context.fillStyle = this.color;
63 exports.context.strokeStyle = this.color; 63 exports.context.strokeStyle = this.color;
64 exports.context.arc(this.x, this.y, this.radius, 0, TAU, false); 64 exports.context.arc(this.x, this.y, this.radius, 0, TAU, false);
65 exports.context.fill(); 65 exports.context.fill();
66 exports.context.closePath(); 66 exports.context.closePath();
67 exports.context.stroke(); 67 exports.context.stroke();
68 } 68 }
69 } 69 }
70 CirclePainter[dart.implements] = [Circle];
70 class SunflowerSeed extends dart.mixin(Circle, CirclePainter) { 71 class SunflowerSeed extends dart.mixin(Circle, CirclePainter) {
71 SunflowerSeed(x, y, radius, color) { 72 SunflowerSeed(x, y, radius, color) {
72 if (color === void 0) 73 if (color === void 0)
73 color = null; 74 color = null;
74 super.Circle(x, y, radius); 75 super.Circle(x, y, radius);
75 if (color !== null) 76 if (color !== null)
76 this.color = color; 77 this.color = color;
77 } 78 }
78 } 79 }
79 // Exports: 80 // Exports:
80 exports.ORANGE = ORANGE; 81 exports.ORANGE = ORANGE;
81 exports.SEED_RADIUS = SEED_RADIUS; 82 exports.SEED_RADIUS = SEED_RADIUS;
82 exports.SCALE_FACTOR = SCALE_FACTOR; 83 exports.SCALE_FACTOR = SCALE_FACTOR;
83 exports.TAU = TAU; 84 exports.TAU = TAU;
84 exports.MAX_D = MAX_D; 85 exports.MAX_D = MAX_D;
85 exports.centerX = centerX; 86 exports.centerX = centerX;
86 exports.centerY = centerY; 87 exports.centerY = centerY;
87 exports.querySelector = querySelector; 88 exports.querySelector = querySelector;
88 exports.main = main; 89 exports.main = main;
89 exports.draw = draw; 90 exports.draw = draw;
90 exports.SunflowerSeed = SunflowerSeed; 91 exports.SunflowerSeed = SunflowerSeed;
91 exports.Circle = Circle; 92 exports.Circle = Circle;
92 exports.CirclePainter = CirclePainter; 93 exports.CirclePainter = CirclePainter;
93 })(sunflower || (sunflower = {})); 94 })(sunflower || (sunflower = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/server_mode/html_input.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698