[vm] Add missing serialization clusters for VM isolate objects.
TEST=ci Change-Id: I738cf1a189accd2e449728bb599b6b92b5797924 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496800 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
18ab2664ca
commit
cd26f5e1cc
@@ -3756,6 +3756,103 @@ class RODataDeserializationCluster
|
||||
};
|
||||
#endif // !DART_COMPRESSED_POINTERS
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
class LocalVarDescriptorsSerializationCluster : public SerializationCluster {
|
||||
public:
|
||||
LocalVarDescriptorsSerializationCluster()
|
||||
: SerializationCluster("LocalVarDescriptors", kLocalVarDescriptorsCid) {}
|
||||
~LocalVarDescriptorsSerializationCluster() {}
|
||||
|
||||
void Trace(Serializer* s, ObjectPtr object) {
|
||||
LocalVarDescriptorsPtr handlers = LocalVarDescriptors::RawCast(object);
|
||||
objects_.Add(handlers);
|
||||
|
||||
const intptr_t length = handlers->untag()->num_entries_;
|
||||
for (intptr_t i = 0; i < length; i++) {
|
||||
s->Push(handlers->untag()->name(i));
|
||||
}
|
||||
}
|
||||
|
||||
void WriteAlloc(Serializer* s) {
|
||||
const intptr_t count = objects_.length();
|
||||
s->WriteUnsigned(count);
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
LocalVarDescriptorsPtr handlers = objects_[i];
|
||||
s->AssignRef(handlers);
|
||||
AutoTraceObject(handlers);
|
||||
const intptr_t length = handlers->untag()->num_entries_;
|
||||
s->WriteUnsigned(length);
|
||||
target_memory_size_ +=
|
||||
compiler::target::LocalVarDescriptors::InstanceSize(length);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteFill(Serializer* s) {
|
||||
const intptr_t count = objects_.length();
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
LocalVarDescriptorsPtr handlers = objects_[i];
|
||||
AutoTraceObject(handlers);
|
||||
const intptr_t length = handlers->untag()->num_entries_;
|
||||
s->WriteUnsigned(length);
|
||||
WriteFromTo(handlers, length);
|
||||
for (intptr_t j = 0; j < length; j++) {
|
||||
UntaggedLocalVarDescriptors::VarInfo& info =
|
||||
handlers->untag()->data()[j];
|
||||
s->Write<int32_t>(info.index_kind);
|
||||
s->WriteTokenPosition(info.declaration_pos);
|
||||
s->WriteTokenPosition(info.begin_pos);
|
||||
s->WriteTokenPosition(info.end_pos);
|
||||
s->Write<int64_t>(info.scope_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
GrowableArray<LocalVarDescriptorsPtr> objects_;
|
||||
};
|
||||
#endif // !DART_PRECOMPILED_RUNTIME
|
||||
|
||||
class LocalVarDescriptorsDeserializationCluster
|
||||
: public DeserializationCluster {
|
||||
public:
|
||||
LocalVarDescriptorsDeserializationCluster()
|
||||
: DeserializationCluster("LocalVarDescriptors") {}
|
||||
~LocalVarDescriptorsDeserializationCluster() {}
|
||||
|
||||
void ReadAlloc(Deserializer* d) override {
|
||||
start_index_ = d->next_index();
|
||||
const intptr_t count = d->ReadUnsigned();
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
const intptr_t length = d->ReadUnsigned();
|
||||
d->AssignRef(d->Allocate(LocalVarDescriptors::InstanceSize(length)));
|
||||
}
|
||||
stop_index_ = d->next_index();
|
||||
}
|
||||
|
||||
void ReadFill(Deserializer* d_) override {
|
||||
Deserializer::Local d(d_);
|
||||
|
||||
ASSERT(!is_canonical()); // Never canonical.
|
||||
for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
|
||||
LocalVarDescriptorsPtr handlers =
|
||||
static_cast<LocalVarDescriptorsPtr>(d.Ref(id));
|
||||
const intptr_t length = d.ReadUnsigned();
|
||||
Deserializer::InitializeHeader(handlers, kLocalVarDescriptorsCid,
|
||||
LocalVarDescriptors::InstanceSize(length));
|
||||
d.ReadFromTo(handlers, length);
|
||||
for (intptr_t j = 0; j < length; j++) {
|
||||
UntaggedLocalVarDescriptors::VarInfo& info =
|
||||
handlers->untag()->data()[j];
|
||||
info.index_kind = d.Read<int32_t>();
|
||||
info.declaration_pos = d.ReadTokenPosition();
|
||||
info.begin_pos = d.ReadTokenPosition();
|
||||
info.end_pos = d.ReadTokenPosition();
|
||||
info.scope_id = d.Read<int64_t>();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
class ExceptionHandlersSerializationCluster : public SerializationCluster {
|
||||
public:
|
||||
@@ -4341,6 +4438,66 @@ class LoadingUnitDeserializationCluster : public DeserializationCluster {
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
class ApiErrorSerializationCluster : public SerializationCluster {
|
||||
public:
|
||||
ApiErrorSerializationCluster()
|
||||
: SerializationCluster("ApiError",
|
||||
kApiErrorCid,
|
||||
compiler::target::ApiError::InstanceSize()) {}
|
||||
~ApiErrorSerializationCluster() {}
|
||||
|
||||
void Trace(Serializer* s, ObjectPtr object) {
|
||||
ApiErrorPtr error = ApiError::RawCast(object);
|
||||
objects_.Add(error);
|
||||
PushFromTo(error);
|
||||
}
|
||||
|
||||
void WriteAlloc(Serializer* s) {
|
||||
const intptr_t count = objects_.length();
|
||||
s->WriteUnsigned(count);
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
ApiErrorPtr error = objects_[i];
|
||||
s->AssignRef(error);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteFill(Serializer* s) {
|
||||
const intptr_t count = objects_.length();
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
ApiErrorPtr error = objects_[i];
|
||||
AutoTraceObject(error);
|
||||
WriteFromTo(error);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
GrowableArray<ApiErrorPtr> objects_;
|
||||
};
|
||||
#endif // !DART_PRECOMPILED_RUNTIME
|
||||
|
||||
class ApiErrorDeserializationCluster : public DeserializationCluster {
|
||||
public:
|
||||
ApiErrorDeserializationCluster() : DeserializationCluster("ApiError") {}
|
||||
~ApiErrorDeserializationCluster() {}
|
||||
|
||||
void ReadAlloc(Deserializer* d) override {
|
||||
ReadAllocFixedSize(d, ApiError::InstanceSize());
|
||||
}
|
||||
|
||||
void ReadFill(Deserializer* d_) override {
|
||||
Deserializer::Local d(d_);
|
||||
|
||||
ASSERT(!is_canonical()); // Never canonical.
|
||||
for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
|
||||
ApiErrorPtr error = static_cast<ApiErrorPtr>(d.Ref(id));
|
||||
Deserializer::InitializeHeader(error, kApiErrorCid,
|
||||
ApiError::InstanceSize());
|
||||
d.ReadFromTo(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
class LanguageErrorSerializationCluster : public SerializationCluster {
|
||||
public:
|
||||
@@ -4471,6 +4628,68 @@ class UnhandledExceptionDeserializationCluster : public DeserializationCluster {
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
class UnwindErrorSerializationCluster : public SerializationCluster {
|
||||
public:
|
||||
UnwindErrorSerializationCluster()
|
||||
: SerializationCluster("UnwindError",
|
||||
kUnwindErrorCid,
|
||||
compiler::target::UnwindError::InstanceSize()) {}
|
||||
~UnwindErrorSerializationCluster() {}
|
||||
|
||||
void Trace(Serializer* s, ObjectPtr object) {
|
||||
UnwindErrorPtr error = UnwindError::RawCast(object);
|
||||
objects_.Add(error);
|
||||
PushFromTo(error);
|
||||
}
|
||||
|
||||
void WriteAlloc(Serializer* s) {
|
||||
const intptr_t count = objects_.length();
|
||||
s->WriteUnsigned(count);
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
UnwindErrorPtr error = objects_[i];
|
||||
s->AssignRef(error);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteFill(Serializer* s) {
|
||||
const intptr_t count = objects_.length();
|
||||
for (intptr_t i = 0; i < count; i++) {
|
||||
UnwindErrorPtr error = objects_[i];
|
||||
AutoTraceObject(error);
|
||||
WriteFromTo(error);
|
||||
s->Write<bool>(error->untag()->is_user_initiated_);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
GrowableArray<UnwindErrorPtr> objects_;
|
||||
};
|
||||
#endif // !DART_PRECOMPILED_RUNTIME
|
||||
|
||||
class UnwindErrorDeserializationCluster : public DeserializationCluster {
|
||||
public:
|
||||
UnwindErrorDeserializationCluster() : DeserializationCluster("UnwindError") {}
|
||||
~UnwindErrorDeserializationCluster() {}
|
||||
|
||||
void ReadAlloc(Deserializer* d) override {
|
||||
ReadAllocFixedSize(d, UnwindError::InstanceSize());
|
||||
}
|
||||
|
||||
void ReadFill(Deserializer* d_) override {
|
||||
Deserializer::Local d(d_);
|
||||
|
||||
ASSERT(!is_canonical()); // Never canonical.
|
||||
for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
|
||||
UnwindErrorPtr error = static_cast<UnwindErrorPtr>(d.Ref(id));
|
||||
Deserializer::InitializeHeader(error, kUnwindErrorCid,
|
||||
UnwindError::InstanceSize());
|
||||
d.ReadFromTo(error);
|
||||
error->untag()->is_user_initiated_ = d.Read<bool>();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
class InstanceSerializationCluster : public SerializationCluster {
|
||||
public:
|
||||
@@ -8058,10 +8277,14 @@ SerializationCluster* Serializer::NewClusterForClass(intptr_t cid,
|
||||
return new (Z) SubtypeTestCacheSerializationCluster();
|
||||
case kLoadingUnitCid:
|
||||
return new (Z) LoadingUnitSerializationCluster();
|
||||
case kApiErrorCid:
|
||||
return new (Z) ApiErrorSerializationCluster();
|
||||
case kLanguageErrorCid:
|
||||
return new (Z) LanguageErrorSerializationCluster();
|
||||
case kUnhandledExceptionCid:
|
||||
return new (Z) UnhandledExceptionSerializationCluster();
|
||||
case kUnwindErrorCid:
|
||||
return new (Z) UnwindErrorSerializationCluster();
|
||||
case kLibraryPrefixCid:
|
||||
return new (Z) LibraryPrefixSerializationCluster();
|
||||
case kTypeCid:
|
||||
@@ -9270,6 +9493,10 @@ DeserializationCluster* Deserializer::ReadCluster() {
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
return new (Z) CompressedStackMapsDeserializationCluster();
|
||||
case kLocalVarDescriptorsCid:
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
return new (Z) LocalVarDescriptorsDeserializationCluster();
|
||||
case kExceptionHandlersCid:
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
@@ -9302,6 +9529,10 @@ DeserializationCluster* Deserializer::ReadCluster() {
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
return new (Z) LoadingUnitDeserializationCluster();
|
||||
case kApiErrorCid:
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
return new (Z) ApiErrorDeserializationCluster();
|
||||
case kLanguageErrorCid:
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
@@ -9310,6 +9541,10 @@ DeserializationCluster* Deserializer::ReadCluster() {
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
return new (Z) UnhandledExceptionDeserializationCluster();
|
||||
case kUnwindErrorCid:
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
return new (Z) UnwindErrorDeserializationCluster();
|
||||
case kLibraryPrefixCid:
|
||||
ASSERT(!is_canonical);
|
||||
ASSERT(!is_deeply_immutable);
|
||||
|
||||
@@ -1038,10 +1038,6 @@ word String::InstanceSize(word payload_size) {
|
||||
return RoundedAllocationSize(String::InstanceSize() + payload_size);
|
||||
}
|
||||
|
||||
word LocalVarDescriptors::InstanceSize() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
word Integer::NextFieldOffset() {
|
||||
return TranslateOffsetInWords(dart::Integer::NextFieldOffset());
|
||||
}
|
||||
|
||||
@@ -916,6 +916,8 @@ class CompressedStackMaps : public AllStatic {
|
||||
|
||||
class LocalVarDescriptors : public AllStatic {
|
||||
public:
|
||||
static word element_offset(intptr_t index);
|
||||
static word InstanceSize(intptr_t length);
|
||||
static word InstanceSize();
|
||||
FINAL_CLASS();
|
||||
};
|
||||
|
||||
@@ -41,6 +41,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -805,6 +809,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -1580,6 +1588,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -2343,6 +2355,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -3121,6 +3137,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -3893,6 +3913,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -4666,6 +4690,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -5431,6 +5459,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -6204,6 +6236,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -6960,6 +6996,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -7727,6 +7767,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -8482,6 +8526,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -9252,6 +9300,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -10016,6 +10068,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -10781,6 +10837,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -11538,6 +11598,10 @@ static constexpr dart::compiler::target::word Context_element_size = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word LocalVarDescriptors_element_size =
|
||||
0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word ExceptionHandlers_element_size =
|
||||
@@ -12306,6 +12370,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -13155,6 +13223,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -14015,6 +14087,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -14871,6 +14947,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -15727,6 +15807,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -16585,6 +16669,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -17435,6 +17523,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -18287,6 +18379,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -19127,6 +19223,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -19978,6 +20078,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -20825,6 +20929,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -21672,6 +21780,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -22521,6 +22633,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x28;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0xc;
|
||||
static constexpr dart::compiler::target::word
|
||||
@@ -23362,6 +23478,10 @@ static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
0x50;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_elements_start_offset = 0x10;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_LocalVarDescriptors_element_size = 0x1c;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExceptionHandlers_elements_start_offset = 0x18;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
ARRAY(Code, element_offset) \
|
||||
ARRAY(Context, variable_offset) \
|
||||
ARRAY(ContextScope, element_offset) \
|
||||
ARRAY(LocalVarDescriptors, element_offset) \
|
||||
ARRAY(ExceptionHandlers, element_offset) \
|
||||
ARRAY(ObjectPool, element_offset) \
|
||||
ARRAY(OneByteString, element_offset) \
|
||||
@@ -76,6 +77,7 @@
|
||||
ARRAY_SIZEOF(Code, InstanceSize, element_offset) \
|
||||
ARRAY_SIZEOF(Context, InstanceSize, variable_offset) \
|
||||
ARRAY_SIZEOF(ContextScope, InstanceSize, element_offset) \
|
||||
ARRAY_SIZEOF(LocalVarDescriptors, InstanceSize, element_offset) \
|
||||
ARRAY_SIZEOF(ExceptionHandlers, InstanceSize, element_offset) \
|
||||
ARRAY_SIZEOF(ObjectPool, InstanceSize, element_offset) \
|
||||
ARRAY_SIZEOF(OneByteString, InstanceSize, element_offset) \
|
||||
|
||||
@@ -1111,6 +1111,7 @@ void Object::Init(IsolateGroup* isolate_group) {
|
||||
static_cast<TypeArgumentsPtr>(address + kHeapObjectTag));
|
||||
Roots::empty_type_arguments().untag()->set_length(Smi::New(0));
|
||||
Roots::empty_type_arguments().untag()->set_hash(Smi::New(0));
|
||||
Roots::empty_type_arguments().untag()->set_nullability(Smi::New(0));
|
||||
Roots::empty_type_arguments().ComputeHash();
|
||||
Roots::empty_type_arguments().SetCanonical();
|
||||
}
|
||||
|
||||
+11
-5
@@ -6203,10 +6203,18 @@ class LocalVarDescriptors : public Object {
|
||||
UntaggedLocalVarDescriptors::VarInfo* info) const;
|
||||
|
||||
static constexpr intptr_t kBytesPerElement =
|
||||
sizeof(UntaggedLocalVarDescriptors::VarInfo);
|
||||
sizeof(UntaggedLocalVarDescriptors::VarInfo) +
|
||||
sizeof(CompressedStringPtr);
|
||||
static constexpr intptr_t kMaxElements =
|
||||
UntaggedLocalVarDescriptors::VarInfo::kMaxIndex;
|
||||
|
||||
struct ArrayTraits {
|
||||
static intptr_t elements_start_offset() {
|
||||
return sizeof(UntaggedLocalVarDescriptors);
|
||||
}
|
||||
static constexpr intptr_t kElementSize = kBytesPerElement;
|
||||
};
|
||||
|
||||
static intptr_t InstanceSize() {
|
||||
ASSERT(sizeof(UntaggedLocalVarDescriptors) ==
|
||||
OFFSET_OF_RETURNED_VALUE(UntaggedLocalVarDescriptors, names));
|
||||
@@ -6214,10 +6222,8 @@ class LocalVarDescriptors : public Object {
|
||||
}
|
||||
static intptr_t InstanceSize(intptr_t len) {
|
||||
ASSERT(0 <= len && len <= kMaxElements);
|
||||
return RoundedAllocationSize(
|
||||
sizeof(UntaggedLocalVarDescriptors) +
|
||||
(len * kWordSize) // RawStrings for names.
|
||||
+ (len * sizeof(UntaggedLocalVarDescriptors::VarInfo)));
|
||||
return RoundedAllocationSize(sizeof(UntaggedLocalVarDescriptors) +
|
||||
len * kBytesPerElement);
|
||||
}
|
||||
|
||||
static LocalVarDescriptorsPtr New(intptr_t num_variables);
|
||||
|
||||
@@ -2556,6 +2556,10 @@ class UntaggedLocalVarDescriptors : public UntaggedObject {
|
||||
return reinterpret_cast<VarInfo*>(nameAddrAt(num_entries_));
|
||||
}
|
||||
|
||||
CompressedObjectPtr* to_snapshot(Snapshot::Kind kind, intptr_t num_entries) {
|
||||
return to(num_entries);
|
||||
}
|
||||
|
||||
friend class Object;
|
||||
};
|
||||
|
||||
@@ -2831,6 +2835,7 @@ class UntaggedApiError : public UntaggedError {
|
||||
COMPRESSED_POINTER_FIELD(StringPtr, message)
|
||||
VISIT_FROM(message)
|
||||
VISIT_TO(message)
|
||||
CompressedObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
|
||||
};
|
||||
|
||||
class UntaggedLanguageError : public UntaggedError {
|
||||
@@ -2867,6 +2872,7 @@ class UntaggedUnwindError : public UntaggedError {
|
||||
VISIT_FROM(message)
|
||||
VISIT_TO(message)
|
||||
bool is_user_initiated_;
|
||||
CompressedObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
|
||||
};
|
||||
|
||||
class UntaggedInstance : public UntaggedObject {
|
||||
|
||||
Reference in New Issue
Block a user