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

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

Issue 1152583002: Add constructors to signatures (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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
OLDNEW
1 var names = dart.defineLibrary(names, {}); 1 var names = dart.defineLibrary(names, {});
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 exports.exports = 42; 5 exports.exports = 42;
6 let _foo$ = Symbol('_foo'); 6 let _foo$ = Symbol('_foo');
7 class Foo extends core.Object { 7 class Foo extends core.Object {
8 [_foo$]() { 8 [_foo$]() {
9 return 123; 9 return 123;
10 } 10 }
11 } 11 }
12 dart.setSignature(Foo, { 12 dart.setSignature(Foo, {
13 methods: () => ({[_foo$]: [core.Object, []]}) 13 methods: () => ({[_foo$]: [core.Object, []]})
14 }); 14 });
15 function _foo() { 15 function _foo() {
16 return 456; 16 return 456;
17 } 17 }
18 dart.fn(_foo); 18 dart.fn(_foo);
19 class Frame extends core.Object { 19 class Frame extends core.Object {
20 caller(arguments$) { 20 caller(arguments$) {
21 this.arguments = arguments$; 21 this.arguments = arguments$;
22 } 22 }
23 static callee() { 23 static callee() {
24 return null; 24 return null;
25 } 25 }
26 } 26 }
27 dart.defineNamedConstructor(Frame, 'caller'); 27 dart.defineNamedConstructor(Frame, 'caller');
28 dart.setSignature(Frame, { 28 dart.setSignature(Frame, {
29 constructors: () => ({caller: [Frame, [core.List]]}),
29 statics: () => ({callee: [core.Object, []]}), 30 statics: () => ({callee: [core.Object, []]}),
30 names: ['callee'] 31 names: ['callee']
31 }); 32 });
32 class Frame2 extends core.Object {} 33 class Frame2 extends core.Object {}
33 dart.defineLazyProperties(Frame2, { 34 dart.defineLazyProperties(Frame2, {
34 get caller() { 35 get caller() {
35 return 100; 36 return 100;
36 }, 37 },
37 set caller(_) {}, 38 set caller(_) {},
38 get arguments() { 39 get arguments() {
(...skipping 10 matching lines...) Expand all
49 core.print(eval$); 50 core.print(eval$);
50 core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments)); 51 core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments));
51 } 52 }
52 dart.fn(main); 53 dart.fn(main);
53 // Exports: 54 // Exports:
54 exports.Foo = Foo; 55 exports.Foo = Foo;
55 exports.Frame = Frame; 56 exports.Frame = Frame;
56 exports.Frame2 = Frame2; 57 exports.Frame2 = Frame2;
57 exports.main = main; 58 exports.main = main;
58 })(names, core); 59 })(names, core);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698