Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2979763002: [VM generic function types] Properly set the scope function after parsing a (Closed)
Patch Set: work in progress Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index a5346975c0b9972b38066db3c30421f50ddb3e45..c9059132e8a6f099ceed892f5f8d130e155e23bc 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -1599,9 +1599,10 @@ class CodeSerializationCluster : public SerializationCluster {
FATAL("Cannot serialize code with embedded pointers");
}
if (kind == Snapshot::kFullAOT) {
- // No disabled code in precompilation.
- NOT_IN_PRECOMPILED(ASSERT(code->ptr()->instructions_ ==
- code->ptr()->active_instructions_));
+ if (code->ptr()->instructions_ != code->ptr()->active_instructions_) {
+ // TODO(rmacnak): Fix references to disabled code before serializing.
+ // s->UnexpectedObject(code, "Disabled code");
+ }
siva 2017/07/18 23:52:25 the empty if statement seems like a NOP, do we nee
regis 2017/07/18 23:59:07 True. We could remove the 'kind' local as well, bu
rmacnak 2017/07/19 19:56:39 Please leave the commented out code.
regis 2017/07/19 20:14:23 Acknowledged.
}
RawInstructions* instr = code->ptr()->instructions_;
@@ -4727,12 +4728,18 @@ void Serializer::Trace(RawObject* object) {
void Serializer::UnexpectedObject(RawObject* raw_object, const char* message) {
+ // Exit the no safepoint scope so we can allocate while printing.
+ while (thread()->no_safepoint_scope_depth() > 0) {
+ thread()->DecrementNoSafepointScopeDepth();
+ }
Object& object = Object::Handle(raw_object);
- OS::PrintErr("Unexpected object (%s): %s\n", message, object.ToCString());
+ OS::PrintErr("Unexpected object (%s): 0x%" Px " %s\n", message,
+ reinterpret_cast<uword>(object.raw()), object.ToCString());
#if defined(SNAPSHOT_BACKTRACE)
while (!object.IsNull()) {
object = ParentOf(object);
- OS::PrintErr("referenced by %s\n", object.ToCString());
+ OS::PrintErr("referenced by 0x%" Px " %s\n",
+ reinterpret_cast<uword>(object.raw()), object.ToCString());
}
#endif
OS::Abort();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698