mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[vm] Switch Context to compressed pointers.
TEST=ci Change-Id: I2511dcc9234dbe29dcbc3abf3db7a8a080dc5436 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213112 Reviewed-by: Liam Appelbe <liama@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
703dad5685
commit
179c96cd60
|
@ -2920,10 +2920,10 @@ class ContextSerializationCluster : public SerializationCluster {
|
|||
ContextPtr context = Context::RawCast(object);
|
||||
objects_.Add(context);
|
||||
|
||||
s->Push(context->untag()->parent_);
|
||||
s->Push(context->untag()->parent());
|
||||
const intptr_t length = context->untag()->num_variables_;
|
||||
for (intptr_t i = 0; i < length; i++) {
|
||||
s->Push(context->untag()->data()[i]);
|
||||
s->Push(context->untag()->element(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2947,9 +2947,9 @@ class ContextSerializationCluster : public SerializationCluster {
|
|||
AutoTraceObject(context);
|
||||
const intptr_t length = context->untag()->num_variables_;
|
||||
s->WriteUnsigned(length);
|
||||
WriteField(context, parent_);
|
||||
WriteField(context, parent());
|
||||
for (intptr_t j = 0; j < length; j++) {
|
||||
s->WriteElementRef(context->untag()->data()[j], j);
|
||||
s->WriteElementRef(context->untag()->element(j), j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1003,6 +1003,7 @@ namespace compiler {
|
|||
namespace target {
|
||||
|
||||
const word Array::kMaxElements = Array_kMaxElements;
|
||||
const word Context::kMaxElements = Context_kMaxElements;
|
||||
|
||||
} // namespace target
|
||||
} // namespace compiler
|
||||
|
|
|
@ -1324,6 +1324,8 @@ class Context : public AllStatic {
|
|||
static word InstanceSize(intptr_t length);
|
||||
static word InstanceSize();
|
||||
FINAL_CLASS();
|
||||
|
||||
static const word kMaxElements;
|
||||
};
|
||||
|
||||
class Closure : public AllStatic {
|
||||
|
|
|
@ -58,6 +58,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65533;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 0;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -605,6 +606,8 @@ static constexpr dart::compiler::target::word Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -1160,6 +1163,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65533;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 6;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -1704,6 +1708,8 @@ static constexpr dart::compiler::target::word Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -2232,8 +2238,8 @@ static constexpr dart::compiler::target::word ClassTable_element_size = 1;
|
|||
static constexpr dart::compiler::target::word Code_elements_start_offset = 176;
|
||||
static constexpr dart::compiler::target::word Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word Context_elements_start_offset =
|
||||
24;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 8;
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 32;
|
||||
|
@ -2260,6 +2266,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -2342,7 +2349,7 @@ static constexpr dart::compiler::target::word Code_saved_instructions_offset =
|
|||
48;
|
||||
static constexpr dart::compiler::target::word Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -2696,7 +2703,7 @@ static constexpr dart::compiler::target::word ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -2786,8 +2793,8 @@ static constexpr dart::compiler::target::word ClassTable_element_size = 1;
|
|||
static constexpr dart::compiler::target::word Code_elements_start_offset = 176;
|
||||
static constexpr dart::compiler::target::word Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word Context_elements_start_offset =
|
||||
24;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 8;
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 32;
|
||||
|
@ -2814,6 +2821,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -2896,7 +2904,7 @@ static constexpr dart::compiler::target::word Code_saved_instructions_offset =
|
|||
48;
|
||||
static constexpr dart::compiler::target::word Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -3251,7 +3259,7 @@ static constexpr dart::compiler::target::word ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -3368,6 +3376,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65533;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 0;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -3909,6 +3918,8 @@ static constexpr dart::compiler::target::word Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -4458,6 +4469,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65533;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 6;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -4996,6 +5008,8 @@ static constexpr dart::compiler::target::word Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -5518,8 +5532,8 @@ static constexpr dart::compiler::target::word Array_element_size = 4;
|
|||
static constexpr dart::compiler::target::word Code_elements_start_offset = 144;
|
||||
static constexpr dart::compiler::target::word Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word Context_elements_start_offset =
|
||||
24;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 8;
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 32;
|
||||
|
@ -5546,6 +5560,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -5626,7 +5641,7 @@ static constexpr dart::compiler::target::word Code_saved_instructions_offset =
|
|||
48;
|
||||
static constexpr dart::compiler::target::word Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -5979,7 +5994,7 @@ static constexpr dart::compiler::target::word ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -6066,8 +6081,8 @@ static constexpr dart::compiler::target::word Array_element_size = 4;
|
|||
static constexpr dart::compiler::target::word Code_elements_start_offset = 144;
|
||||
static constexpr dart::compiler::target::word Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word Context_elements_start_offset =
|
||||
24;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 8;
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word ContextScope_element_size = 32;
|
||||
|
@ -6094,6 +6109,7 @@ static constexpr dart::compiler::target::word TwoByteString_element_size = 2;
|
|||
static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -6174,7 +6190,7 @@ static constexpr dart::compiler::target::word Code_saved_instructions_offset =
|
|||
48;
|
||||
static constexpr dart::compiler::target::word Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -6528,7 +6544,7 @@ static constexpr dart::compiler::target::word ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
|
||||
16;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -6655,6 +6671,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
268435455;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
65533;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 0;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -7267,6 +7285,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -7886,6 +7906,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -8470,8 +8492,8 @@ static constexpr dart::compiler::target::word AOT_Code_elements_start_offset =
|
|||
152;
|
||||
static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Context_elements_start_offset = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
|
||||
AOT_Context_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
|
@ -8503,6 +8525,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
268435455;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -8589,7 +8613,7 @@ static constexpr dart::compiler::target::word
|
|||
static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
|
||||
8;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -8982,7 +9006,7 @@ static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_CompressedStackMaps_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
|
||||
16;
|
||||
|
@ -9085,8 +9109,8 @@ static constexpr dart::compiler::target::word AOT_Code_elements_start_offset =
|
|||
152;
|
||||
static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Context_elements_start_offset = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
|
||||
AOT_Context_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
|
@ -9118,6 +9142,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
268435455;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -9204,7 +9230,7 @@ static constexpr dart::compiler::target::word
|
|||
static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
|
||||
8;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -9598,7 +9624,7 @@ static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_CompressedStackMaps_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
|
||||
16;
|
||||
|
@ -9733,6 +9759,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
268435455;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
65533;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 0;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -10338,6 +10366,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -10950,6 +10980,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
32765;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
576460752303423487;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -11527,8 +11559,8 @@ static constexpr dart::compiler::target::word AOT_Code_elements_start_offset =
|
|||
120;
|
||||
static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Context_elements_start_offset = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
|
||||
AOT_Context_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
|
@ -11560,6 +11592,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
268435455;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -11644,7 +11678,7 @@ static constexpr dart::compiler::target::word
|
|||
static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
|
||||
8;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -12035,7 +12069,7 @@ static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_CompressedStackMaps_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
|
||||
16;
|
||||
|
@ -12135,8 +12169,8 @@ static constexpr dart::compiler::target::word AOT_Code_elements_start_offset =
|
|||
120;
|
||||
static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Context_elements_start_offset = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
|
||||
AOT_Context_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ContextScope_elements_start_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
|
||||
|
@ -12168,6 +12202,8 @@ static constexpr dart::compiler::target::word AOT_Array_kMaxElements =
|
|||
268435455;
|
||||
static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
|
||||
65532;
|
||||
static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
|
||||
268435455;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
|
@ -12252,7 +12288,7 @@ static constexpr dart::compiler::target::word
|
|||
static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
|
||||
static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
|
||||
8;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
|
||||
static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_ExternalOneByteString_external_data_offset = 16;
|
||||
|
@ -12644,7 +12680,7 @@ static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize = 24;
|
|||
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word
|
||||
AOT_CompressedStackMaps_HeaderSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
|
||||
static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
|
||||
static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
|
||||
static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
|
||||
16;
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
ARRAY_SIZEOF(TwoByteString, InstanceSize, element_offset) \
|
||||
CONSTANT(Array, kMaxElements) \
|
||||
CONSTANT(Array, kMaxNewSpaceElements) \
|
||||
CONSTANT(Context, kMaxElements) \
|
||||
CONSTANT(Instructions, kMonomorphicEntryOffsetJIT) \
|
||||
CONSTANT(Instructions, kPolymorphicEntryOffsetJIT) \
|
||||
CONSTANT(Instructions, kMonomorphicEntryOffsetAOT) \
|
||||
|
|
|
@ -488,10 +488,11 @@ void StubCodeCompiler::GenerateBuildMethodExtractorStub(
|
|||
R0, // instance
|
||||
R1, // end address
|
||||
R2, R3);
|
||||
__ ldr(R1, Address(THR, target::Thread::object_null_offset()));
|
||||
__ str(R1, FieldAddress(R0, target::Context::parent_offset()));
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
R0, FieldAddress(R0, target::Context::parent_offset()), NULL_REG);
|
||||
__ LoadImmediate(R1, 1);
|
||||
__ str(R1, FieldAddress(R0, target::Context::num_variables_offset()));
|
||||
__ str(R1, FieldAddress(R0, target::Context::num_variables_offset()),
|
||||
kFourBytes);
|
||||
__ b(&done);
|
||||
}
|
||||
|
||||
|
@ -511,10 +512,11 @@ void StubCodeCompiler::GenerateBuildMethodExtractorStub(
|
|||
// Store receiver in context
|
||||
__ ldr(AllocateClosureABI::kScratchReg,
|
||||
Address(FP, target::kWordSize * kReceiverOffset));
|
||||
__ StoreIntoObject(AllocateClosureABI::kContextReg,
|
||||
FieldAddress(AllocateClosureABI::kContextReg,
|
||||
target::Context::variable_offset(0)),
|
||||
AllocateClosureABI::kScratchReg);
|
||||
__ StoreCompressedIntoObject(
|
||||
AllocateClosureABI::kContextReg,
|
||||
FieldAddress(AllocateClosureABI::kContextReg,
|
||||
target::Context::variable_offset(0)),
|
||||
AllocateClosureABI::kScratchReg);
|
||||
|
||||
// Pop function before pushing context.
|
||||
__ Pop(AllocateClosureABI::kFunctionReg);
|
||||
|
@ -1487,7 +1489,7 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
|
|||
target::Context::header_size() +
|
||||
target::ObjectAlignment::kObjectAlignment - 1;
|
||||
__ LoadImmediate(R2, fixed_size_plus_alignment_padding);
|
||||
__ add(R2, R2, Operand(R1, LSL, 3));
|
||||
__ add(R2, R2, Operand(R1, LSL, kCompressedWordSizeLog2));
|
||||
ASSERT(kSmiTagShift == 1);
|
||||
__ andi(R2, R2, Immediate(~(target::ObjectAlignment::kObjectAlignment - 1)));
|
||||
|
||||
|
@ -1539,7 +1541,8 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
|
|||
// Setup up number of context variables field.
|
||||
// R0: new object.
|
||||
// R1: number of context variables as integer value (not object).
|
||||
__ StoreFieldToOffset(R1, R0, target::Context::num_variables_offset());
|
||||
__ StoreFieldToOffset(R1, R0, target::Context::num_variables_offset(),
|
||||
kFourBytes);
|
||||
}
|
||||
|
||||
// Called for inline allocation of contexts.
|
||||
|
@ -1558,13 +1561,12 @@ void StubCodeCompiler::GenerateAllocateContextStub(Assembler* assembler) {
|
|||
// Setup the parent field.
|
||||
// R0: new object.
|
||||
// R1: number of context variables.
|
||||
__ LoadObject(R2, NullObject());
|
||||
__ StoreFieldToOffset(R2, R0, target::Context::parent_offset());
|
||||
__ StoreCompressedIntoObjectOffset(R0, target::Context::parent_offset(),
|
||||
NULL_REG);
|
||||
|
||||
// Initialize the context variables.
|
||||
// R0: new object.
|
||||
// R1: number of context variables.
|
||||
// R2: raw null.
|
||||
{
|
||||
Label loop, done;
|
||||
__ AddImmediate(R3, R0,
|
||||
|
@ -1572,7 +1574,7 @@ void StubCodeCompiler::GenerateAllocateContextStub(Assembler* assembler) {
|
|||
__ Bind(&loop);
|
||||
__ subs(R1, R1, Operand(1));
|
||||
__ b(&done, MI);
|
||||
__ str(R2, Address(R3, R1, UXTX, Address::Scaled));
|
||||
__ str(NULL_REG, Address(R3, R1, UXTX, Address::Scaled), kObjectBytes);
|
||||
__ b(&loop, NE); // Loop if R1 not zero.
|
||||
__ Bind(&done);
|
||||
}
|
||||
|
@ -1626,10 +1628,10 @@ void StubCodeCompiler::GenerateCloneContextStub(Assembler* assembler) {
|
|||
GenerateAllocateContextSpaceStub(assembler, &slow_case);
|
||||
|
||||
// Load parent in the existing context.
|
||||
__ ldr(R3, FieldAddress(R5, target::Context::parent_offset()));
|
||||
__ LoadCompressed(R3, FieldAddress(R5, target::Context::parent_offset()));
|
||||
// Setup the parent field.
|
||||
// R0: new context.
|
||||
__ StoreIntoObjectNoBarrier(
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
R0, FieldAddress(R0, target::Context::parent_offset()), R3);
|
||||
|
||||
// Clone the context variables.
|
||||
|
@ -1648,8 +1650,8 @@ void StubCodeCompiler::GenerateCloneContextStub(Assembler* assembler) {
|
|||
__ subs(R1, R1, Operand(1));
|
||||
__ b(&done, MI);
|
||||
|
||||
__ ldr(R5, Address(R4, R1, UXTX, Address::Scaled));
|
||||
__ str(R5, Address(R3, R1, UXTX, Address::Scaled));
|
||||
__ ldr(R5, Address(R4, R1, UXTX, Address::Scaled), kObjectBytes);
|
||||
__ str(R5, Address(R3, R1, UXTX, Address::Scaled), kObjectBytes);
|
||||
__ b(&loop, NE); // Loop if R1 not zero.
|
||||
|
||||
__ Bind(&done);
|
||||
|
|
|
@ -434,8 +434,9 @@ void StubCodeCompiler::GenerateBuildMethodExtractorStub(
|
|||
RSI, // end address
|
||||
RDI);
|
||||
__ movq(RSI, Address(THR, target::Thread::object_null_offset()));
|
||||
__ movq(FieldAddress(RAX, target::Context::parent_offset()), RSI);
|
||||
__ movq(FieldAddress(RAX, target::Context::num_variables_offset()),
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
RAX, FieldAddress(RAX, target::Context::parent_offset()), RSI);
|
||||
__ movl(FieldAddress(RAX, target::Context::num_variables_offset()),
|
||||
Immediate(1));
|
||||
__ jmp(&done);
|
||||
}
|
||||
|
@ -455,10 +456,11 @@ void StubCodeCompiler::GenerateBuildMethodExtractorStub(
|
|||
// Store receiver in context
|
||||
__ movq(AllocateClosureABI::kScratchReg,
|
||||
Address(RBP, target::kWordSize * kReceiverOffsetInWords));
|
||||
__ StoreIntoObject(AllocateClosureABI::kContextReg,
|
||||
FieldAddress(AllocateClosureABI::kContextReg,
|
||||
target::Context::variable_offset(0)),
|
||||
AllocateClosureABI::kScratchReg);
|
||||
__ StoreCompressedIntoObject(
|
||||
AllocateClosureABI::kContextReg,
|
||||
FieldAddress(AllocateClosureABI::kContextReg,
|
||||
target::Context::variable_offset(0)),
|
||||
AllocateClosureABI::kScratchReg);
|
||||
|
||||
// Pop function.
|
||||
__ popq(AllocateClosureABI::kFunctionReg);
|
||||
|
@ -1420,7 +1422,8 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
|
|||
intptr_t fixed_size_plus_alignment_padding =
|
||||
(target::Context::header_size() +
|
||||
target::ObjectAlignment::kObjectAlignment - 1);
|
||||
__ leaq(R13, Address(R10, TIMES_8, fixed_size_plus_alignment_padding));
|
||||
__ leaq(R13, Address(R10, TIMES_COMPRESSED_WORD_SIZE,
|
||||
fixed_size_plus_alignment_padding));
|
||||
__ andq(R13, Immediate(-target::ObjectAlignment::kObjectAlignment));
|
||||
|
||||
// Check for allocation tracing.
|
||||
|
@ -1454,7 +1457,8 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
|
|||
// R10: number of context variables.
|
||||
{
|
||||
Label size_tag_overflow, done;
|
||||
__ leaq(R13, Address(R10, TIMES_8, fixed_size_plus_alignment_padding));
|
||||
__ leaq(R13, Address(R10, TIMES_COMPRESSED_WORD_SIZE,
|
||||
fixed_size_plus_alignment_padding));
|
||||
__ andq(R13, Immediate(-target::ObjectAlignment::kObjectAlignment));
|
||||
__ cmpq(R13, Immediate(target::UntaggedObject::kSizeTagMaxSizeTag));
|
||||
__ j(ABOVE, &size_tag_overflow, Assembler::kNearJump);
|
||||
|
@ -1478,7 +1482,7 @@ static void GenerateAllocateContextSpaceStub(Assembler* assembler,
|
|||
// Setup up number of context variables field.
|
||||
// RAX: new object.
|
||||
// R10: number of context variables as integer value (not object).
|
||||
__ movq(FieldAddress(RAX, target::Context::num_variables_offset()), R10);
|
||||
__ movl(FieldAddress(RAX, target::Context::num_variables_offset()), R10);
|
||||
}
|
||||
|
||||
// Called for inline allocation of contexts.
|
||||
|
@ -1499,7 +1503,7 @@ void StubCodeCompiler::GenerateAllocateContextStub(Assembler* assembler) {
|
|||
// RAX: new object.
|
||||
// R9: Parent object, initialised to null.
|
||||
// No generational barrier needed, since we are storing null.
|
||||
__ StoreIntoObjectNoBarrier(
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
RAX, FieldAddress(RAX, target::Context::parent_offset()), R9);
|
||||
|
||||
// Initialize the context variables.
|
||||
|
@ -1517,7 +1521,8 @@ void StubCodeCompiler::GenerateAllocateContextStub(Assembler* assembler) {
|
|||
__ Bind(&loop);
|
||||
__ decq(R10);
|
||||
// No generational barrier needed, since we are storing null.
|
||||
__ StoreIntoObjectNoBarrier(RAX, Address(R13, R10, TIMES_8, 0), R9);
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
RAX, Address(R13, R10, TIMES_COMPRESSED_WORD_SIZE, 0), R9);
|
||||
__ Bind(&entry);
|
||||
__ cmpq(R10, Immediate(0));
|
||||
__ j(NOT_EQUAL, &loop, Assembler::kNearJump);
|
||||
|
@ -1567,11 +1572,11 @@ void StubCodeCompiler::GenerateCloneContextStub(Assembler* assembler) {
|
|||
GenerateAllocateContextSpaceStub(assembler, &slow_case);
|
||||
|
||||
// Load parent in the existing context.
|
||||
__ movq(R13, FieldAddress(R9, target::Context::parent_offset()));
|
||||
__ LoadCompressed(R13, FieldAddress(R9, target::Context::parent_offset()));
|
||||
// Setup the parent field.
|
||||
// RAX: new object.
|
||||
// R9: Old parent object.
|
||||
__ StoreIntoObjectNoBarrier(
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
RAX, FieldAddress(RAX, target::Context::parent_offset()), R13);
|
||||
|
||||
// Clone the context variables.
|
||||
|
@ -1582,11 +1587,12 @@ void StubCodeCompiler::GenerateCloneContextStub(Assembler* assembler) {
|
|||
__ jmp(&entry, Assembler::kNearJump);
|
||||
__ Bind(&loop);
|
||||
__ decq(R10);
|
||||
__ movq(R13, FieldAddress(R9, R10, TIMES_8,
|
||||
target::Context::variable_offset(0)));
|
||||
__ StoreIntoObjectNoBarrier(
|
||||
__ LoadCompressed(R13, FieldAddress(R9, R10, TIMES_COMPRESSED_WORD_SIZE,
|
||||
target::Context::variable_offset(0)));
|
||||
__ StoreCompressedIntoObjectNoBarrier(
|
||||
RAX,
|
||||
FieldAddress(RAX, R10, TIMES_8, target::Context::variable_offset(0)),
|
||||
FieldAddress(RAX, R10, TIMES_COMPRESSED_WORD_SIZE,
|
||||
target::Context::variable_offset(0)),
|
||||
R13);
|
||||
__ Bind(&entry);
|
||||
__ cmpq(R10, Immediate(0));
|
||||
|
|
|
@ -273,7 +273,8 @@ void DeferredObject::Create() {
|
|||
}
|
||||
|
||||
static intptr_t ToContextIndex(intptr_t offset_in_bytes) {
|
||||
intptr_t result = (offset_in_bytes - Context::variable_offset(0)) / kWordSize;
|
||||
intptr_t result = (offset_in_bytes - Context::variable_offset(0)) /
|
||||
Context::kBytesPerElement;
|
||||
ASSERT(result >= 0);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -6821,7 +6821,7 @@ class Context : public Object {
|
|||
|
||||
void Dump(int indent = 0) const;
|
||||
|
||||
static const intptr_t kBytesPerElement = kWordSize;
|
||||
static const intptr_t kBytesPerElement = kCompressedWordSize;
|
||||
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
|
||||
|
||||
static const intptr_t kAwaitJumpVarIndex = 0;
|
||||
|
@ -6838,11 +6838,11 @@ class Context : public Object {
|
|||
|
||||
static intptr_t variable_offset(intptr_t context_index) {
|
||||
return OFFSET_OF_RETURNED_VALUE(UntaggedContext, data) +
|
||||
(kWordSize * context_index);
|
||||
(kBytesPerElement * context_index);
|
||||
}
|
||||
|
||||
static bool IsValidLength(intptr_t len) {
|
||||
return 0 <= len && len <= compiler::target::Array::kMaxElements;
|
||||
return 0 <= len && len <= compiler::target::Context::kMaxElements;
|
||||
}
|
||||
|
||||
static intptr_t InstanceSize() {
|
||||
|
|
|
@ -245,9 +245,7 @@ void SetNewSpaceTaggingWord(ObjectPtr to, classid_t cid, uint32_t size) {
|
|||
DART_FORCE_INLINE
|
||||
ObjectPtr AllocateObject(intptr_t cid, intptr_t size) {
|
||||
#if defined(DART_COMPRESSED_POINTERS)
|
||||
// TODO(rmacnak): Can be changed unconditionally to `true` once Contexts
|
||||
// are compressed.
|
||||
const bool compressed = cid != kContextCid;
|
||||
const bool compressed = true;
|
||||
#else
|
||||
const bool compressed = false;
|
||||
#endif
|
||||
|
@ -664,13 +662,13 @@ class FastObjectCopyBase : public ObjectCopyBase {
|
|||
}
|
||||
}
|
||||
|
||||
void ForwardContextPointers(intptr_t context_length,
|
||||
ObjectPtr src,
|
||||
ObjectPtr dst,
|
||||
intptr_t offset,
|
||||
intptr_t end_offset) {
|
||||
for (; offset < end_offset; offset += kWordSize) {
|
||||
ForwardPointer(src, dst, offset);
|
||||
void ForwardCompressedContextPointers(intptr_t context_length,
|
||||
ObjectPtr src,
|
||||
ObjectPtr dst,
|
||||
intptr_t offset,
|
||||
intptr_t end_offset) {
|
||||
for (; offset < end_offset; offset += kCompressedWordSize) {
|
||||
ForwardCompressedPointer(src, dst, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -705,36 +703,6 @@ class FastObjectCopyBase : public ObjectCopyBase {
|
|||
StoreCompressedPointerNoBarrier(dst, offset, to);
|
||||
}
|
||||
|
||||
// TODO(rmacnak): Can be removed if Contexts are compressed.
|
||||
DART_FORCE_INLINE
|
||||
void ForwardPointer(ObjectPtr src, ObjectPtr dst, intptr_t offset) {
|
||||
auto value = LoadPointer(src, offset);
|
||||
if (!value.IsHeapObject()) {
|
||||
StorePointerNoBarrier(dst, offset, value);
|
||||
return;
|
||||
}
|
||||
const uword tags = TagsFromUntaggedObject(value.untag());
|
||||
if (CanShareObject(value, tags)) {
|
||||
StorePointerNoBarrier(dst, offset, value);
|
||||
return;
|
||||
}
|
||||
|
||||
ObjectPtr existing_to = fast_forward_map_.ForwardedObject(value);
|
||||
if (existing_to != Marker()) {
|
||||
StorePointerNoBarrier(dst, offset, existing_to);
|
||||
return;
|
||||
}
|
||||
|
||||
if (UNLIKELY(!CanCopyObject(tags, value))) {
|
||||
ASSERT(exception_msg_ != nullptr);
|
||||
StorePointerNoBarrier(dst, offset, Object::null());
|
||||
return;
|
||||
}
|
||||
|
||||
auto to = Forward(tags, value);
|
||||
StorePointerNoBarrier(dst, offset, to);
|
||||
}
|
||||
|
||||
ObjectPtr Forward(uword tags, ObjectPtr from) {
|
||||
const intptr_t header_size = UntaggedObject::SizeTag::decode(tags);
|
||||
const auto cid = UntaggedObject::ClassIdTag::decode(tags);
|
||||
|
@ -859,13 +827,13 @@ class SlowObjectCopyBase : public ObjectCopyBase {
|
|||
}
|
||||
}
|
||||
|
||||
void ForwardContextPointers(intptr_t context_length,
|
||||
const Object& src,
|
||||
const Object& dst,
|
||||
intptr_t offset,
|
||||
intptr_t end_offset) {
|
||||
for (; offset < end_offset; offset += kWordSize) {
|
||||
ForwardPointer(src, dst, offset);
|
||||
void ForwardCompressedContextPointers(intptr_t context_length,
|
||||
const Object& src,
|
||||
const Object& dst,
|
||||
intptr_t offset,
|
||||
intptr_t end_offset) {
|
||||
for (; offset < end_offset; offset += kCompressedWordSize) {
|
||||
ForwardCompressedPointer(src, dst, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -939,36 +907,6 @@ class SlowObjectCopyBase : public ObjectCopyBase {
|
|||
StoreCompressedPointerBarrier(dst.ptr(), offset, tmp_.ptr());
|
||||
}
|
||||
|
||||
// TODO(rmacnak): Can be removed if Contexts are compressed.
|
||||
DART_FORCE_INLINE
|
||||
void ForwardPointer(const Object& src, const Object& dst, intptr_t offset) {
|
||||
auto value = LoadPointer(src.ptr(), offset);
|
||||
if (!value.IsHeapObject()) {
|
||||
StorePointerNoBarrier(dst.ptr(), offset, value);
|
||||
return;
|
||||
}
|
||||
const uword tags = TagsFromUntaggedObject(value.untag());
|
||||
if (CanShareObject(value, tags)) {
|
||||
StorePointerBarrier(dst.ptr(), offset, value);
|
||||
return;
|
||||
}
|
||||
|
||||
ObjectPtr existing_to = slow_forward_map_.ForwardedObject(value);
|
||||
if (existing_to != Marker()) {
|
||||
StorePointerBarrier(dst.ptr(), offset, existing_to);
|
||||
return;
|
||||
}
|
||||
|
||||
if (UNLIKELY(!CanCopyObject(tags, value))) {
|
||||
ASSERT(exception_msg_ != nullptr);
|
||||
StorePointerNoBarrier(dst.ptr(), offset, Object::null());
|
||||
return;
|
||||
}
|
||||
|
||||
tmp_ = value;
|
||||
tmp_ = Forward(tags, tmp_); // Only this can cause allocation.
|
||||
StorePointerBarrier(dst.ptr(), offset, tmp_.ptr());
|
||||
}
|
||||
ObjectPtr Forward(uword tags, const Object& from) {
|
||||
const intptr_t cid = UntaggedObject::ClassIdTag::decode(tags);
|
||||
intptr_t size = UntaggedObject::SizeTag::decode(tags);
|
||||
|
@ -1161,12 +1099,11 @@ class ObjectCopy : public Base {
|
|||
|
||||
UntagContext(to)->num_variables_ = UntagContext(from)->num_variables_;
|
||||
|
||||
// TODO(rmacnak): Should use ForwardCompressedPointer once contexts are
|
||||
// compressed.
|
||||
Base::ForwardPointer(from, to, OFFSET_OF(UntaggedContext, parent_));
|
||||
Base::ForwardContextPointers(
|
||||
Base::ForwardCompressedPointer(from, to,
|
||||
OFFSET_OF(UntaggedContext, parent_));
|
||||
Base::ForwardCompressedContextPointers(
|
||||
length, from, to, Context::variable_offset(0),
|
||||
Context::variable_offset(0) + kWordSize * length);
|
||||
Context::variable_offset(0) + Context::kBytesPerElement * length);
|
||||
}
|
||||
|
||||
void CopyArray(typename Types::Array from, typename Types::Array to) {
|
||||
|
|
|
@ -567,7 +567,7 @@ VARIABLE_COMPRESSED_VISITOR(TypeArguments,
|
|||
Smi::Value(raw_obj->untag()->length()))
|
||||
VARIABLE_COMPRESSED_VISITOR(LocalVarDescriptors, raw_obj->untag()->num_entries_)
|
||||
VARIABLE_COMPRESSED_VISITOR(ExceptionHandlers, raw_obj->untag()->num_entries_)
|
||||
VARIABLE_VISITOR(Context, raw_obj->untag()->num_variables_)
|
||||
VARIABLE_COMPRESSED_VISITOR(Context, raw_obj->untag()->num_variables_)
|
||||
VARIABLE_COMPRESSED_VISITOR(Array, Smi::Value(raw_obj->untag()->length()))
|
||||
VARIABLE_COMPRESSED_VISITOR(
|
||||
TypedData,
|
||||
|
|
|
@ -2170,10 +2170,10 @@ class UntaggedContext : public UntaggedObject {
|
|||
|
||||
int32_t num_variables_;
|
||||
|
||||
POINTER_FIELD(ContextPtr, parent)
|
||||
COMPRESSED_POINTER_FIELD(ContextPtr, parent)
|
||||
VISIT_FROM(parent)
|
||||
// Variable length data follows here.
|
||||
VARIABLE_POINTER_FIELDS(ObjectPtr, element, data)
|
||||
COMPRESSED_VARIABLE_POINTER_FIELDS(ObjectPtr, element, data)
|
||||
|
||||
friend class Object;
|
||||
friend void UpdateLengthField(intptr_t,
|
||||
|
|
|
@ -42,20 +42,4 @@ const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) {
|
|||
return snapshot;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void SnapshotReader::RunDelayedTypePostprocessing() {
|
||||
if (types_to_postprocess_.IsNull()) {
|
||||
return;
|
||||
}
|
||||
|
||||
AbstractType& type = AbstractType::Handle();
|
||||
Code& code = Code::Handle();
|
||||
for (intptr_t i = 0; i < types_to_postprocess_.Length(); ++i) {
|
||||
type ^= types_to_postprocess_.At(i);
|
||||
code = TypeTestingStubGenerator::DefaultCodeForType(type);
|
||||
type.InitializeTypeTestingStubNonAtomic(code);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace dart
|
||||
|
|
Loading…
Reference in a new issue