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

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

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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
OLDNEW
1 dart_library.library('names', null, /* Imports */[ 1 dart_library.library('names', null, /* Imports */[
2 'dart/_runtime', 2 'dart_sdk'
3 'dart/core' 3 ], function(exports, dart_sdk) {
4 ], /* Lazy imports */[
5 ], function(exports, dart, core) {
6 'use strict'; 4 'use strict';
7 let dartx = dart.dartx; 5 const core = dart_sdk.core;
8 exports.exports = 42; 6 const dart = dart_sdk.dart;
9 const _foo$ = Symbol('_foo'); 7 const dartx = dart_sdk.dartx;
10 class Foo extends core.Object { 8 const names = Object.create(null);
11 [_foo$]() { 9 names.exports = 42;
10 const _foo = Symbol('_foo');
11 names.Foo = class Foo extends core.Object {
12 [_foo]() {
12 return 123; 13 return 123;
13 } 14 }
14 } 15 };
15 dart.setSignature(Foo, { 16 dart.setSignature(names.Foo, {
16 methods: () => ({[_foo$]: [dart.dynamic, []]}) 17 methods: () => ({[_foo]: [dart.dynamic, []]})
17 }); 18 });
18 function _foo() { 19 names._foo = function() {
19 return 456; 20 return 456;
20 } 21 };
21 dart.fn(_foo); 22 dart.fn(names._foo);
22 class Frame extends core.Object { 23 names.Frame = class Frame extends core.Object {
23 caller(arguments$) { 24 caller(arguments$) {
24 this.arguments = arguments$; 25 this.arguments = arguments$;
25 } 26 }
26 static callee() { 27 static callee() {
27 return null; 28 return null;
28 } 29 }
29 } 30 };
30 dart.defineNamedConstructor(Frame, 'caller'); 31 dart.defineNamedConstructor(names.Frame, 'caller');
31 dart.setSignature(Frame, { 32 dart.setSignature(names.Frame, {
32 constructors: () => ({caller: [Frame, [core.List]]}), 33 constructors: () => ({caller: [names.Frame, [core.List]]}),
33 statics: () => ({callee: [dart.dynamic, []]}), 34 statics: () => ({callee: [dart.dynamic, []]}),
34 names: ['callee'] 35 names: ['callee']
35 }); 36 });
36 class Frame2 extends core.Object {} 37 names.Frame2 = class Frame2 extends core.Object {};
37 dart.defineLazyProperties(Frame2, { 38 dart.defineLazy(names.Frame2, {
38 get caller() { 39 get caller() {
39 return 100; 40 return 100;
40 }, 41 },
41 set caller(_) {}, 42 set caller(_) {},
42 get arguments() { 43 get arguments() {
43 return 200; 44 return 200;
44 }, 45 },
45 set arguments(_) {} 46 set arguments(_) {}
46 }); 47 });
47 function main() { 48 names.main = function() {
48 core.print(exports.exports); 49 core.print(names.exports);
49 core.print(new Foo()[_foo$]()); 50 core.print(new names.Foo()[_foo]());
50 core.print(_foo()); 51 core.print(names._foo());
51 core.print(new Frame.caller(dart.list([1, 2, 3], core.int))); 52 core.print(new names.Frame.caller(dart.list([1, 2, 3], core.int)));
52 let eval$ = Frame.callee; 53 let eval$ = names.Frame.callee;
53 core.print(eval$); 54 core.print(eval$);
54 core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments)); 55 core.print(dart.notNull(names.Frame2.caller) + dart.notNull(names.Frame2.arg uments));
55 } 56 };
56 dart.fn(main); 57 dart.fn(names.main);
57 // Exports: 58 // Exports:
58 exports.Foo = Foo; 59 exports.names = names;
59 exports.Frame = Frame;
60 exports.Frame2 = Frame2;
61 exports.main = main;
62 }); 60 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698