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

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

Issue 963343002: implement private members, fixes #74 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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/math/math.js ('k') | test/codegen/expect/typed_data/typed_data.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 methods; 1 var methods;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let _c = Symbol('_c');
4 class A extends dart.Object { 5 class A extends dart.Object {
5 A() { 6 A() {
6 this._c = 3; 7 this[_c] = 3;
7 } 8 }
8 x() { 9 x() {
9 return 42; 10 return 42;
10 } 11 }
11 y(a) { 12 y(a) {
12 return a; 13 return a;
13 } 14 }
14 z(b) { 15 z(b) {
15 if (b === void 0) 16 if (b === void 0)
16 b = null; 17 b = null;
(...skipping 10 matching lines...) Expand all
27 } 28 }
28 ww(a, opt$) { 29 ww(a, opt$) {
29 let b = opt$.b === void 0 ? 0 : opt$.b; 30 let b = opt$.b === void 0 ? 0 : opt$.b;
30 return a + b; 31 return a + b;
31 } 32 }
32 get a() { 33 get a() {
33 return this.x(); 34 return this.x();
34 } 35 }
35 set b(b) {} 36 set b(b) {}
36 get c() { 37 get c() {
37 return this._c; 38 return this[_c];
38 } 39 }
39 set c(c) { 40 set c(c) {
40 this._c = c; 41 this[_c] = c;
41 } 42 }
42 } 43 }
43 class Bar extends dart.Object { 44 class Bar extends dart.Object {
44 call(x) { 45 call(x) {
45 return core.print(`hello from ${x}`); 46 return core.print(`hello from ${x}`);
46 } 47 }
47 } 48 }
48 class Foo extends dart.Object { 49 class Foo extends dart.Object {
49 Foo() { 50 Foo() {
50 this.bar = new Bar(); 51 this.bar = new Bar();
51 } 52 }
52 } 53 }
53 // Function test: () → dynamic 54 // Function test: () → dynamic
54 function test() { 55 function test() {
55 let f = new Foo(); 56 let f = new Foo();
56 dart.dinvoke(f, 'bar', "Bar's call method!"); 57 dart.dinvoke(f, 'bar', "Bar's call method!");
57 } 58 }
58 // Exports: 59 // Exports:
59 exports.A = A; 60 exports.A = A;
60 exports.Bar = Bar; 61 exports.Bar = Bar;
61 exports.Foo = Foo; 62 exports.Foo = Foo;
62 exports.test = test; 63 exports.test = test;
63 })(methods || (methods = {})); 64 })(methods || (methods = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/math/math.js ('k') | test/codegen/expect/typed_data/typed_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698