Skip to content

Commit

Permalink
[vm] Account for pool entries that are immediate objects.
Browse files Browse the repository at this point in the history
Cf. 4c82eb5

TEST=gallery
Bug: flutter/gallery#545
Change-Id: I90935aba3737f7b6873368e5a8ebf1cc48d34a22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250320
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
  • Loading branch information
rmacnak-google authored and Commit Bot committed Jun 30, 2022
1 parent 90da09e commit 7004b18
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions runtime/vm/app_snapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1988,14 +1988,12 @@ class CodeSerializationCluster : public SerializationCluster {
// indirectly by passing the field to the runtime. A const closure
// is a call target because its function may be called indirectly
// via a closure call.
if (!only_call_targets || target->IsCode() || target->IsFunction() ||
target->IsField() || target->IsClosure()) {
intptr_t cid = target->GetClassIdMayBeSmi();
if (!only_call_targets || (cid == kCodeCid) || (cid == kFunctionCid) ||
(cid == kFieldCid) || (cid == kClosureCid)) {
s->Push(target);
} else {
intptr_t cid = target->GetClassIdMayBeSmi();
if (cid >= kNumPredefinedCids) {
s->Push(s->isolate_group()->class_table()->At(cid));
}
} else if (cid >= kNumPredefinedCids) {
s->Push(s->isolate_group()->class_table()->At(cid));
}
}
}
Expand Down

0 comments on commit 7004b18

Please sign in to comment.