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

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

Issue 1069493002: implement opassign, fix bugs in pre/postfix, introduce a let* helper (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/js/template.dart ('k') | test/codegen/expect/map_keys.js.map » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/cascade.js
diff --git a/test/codegen/expect/cascade.js b/test/codegen/expect/cascade.js
index 2e32cc535c5aa360857b231e225c8a3b89ddbb7a..bbbde0b645a20c882bc74d8b7612a650f613b2c5 100644
--- a/test/codegen/expect/cascade.js
+++ b/test/codegen/expect/cascade.js
@@ -13,10 +13,9 @@ var cascade;
core.print("hi");
a = null;
};
- ((_) => {
- dart.dinvoke(_, 'x');
- dart.dinvoke(_, 'x');
- })(a);
+ let _ = a;
+ dart.dinvoke(_, 'x');
+ dart.dinvoke(_, 'x');
core.print(a);
}
// Function test_closure_without_mutate: () → void
@@ -32,43 +31,46 @@ var cascade;
// Function test_mutate_inside_cascade: () → void
function test_mutate_inside_cascade() {
let a = null;
- a = ((_) => {
- _.x = a = null;
- _.x = a = null;
- return _;
- })(new A());
+ let _ = new A();
+ _.x = a = null;
+ _.x = a = null;
+ a = _;
core.print(a);
}
// Function test_mutate_outside_cascade: () → void
function test_mutate_outside_cascade() {
let a = null, b = null;
a = new A();
- dart.dput(a, 'x', b = null);
- dart.dput(a, 'x', b = null);
+ a.x = b = null;
+ a.x = b = null;
a = null;
core.print(a);
}
// Function test_VariableDeclaration_single: () → void
function test_VariableDeclaration_single() {
let a = new core.List.from([]);
- dart.dput(a, 'length', 2);
- a.add(42);
+ a[core.$length] = 2;
+ a[core.$add](42);
core.print(a);
}
// Function test_VariableDeclaration_last: () → void
function test_VariableDeclaration_last() {
- let a = 42, b = new core.List.from([]);
- dart.dput(b, 'length', 2);
- b.add(a);
+ let a = 42, b = (() => {
+ let _ = new core.List.from([]);
+ _[core.$length] = 2;
+ _[core.$add](a);
+ return _;
+ })();
core.print(b);
}
// Function test_VariableDeclaration_first: () → void
function test_VariableDeclaration_first() {
- let a = ((_) => {
+ let a = (() => {
+ let _ = new core.List.from([]);
_[core.$length] = 2;
_[core.$add](3);
return _;
- })(new core.List.from([])), b = 2;
+ })(), b = 2;
core.print(a);
}
let Base$ = dart.generic(function(T) {
« no previous file with comments | « lib/src/js/template.dart ('k') | test/codegen/expect/map_keys.js.map » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698