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

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

Issue 1757343002: upgrade to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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/node_modules.js ('k') | test/codegen/expect/syncstar_syntax.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 dart_library.library('opassign', null, /* Imports */[ 1 dart_library.library('opassign', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 ], function(exports, dart, core) { 5 ], function(exports, dart, core) {
6 'use strict'; 6 'use strict';
7 let dartx = dart.dartx; 7 let dartx = dart.dartx;
8 dart.copyProperties(exports, { 8 dart.copyProperties(exports, {
9 get index() { 9 get index() {
10 core.print('called "index" getter'); 10 core.print('called "index" getter');
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 }); 24 });
25 class Foo extends core.Object { 25 class Foo extends core.Object {
26 Foo() { 26 Foo() {
27 this.x = 100; 27 this.x = 100;
28 } 28 }
29 } 29 }
30 function main() { 30 function main() {
31 let f = dart.map([0, 40]); 31 let f = dart.map([0, 40]);
32 core.print('should only call "index" 2 times:'); 32 core.print('should only call "index" 2 times:');
33 let i = exports.index; 33 let i = dart.as(exports.index, core.int);
34 f[dartx.set](i, dart.dsend(f[dartx.get](i), '+', 1)); 34 f[dartx.set](i, dart.notNull(f[dartx.get](i)) + 1);
35 forcePostfix((() => { 35 forcePostfix((() => {
36 let i = exports.index, x = f[dartx.get](i); 36 let i = dart.as(exports.index, core.int), x = f[dartx.get](i);
37 f[dartx.set](i, dart.dsend(x, '+', 1)); 37 f[dartx.set](i, dart.notNull(x) + 1);
38 return x; 38 return x;
39 })()); 39 })());
40 core.print('should only call "foo" 2 times:'); 40 core.print('should only call "foo" 2 times:');
41 let o = exports.foo; 41 let o = exports.foo;
42 dart.dput(o, 'x', dart.dsend(dart.dload(o, 'x'), '+', 1)); 42 dart.dput(o, 'x', dart.dsend(dart.dload(o, 'x'), '+', 1));
43 forcePostfix((() => { 43 forcePostfix((() => {
44 let o = exports.foo, x = dart.dload(o, 'x'); 44 let o = exports.foo, x = dart.dload(o, 'x');
45 dart.dput(o, 'x', dart.dsend(x, '+', 1)); 45 dart.dput(o, 'x', dart.dsend(x, '+', 1));
46 return x; 46 return x;
47 })()); 47 })());
48 core.print('op assign test, should only call "index" twice:'); 48 core.print('op assign test, should only call "index" twice:');
49 let i$ = exports.index; 49 let i$ = dart.as(exports.index, core.int);
50 f[dartx.set](i$, dart.dsend(f[dartx.get](i$), '+', f[dartx.get](exports.inde x))); 50 f[dartx.set](i$, dart.notNull(f[dartx.get](i$)) + dart.notNull(f[dartx.get]( exports.index)));
51 } 51 }
52 dart.fn(main); 52 dart.fn(main);
53 function forcePostfix(x) { 53 function forcePostfix(x) {
54 } 54 }
55 dart.fn(forcePostfix); 55 dart.fn(forcePostfix);
56 // Exports: 56 // Exports:
57 exports.Foo = Foo; 57 exports.Foo = Foo;
58 exports.main = main; 58 exports.main = main;
59 exports.forcePostfix = forcePostfix; 59 exports.forcePostfix = forcePostfix;
60 }); 60 });
OLDNEW
« no previous file with comments | « test/codegen/expect/node_modules.js ('k') | test/codegen/expect/syncstar_syntax.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698