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

Unified Diff: test/codegen/expect/names.js

Issue 1138793002: Tag closures with their types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: More comment fixes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/expect/misc.js ('k') | test/codegen/expect/opassign.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/names.js
diff --git a/test/codegen/expect/names.js b/test/codegen/expect/names.js
index 40710ab76e35c13c0694914ba7981e5f54df0c58..6c024bf560a1b309ee74abd45864d92df4d50d9b 100644
--- a/test/codegen/expect/names.js
+++ b/test/codegen/expect/names.js
@@ -9,10 +9,13 @@ var core = dart.import(core);
return 123;
}
}
- // Function _foo: () → dynamic
+ dart.setSignature(Foo, {
+ methods: () => ({[_foo$]: dart.functionType(dart.dynamic, [])})
+ });
function _foo() {
return 456;
}
+ dart.fn(_foo);
class Frame extends core.Object {
caller(arguments$) {
this.arguments = arguments$;
@@ -22,7 +25,12 @@ var core = dart.import(core);
}
}
dart.defineNamedConstructor(Frame, 'caller');
+ dart.setSignature(Frame, {
+ statics: () => ({callee: dart.functionType(dart.dynamic, [])}),
+ names: ['callee']
+ });
class Frame2 extends core.Object {}
+ dart.setSignature(Frame2, {});
dart.defineLazyProperties(Frame2, {
get caller() {
return 100;
@@ -33,7 +41,6 @@ var core = dart.import(core);
},
set arguments(_) {}
});
- // Function main: () → dynamic
function main() {
core.print(exports.exports);
core.print(new Foo()[_foo$]());
@@ -43,6 +50,7 @@ var core = dart.import(core);
core.print(eval$);
core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments));
}
+ dart.fn(main);
// Exports:
exports.Foo = Foo;
exports.Frame = Frame;
« no previous file with comments | « test/codegen/expect/misc.js ('k') | test/codegen/expect/opassign.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698