| Index: runtime/vm/raw_object_snapshot.cc
|
| diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
|
| index aebda455c32d238e3cc9740d2de013af9e600db3..2177722230db715feafb2e2f8ed329996f050abd 100644
|
| --- a/runtime/vm/raw_object_snapshot.cc
|
| +++ b/runtime/vm/raw_object_snapshot.cc
|
| @@ -2894,16 +2894,12 @@ RawRegExp* RegExp::ReadFrom(SnapshotReader* reader,
|
| reader->Read<int32_t>());
|
| regex.StoreNonPointer(®ex.raw_ptr()->type_flags_, reader->Read<int8_t>());
|
|
|
| - // TODO(18854): Need to implement a way of recreating the irrexp functions.
|
| const Function& no_function = Function::Handle(reader->zone());
|
| - regex.set_function(kOneByteStringCid, no_function);
|
| - regex.set_function(kTwoByteStringCid, no_function);
|
| - regex.set_function(kExternalOneByteStringCid, no_function);
|
| - regex.set_function(kExternalTwoByteStringCid, no_function);
|
| -
|
| - const TypedData& no_bytecode = TypedData::Handle(reader->zone());
|
| - regex.set_bytecode(true, no_bytecode);
|
| - regex.set_bytecode(false, no_bytecode);
|
| + for (intptr_t cid = kOneByteStringCid; cid <= kExternalTwoByteStringCid;
|
| + cid++) {
|
| + regex.set_function(cid, /*sticky=*/false, no_function);
|
| + regex.set_function(cid, /*sticky=*/true, no_function);
|
| + }
|
|
|
| return regex.raw();
|
| }
|
|
|