[ VM / AOT ] Return false from Function::is_optimizable() rather than calling UNREACHABLE()

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

TEST=Manual testing

Change-Id: Icc6df5dc82e1a8d1977b7b49af0215330554279f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271043
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi
2022-11-21 18:39:38 +00:00
committed by Commit Queue
parent ef4f5a3470
commit 50aae78e4e
+1 -1
View File
@@ -3886,7 +3886,7 @@ class Function : public Object {
// which have been de-optimized too many times.
bool is_optimizable() const {
#if defined(DART_PRECOMPILED_RUNTIME)
UNREACHABLE();
return false;
#else
return untag()->packed_fields_.Read<UntaggedFunction::PackedOptimizable>();
#endif