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..cc90d0b812e24b70c8a775c15a2f48ef67813ed4 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -2896,14 +2896,11 @@ RawRegExp* RegExp::ReadFrom(SnapshotReader* reader, |
// TODO(18854): Need to implement a way of recreating the irrexp functions. |
rmacnak
2016/11/17 00:49:52
Remove this todo.
Vyacheslav Egorov (Google)
2016/11/17 16:51:33
Done.
|
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; |
erikcorry
2016/11/17 13:56:17
Here and elsewhere you put in a loop. Perhaps ther
Vyacheslav Egorov (Google)
2016/11/17 16:51:33
Yeah, that sounds like a nice improvement - but I
|
+ cid++) { |
+ regex.set_function(cid, /*sticky=*/false, no_function); |
+ regex.set_function(cid, /*sticky=*/true, no_function); |
+ } |
return regex.raw(); |
} |