Revert "[vm] Remove Script::compile_time_constants_."

This reverts commit a10e038f09.

Reason for revert: Android ARM32 disagrees on how UntaggedScript is packed

Original change's description:
> [vm] Remove Script::compile_time_constants_.
>
> Dead since 5cce1e4acd.
>
> TEST=ci
> Change-Id: If55de08b753e5948785187e455ac793356d1e794
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202066
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com

Change-Id: I41872aa99af056d4a2c730403628a86b61185e46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2021-06-03 17:05:38 +00:00 committed by commit-bot@chromium.org
parent 4cc88389fd
commit 6589ca13bc
5 changed files with 25 additions and 14 deletions

View file

@ -527,7 +527,7 @@ static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 8;
static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 20;
static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
static constexpr dart::compiler::target::word Script_InstanceSize = 48;
static constexpr dart::compiler::target::word Script_InstanceSize = 56;
static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
16;
@ -1072,7 +1072,7 @@ static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 40;
static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
static constexpr dart::compiler::target::word Script_InstanceSize = 80;
static constexpr dart::compiler::target::word Script_InstanceSize = 96;
static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
32;
@ -1607,7 +1607,7 @@ static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 8;
static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 20;
static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
static constexpr dart::compiler::target::word Script_InstanceSize = 48;
static constexpr dart::compiler::target::word Script_InstanceSize = 56;
static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
16;
@ -2153,7 +2153,7 @@ static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 40;
static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
static constexpr dart::compiler::target::word Script_InstanceSize = 80;
static constexpr dart::compiler::target::word Script_InstanceSize = 96;
static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
32;
@ -2697,7 +2697,7 @@ static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 24;
static constexpr dart::compiler::target::word RegExp_InstanceSize = 80;
static constexpr dart::compiler::target::word Script_InstanceSize = 56;
static constexpr dart::compiler::target::word Script_InstanceSize = 64;
static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
32;
@ -3242,7 +3242,7 @@ static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 24;
static constexpr dart::compiler::target::word RegExp_InstanceSize = 80;
static constexpr dart::compiler::target::word Script_InstanceSize = 56;
static constexpr dart::compiler::target::word Script_InstanceSize = 64;
static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize =
32;
@ -7062,7 +7062,7 @@ static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 8;
static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 20;
static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 60;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 48;
static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word
AOT_SingleTargetCache_InstanceSize = 16;
@ -7669,7 +7669,7 @@ static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word
AOT_SingleTargetCache_InstanceSize = 32;
@ -8280,7 +8280,7 @@ static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word
AOT_SingleTargetCache_InstanceSize = 32;
@ -10093,7 +10093,7 @@ static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 8;
static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 60;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 48;
static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word
AOT_SingleTargetCache_InstanceSize = 16;
@ -10693,7 +10693,7 @@ static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word
AOT_SingleTargetCache_InstanceSize = 32;
@ -11297,7 +11297,7 @@ static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 72;
static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 80;
static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
static constexpr dart::compiler::target::word
AOT_SingleTargetCache_InstanceSize = 32;

View file

@ -11603,6 +11603,10 @@ void Script::LoadSourceFromKernel(const uint8_t* kernel_buffer,
}
#endif // !defined(DART_PRECOMPILED_RUNTIME)
void Script::set_compile_time_constants(const Array& value) const {
untag()->set_compile_time_constants(value.ptr());
}
void Script::set_kernel_program_info(const KernelProgramInfo& info) const {
untag()->set_kernel_program_info(info.ptr());
}

View file

@ -4464,6 +4464,11 @@ class Script : public Object {
// The load time in milliseconds since epoch.
int64_t load_timestamp() const { return untag()->load_timestamp_; }
ArrayPtr compile_time_constants() const {
return untag()->compile_time_constants();
}
void set_compile_time_constants(const Array& value) const;
KernelProgramInfoPtr kernel_program_info() const {
return untag()->kernel_program_info();
}

View file

@ -1567,6 +1567,7 @@ class alignas(8) UntaggedScript : public UntaggedObject {
COMPRESSED_POINTER_FIELD(StringPtr, url)
VISIT_FROM(url)
COMPRESSED_POINTER_FIELD(StringPtr, resolved_url)
COMPRESSED_POINTER_FIELD(ArrayPtr, compile_time_constants)
COMPRESSED_POINTER_FIELD(TypedDataPtr, line_starts)
#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
COMPRESSED_POINTER_FIELD(ExternalTypedDataPtr, constant_coverage)
@ -1615,11 +1616,11 @@ class alignas(8) UntaggedScript : public UntaggedObject {
#endif
#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
int32_t kernel_script_index_;
int64_t load_timestamp_;
int32_t kernel_script_index_;
#else
int64_t load_timestamp_;
int32_t kernel_script_index_;
int64_t load_timestamp_;
#endif
};

View file

@ -43,6 +43,7 @@ namespace dart {
F(Field, host_offset_or_field_id_) \
F(Script, url_) \
F(Script, resolved_url_) \
F(Script, compile_time_constants_) \
F(Script, line_starts_) \
F(Script, debug_positions_) \
F(Script, kernel_program_info_) \