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

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

Issue 1083763003: refactor emitMemberName to be used more consistently (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
« lib/src/js/nodes.dart ('K') | « test/codegen/expect/names.js ('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 opassign; 1 var opassign;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 dart.copyProperties(exports, { 4 dart.copyProperties(exports, {
5 get index() { 5 get index() {
6 core.print('called "index" getter'); 6 core.print('called "index" getter');
7 return 0; 7 return 0;
8 } 8 }
9 }); 9 });
10 dart.defineLazyProperties(exports, { 10 dart.defineLazyProperties(exports, {
(...skipping 10 matching lines...) Expand all
21 class Foo extends core.Object { 21 class Foo extends core.Object {
22 Foo() { 22 Foo() {
23 this.x = 100; 23 this.x = 100;
24 } 24 }
25 } 25 }
26 // Function main: () → dynamic 26 // Function main: () → dynamic
27 function main() { 27 function main() {
28 let f = dart.map([0, 40]); 28 let f = dart.map([0, 40]);
29 core.print('should only call "index" 2 times:'); 29 core.print('should only call "index" 2 times:');
30 let i = exports.index; 30 let i = exports.index;
31 f.set(i, dart.dbinary(f.get(i), '+', 1)); 31 f.set(i, dart.dsend(f.get(i), '+', 1));
32 forcePostfix((() => { 32 forcePostfix((() => {
33 let i = exports.index, x$ = f.get(i); 33 let i = exports.index, x$ = f.get(i);
34 f.set(i, dart.dbinary(x$, '+', 1)); 34 f.set(i, dart.dsend(x$, '+', 1));
35 return x$; 35 return x$;
36 })()); 36 })());
37 core.print('should only call "foo" 2 times:'); 37 core.print('should only call "foo" 2 times:');
38 let o = exports.foo; 38 let o = exports.foo;
39 dart.dput(o, 'x', dart.dbinary(dart.dload(o, 'x'), '+', 1)); 39 dart.dput(o, 'x', dart.dsend(dart.dload(o, 'x'), '+', 1));
40 forcePostfix((() => { 40 forcePostfix((() => {
41 let o = exports.foo, x$ = dart.dload(o, 'x'); 41 let o = exports.foo, x$ = dart.dload(o, 'x');
42 dart.dput(o, 'x', dart.dbinary(x$, '+', 1)); 42 dart.dput(o, 'x', dart.dsend(x$, '+', 1));
43 return x$; 43 return x$;
44 })()); 44 })());
45 core.print('op assign test, should only call "index" twice:'); 45 core.print('op assign test, should only call "index" twice:');
46 let i = exports.index; 46 let i = exports.index;
47 f.set(i, dart.dbinary(f.get(i), '+', f.get(exports.index))); 47 f.set(i, dart.dsend(f.get(i), '+', f.get(exports.index)));
48 } 48 }
49 // Function forcePostfix: (dynamic) → dynamic 49 // Function forcePostfix: (dynamic) → dynamic
50 function forcePostfix(x) { 50 function forcePostfix(x) {
51 } 51 }
52 // Exports: 52 // Exports:
53 exports.Foo = Foo; 53 exports.Foo = Foo;
54 exports.main = main; 54 exports.main = main;
55 exports.forcePostfix = forcePostfix; 55 exports.forcePostfix = forcePostfix;
56 })(opassign || (opassign = {})); 56 })(opassign || (opassign = {}));
OLDNEW
« lib/src/js/nodes.dart ('K') | « test/codegen/expect/names.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698