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

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

Issue 1630963003: Use a symbol for static length/name (conflicts with Function properties in ES5: cannot redefine Fun… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: left todo Created 4 years, 11 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/closure.js ('k') | no next file » | 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 ebe11deb99802745b52653c33ce1dabd1d6073ce..f3a06082de799502db0c3f16ca29313e23f88886 100644
--- a/test/codegen/expect/names.js
+++ b/test/codegen/expect/names.js
@@ -20,40 +20,45 @@ dart_library.library('names', null, /* Imports */[
}
dart.fn(_foo);
class Frame extends core.Object {
- caller(arguments$) {
+ [dartx.caller](arguments$) {
this.arguments = arguments$;
}
- static callee() {
+ static [dartx.callee]() {
return null;
}
}
- dart.defineNamedConstructor(Frame, 'caller');
+ dart.defineNamedConstructor(Frame, dartx.caller);
dart.setSignature(Frame, {
- constructors: () => ({caller: [Frame, [core.List]]}),
- statics: () => ({callee: [dart.dynamic, []]}),
- names: ['callee']
+ constructors: () => ({[dartx.caller]: [Frame, [core.List]]}),
+ statics: () => ({[dartx.callee]: [dart.dynamic, []]}),
+ names: [dartx.callee]
});
class Frame2 extends core.Object {}
dart.defineLazyProperties(Frame2, {
- get caller() {
+ get [dartx.caller]() {
return 100;
},
- set caller(_) {},
- get arguments() {
+ set [dartx.caller](_) {},
+ get [dartx.arguments]() {
return 200;
},
- set arguments(_) {}
+ set [dartx.arguments](_) {}
});
function main() {
core.print(exports.exports);
core.print(new Foo()[_foo$]());
core.print(_foo());
- core.print(new Frame.caller([1, 2, 3]));
- let eval$ = Frame.callee;
+ core.print(new Frame[dartx.caller]([1, 2, 3]));
+ let eval$ = Frame[dartx.callee];
core.print(eval$);
- core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments));
+ core.print(dart.notNull(Frame2[dartx.caller]) + dart.notNull(Frame2[dartx.arguments]));
}
dart.fn(main);
+ dart.defineExtensionNames([
+ "caller",
+ "callee",
+ "arguments"
+ ]);
// Exports:
exports.Foo = Foo;
exports.Frame = Frame;
« no previous file with comments | « test/codegen/expect/closure.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698