| Index: runtime/vm/raw_object_snapshot.cc
|
| diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
|
| index d02909c40cd87194a6527e2618c9295b151e3267..07f6dc8828063e23f9981392047c4afe92997d24 100644
|
| --- a/runtime/vm/raw_object_snapshot.cc
|
| +++ b/runtime/vm/raw_object_snapshot.cc
|
| @@ -1576,9 +1576,13 @@ RawObjectPool* ObjectPool::ReadFrom(SnapshotReader* reader,
|
| break;
|
| }
|
| case ObjectPool::kNativeEntry: {
|
| +#if !defined(TARGET_ARCH_DBC)
|
| // Read nothing. Initialize with the lazy link entry.
|
| uword new_entry = NativeEntry::LinkNativeCallEntry();
|
| result->SetRawValueAt(i, static_cast<intptr_t>(new_entry));
|
| +#else
|
| + UNREACHABLE(); // DBC does not support lazy native call linking.
|
| +#endif
|
| break;
|
| }
|
| default:
|
| @@ -1628,14 +1632,16 @@ void RawObjectPool::WriteTo(SnapshotWriter* writer,
|
| Entry& entry = ptr()->data()[i];
|
| switch (entry_type) {
|
| case ObjectPool::kTaggedObject: {
|
| +#if !defined(TARGET_ARCH_DBC)
|
| if (entry.raw_obj_ == StubCode::CallNativeCFunction_entry()->code()) {
|
| // Natives can run while precompiling, becoming linked and switching
|
| // their stub. Reset to the initial stub used for lazy-linking.
|
| writer->WriteObjectImpl(
|
| StubCode::CallBootstrapCFunction_entry()->code(), kAsReference);
|
| - } else {
|
| - writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
|
| + break;
|
| }
|
| +#endif
|
| + writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
|
| break;
|
| }
|
| case ObjectPool::kImmediate: {
|
| @@ -1644,6 +1650,9 @@ void RawObjectPool::WriteTo(SnapshotWriter* writer,
|
| }
|
| case ObjectPool::kNativeEntry: {
|
| // Write nothing. Will initialize with the lazy link entry.
|
| +#if defined(TARGET_ARCH_DBC)
|
| + UNREACHABLE(); // DBC does not support lazy native call linking.
|
| +#endif
|
| break;
|
| }
|
| default:
|
|
|