[vm/compiler] Prune SSA during construction using liveness

Only insert Phi at JoinEntry and Parameter at CatchBlockEntry if
corresponding variable is alive into the block. This keeps insertion
consistent with environment pruning logic employed by RenameRecursive:
which prunes dead variables out environments when entering the block
based on contents of the live_in set.

Previously we would insert Parameter instructions for dead variables
which lead to an incorrect (unsound) set of catch entry moves
generated by the backend due to an inconsistency between Parameter
insertion and environment pruning logic and the fact that
catch entry moves generator would simply ignore all moves if the
source of the move was an optimized_out (aka constant_dead) marker.

The following situation was possible: if the variable was assigned
inside the try and partially alive inside of it (e.g. we had
blocks where it was alive and blocks where it was not) then we
would end up inserting Parameter for it, but some of the exceptional
edges (corresponding to blocks where the variable was dead) would
carry optimized_out value into that Parameter. However
`CatchEntryMoveFor` would not record these moves leading to
uninitialized garbage arriving on those exceptional edges instead.

Note that Phis were not susceptible to the same issue as Parameters
because regalloc / backend would not treat optimized_out value
specially.

This change converts silent treatment of optimized_out in the
catch entry moves generation into a release assert instead.

Reviewing other uses of constant_dead in the compiler revealed
a bug in canonicalization rule for `o.runtimeType` which
did not take exceptional edges into account. We add a
regression test for that and fix that issue as well.

Fixes https://github.com/dart-lang/sdk/issues/59822

TEST=vm/dart/regress_59822,vm/dart/regress_runtime_type_in_trycatch

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try
Change-Id: I8dc397cb98d84048a1791b9dd6baa7586a2688c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403583
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>

https://dart.googlesource.com/sdk/+/4bcd8c2b8ce56756dbe7dd762af7f9322a777402
diff --git a/DEPS b/DEPS
index ba67f38..1a5ae6d 100644
--- a/DEPS
+++ b/DEPS
@@ -237,7 +237,7 @@
 ]
 
 deps = {
-  'flutter/engine/src/flutter/third_party/dart': Var('dart_git') + '/sdk' + '@' + 'c95568aede3f26fda36b58b081ec697a74960815',
+  'flutter/engine/src/flutter/third_party/dart': Var('dart_git') + '/sdk' + '@' + '4bcd8c2b8ce56756dbe7dd762af7f9322a777402',
 
   'flutter': Var('flutter_git') + '/mirrors/flutter' + '@' + '3297454732841b1a5a25d9f35f1fd5d7a4479e12',
 
diff --git a/commits.json b/commits.json
index 8bad8b7..d5d03b9 100644
--- a/commits.json
+++ b/commits.json
@@ -1,4 +1,4 @@
 {
   "flutter":"3297454732841b1a5a25d9f35f1fd5d7a4479e12",
-  "flutter/engine/src/flutter/third_party/dart":"c95568aede3f26fda36b58b081ec697a74960815"
+  "flutter/engine/src/flutter/third_party/dart":"4bcd8c2b8ce56756dbe7dd762af7f9322a777402"
 }
\ No newline at end of file