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

Unified Diff: pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect

Issue 2995083002: [kernel] Fix bug with redirecting constructors in closure conversion. (Closed)
Patch Set: Created 3 years, 4 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
Index: pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect
diff --git a/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect b/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect
index a7e1b28ebf9a9abab2d95310385f2125077a0105..145e647188f90bdfb3c49456805e39d5687c0330 100644
--- a/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect
+++ b/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect
@@ -12,6 +12,21 @@ class A extends core::Object {
constructor •(self::X x) → void
: self::A::x = x, super core::Object::•() {}
}
+class B extends core::Object {
Dmitry Stefantsov 2017/08/16 13:15:00 As I understand it, the redirecting technique is n
sjindel 2017/08/16 13:28:56 It's technically not needed, but the analysis is n
Dmitry Stefantsov 2017/08/17 12:59:08 Ok. At the first glance, based on the CL descript
sjindel 2017/08/17 15:46:04 This CL is address the correct issue, not the inef
+ field self::X x;
+ constructor •(self::X x) → void
+ : final Vector #context = MakeVector(2), this self::B::#redir(x, #context)
+ ;
+ constructor #redir(self::X x, final Vector #context) → void
+ : dynamic #t1 = #context[1] = x, self::B::x = #context[1], super core::Object::•() {
+ final () → dynamic fn = MakeClosure<() → dynamic>(self::closure#B#function#fn, #context);
+ fn.call();
+ }
+}
static method main() → dynamic {
self::A a = new self::A::•(new self::X::•());
+ self::B b = new self::B::•(new self::X::•());
+}
+static method closure#B#function#fn(Vector #contextParameter) → dynamic {
+ core::print(#contextParameter[1]);
}

Powered by Google App Engine
This is Rietveld 408576698