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

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

Issue 1144303003: Use signature inheritance when method types are unchanged (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Remove empty signatures Created 5 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/codegen/expect/names.js ('k') | test/codegen/expect/sunflower/dom.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 var opassign = dart.defineLibrary(opassign, {}); 1 var opassign = dart.defineLibrary(opassign, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 (function(exports, core) { 3 (function(exports, core) {
4 'use strict'; 4 'use strict';
5 dart.copyProperties(exports, { 5 dart.copyProperties(exports, {
6 get index() { 6 get index() {
7 core.print('called "index" getter'); 7 core.print('called "index" getter');
8 return 0; 8 return 0;
9 } 9 }
10 }); 10 });
11 dart.defineLazyProperties(exports, { 11 dart.defineLazyProperties(exports, {
12 get _foo() { 12 get _foo() {
13 return new Foo(); 13 return new Foo();
14 } 14 }
15 }); 15 });
16 dart.copyProperties(exports, { 16 dart.copyProperties(exports, {
17 get foo() { 17 get foo() {
18 core.print('called "foo" getter'); 18 core.print('called "foo" getter');
19 return exports._foo; 19 return exports._foo;
20 } 20 }
21 }); 21 });
22 class Foo extends core.Object { 22 class Foo extends core.Object {
23 Foo() { 23 Foo() {
24 this.x = 100; 24 this.x = 100;
25 } 25 }
26 } 26 }
27 dart.setSignature(Foo, {});
28 function main() { 27 function main() {
29 let f = dart.map([0, 40]); 28 let f = dart.map([0, 40]);
30 core.print('should only call "index" 2 times:'); 29 core.print('should only call "index" 2 times:');
31 let i = exports.index; 30 let i = exports.index;
32 f.set(i, dart.dsend(f.get(i), '+', 1)); 31 f.set(i, dart.dsend(f.get(i), '+', 1));
33 forcePostfix((() => { 32 forcePostfix((() => {
34 let i = exports.index, x = f.get(i); 33 let i = exports.index, x = f.get(i);
35 f.set(i, dart.dsend(x, '+', 1)); 34 f.set(i, dart.dsend(x, '+', 1));
36 return x; 35 return x;
37 })()); 36 })());
(...skipping 11 matching lines...) Expand all
49 } 48 }
50 dart.fn(main); 49 dart.fn(main);
51 function forcePostfix(x) { 50 function forcePostfix(x) {
52 } 51 }
53 dart.fn(forcePostfix); 52 dart.fn(forcePostfix);
54 // Exports: 53 // Exports:
55 exports.Foo = Foo; 54 exports.Foo = Foo;
56 exports.main = main; 55 exports.main = main;
57 exports.forcePostfix = forcePostfix; 56 exports.forcePostfix = forcePostfix;
58 })(opassign, core); 57 })(opassign, core);
OLDNEW
« no previous file with comments | « test/codegen/expect/names.js ('k') | test/codegen/expect/sunflower/dom.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698