1f9d59c807
General approach: Find all scopes for an offset, then pick "the right one". This still leaves a few offsets where we can't pick 1 scope in the (non-outline) dills in the out directory though. More thorough testing will follow. TEST=ci Change-Id: I66448498e07aa03f720733bcaf167bbfa30bca2f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338840 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com>
35 lines
2.4 KiB
Plaintext
35 lines
2.4 KiB
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
[217]static method method([229] core::List<dynamic> list) → dynamic {
|
|
[239] {
|
|
[249] [249] hoisted dynamic a;
|
|
[252] [252] hoisted dynamic b;
|
|
[244] {
|
|
[257] [257] final synthesized core::List<dynamic> #0#0 = [257] [257] list;
|
|
[244] if([248] [248] → core::bool} [-1] [-1] #C1 && [249]([249] let [249] final dynamic #t1 = [249] [249] a = [248] [248] [-1] [-1] #0#0.{core::List::[]}[248]([248] 0){(core::int) → dynamic} in [-1] [-1] true) && [252]([252] let [252] final dynamic #t2 = [252] [252] b = [248] [248] [-1] [-1] #0#0.{core::List::[]}[248]([248] 1){(core::int) → dynamic} in [-1] [-1] true)))
|
|
[244] [244] [244] throw [244] [244] new core::StateError::• [244]([244] "Pattern matching error");
|
|
}
|
|
[249] [249] final dynamic #t3 = [249] [249] a;
|
|
[252] [252] final dynamic #t4 = [252] [252] b;
|
|
[239] for ([249] dynamic a = [249] [249] #t3, [252] dynamic b = [252] [252] #t4; [265] [265] [265] [265] [263] [263] a{dynamic}.< [265]([267] 10) as{TypeError,ForDynamic} core::bool; [271] [271] a = [272] [272] [271] [271] a{dynamic}.+ [272]([272] 1)) {
|
|
[282] [282] [282] core::print [287]([296] "${[290] [290] a}, ${[294] [294] b}");
|
|
}
|
|
}
|
|
[305] for ([305] final dynamic #t5 in [324] [324] list) {
|
|
[315] [315] hoisted dynamic a;
|
|
[318] [318] hoisted dynamic b;
|
|
[321] {
|
|
[-1] [-1] final synthesized dynamic #1#0 = [-1] [-1] #t5;
|
|
[321] if([314] [314] → core::bool} [-1] [-1] #C1 && [315]([315] let [315] final dynamic #t6 = [315] [315] a = [314] [314] [-1] [-1] #1#0{core::List<dynamic>}.{core::List::[]}[314]([314] 0){(core::int) → dynamic} in [-1] [-1] true) && [318]([318] let [318] final dynamic #t7 = [318] [318] b = [314] [314] [-1] [-1] #1#0{core::List<dynamic>}.{core::List::[]}[314]([314] 1){(core::int) → dynamic} in [-1] [-1] true)))
|
|
[321] [321] [321] throw [321] [321] new core::StateError::• [321]([321] "Pattern matching error");
|
|
}
|
|
[336] [336] [336] core::print [341]([350] "${[344] [344] a}, ${[348] [348] b}");
|
|
}
|
|
}
|
|
|
|
constants {
|
|
#C1 = 2
|
|
}
|