Skip to content

Commit c135e2a

Browse files
dcharkescommit-bot@chromium.org
authored andcommitted
[vm/ffi] Reorder fields inside Pointer
Issue: #40767 Issue: #36730 Change-Id: I725bb7ffc9325308dbccb668e683fbd9a7d7b565 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137791 Reviewed-by: Martin Kustermann <[email protected]>
1 parent 4081235 commit c135e2a

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

runtime/vm/compiler/runtime_offsets_extracted.h

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
176176
140;
177177
static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
178178
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
179-
8;
180-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 4;
179+
4;
180+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
181181
static constexpr dart::compiler::target::word
182182
SingleTargetCache_entry_point_offset = 8;
183183
static constexpr dart::compiler::target::word
@@ -643,8 +643,9 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
643643
280;
644644
static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
645645
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
646+
8;
647+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
646648
16;
647-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
648649
static constexpr dart::compiler::target::word
649650
SingleTargetCache_entry_point_offset = 16;
650651
static constexpr dart::compiler::target::word
@@ -1112,8 +1113,8 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
11121113
140;
11131114
static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
11141115
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
1115-
8;
1116-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 4;
1116+
4;
1117+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
11171118
static constexpr dart::compiler::target::word
11181119
SingleTargetCache_entry_point_offset = 8;
11191120
static constexpr dart::compiler::target::word
@@ -1576,8 +1577,9 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
15761577
280;
15771578
static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
15781579
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
1580+
8;
1581+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
15791582
16;
1580-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
15811583
static constexpr dart::compiler::target::word
15821584
SingleTargetCache_entry_point_offset = 16;
15831585
static constexpr dart::compiler::target::word
@@ -2045,8 +2047,8 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
20452047
140;
20462048
static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
20472049
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
2048-
8;
2049-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 4;
2050+
4;
2051+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
20502052
static constexpr dart::compiler::target::word
20512053
SingleTargetCache_entry_point_offset = 8;
20522054
static constexpr dart::compiler::target::word
@@ -2506,8 +2508,9 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
25062508
280;
25072509
static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
25082510
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
2511+
8;
2512+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
25092513
16;
2510-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
25112514
static constexpr dart::compiler::target::word
25122515
SingleTargetCache_entry_point_offset = 16;
25132516
static constexpr dart::compiler::target::word
@@ -2969,8 +2972,8 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
29692972
140;
29702973
static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
29712974
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
2972-
8;
2973-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 4;
2975+
4;
2976+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
29742977
static constexpr dart::compiler::target::word
29752978
SingleTargetCache_entry_point_offset = 8;
29762979
static constexpr dart::compiler::target::word
@@ -3427,8 +3430,9 @@ static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
34273430
280;
34283431
static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
34293432
static constexpr dart::compiler::target::word Pointer_c_memory_address_offset =
3433+
8;
3434+
static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
34303435
16;
3431-
static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
34323436
static constexpr dart::compiler::target::word
34333437
SingleTargetCache_entry_point_offset = 16;
34343438
static constexpr dart::compiler::target::word
@@ -3906,9 +3910,9 @@ static constexpr dart::compiler::target::word
39063910
static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
39073911
12;
39083912
static constexpr dart::compiler::target::word
3909-
AOT_Pointer_c_memory_address_offset = 8;
3913+
AOT_Pointer_c_memory_address_offset = 4;
39103914
static constexpr dart::compiler::target::word
3911-
AOT_Pointer_type_arguments_offset = 4;
3915+
AOT_Pointer_type_arguments_offset = 8;
39123916
static constexpr dart::compiler::target::word
39133917
AOT_SingleTargetCache_entry_point_offset = 8;
39143918
static constexpr dart::compiler::target::word
@@ -4416,9 +4420,9 @@ static constexpr dart::compiler::target::word
44164420
static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
44174421
16;
44184422
static constexpr dart::compiler::target::word
4419-
AOT_Pointer_c_memory_address_offset = 16;
4423+
AOT_Pointer_c_memory_address_offset = 8;
44204424
static constexpr dart::compiler::target::word
4421-
AOT_Pointer_type_arguments_offset = 8;
4425+
AOT_Pointer_type_arguments_offset = 16;
44224426
static constexpr dart::compiler::target::word
44234427
AOT_SingleTargetCache_entry_point_offset = 16;
44244428
static constexpr dart::compiler::target::word
@@ -4932,9 +4936,9 @@ static constexpr dart::compiler::target::word
49324936
static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
49334937
16;
49344938
static constexpr dart::compiler::target::word
4935-
AOT_Pointer_c_memory_address_offset = 16;
4939+
AOT_Pointer_c_memory_address_offset = 8;
49364940
static constexpr dart::compiler::target::word
4937-
AOT_Pointer_type_arguments_offset = 8;
4941+
AOT_Pointer_type_arguments_offset = 16;
49384942
static constexpr dart::compiler::target::word
49394943
AOT_SingleTargetCache_entry_point_offset = 16;
49404944
static constexpr dart::compiler::target::word
@@ -5444,9 +5448,9 @@ static constexpr dart::compiler::target::word
54445448
static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
54455449
12;
54465450
static constexpr dart::compiler::target::word
5447-
AOT_Pointer_c_memory_address_offset = 8;
5451+
AOT_Pointer_c_memory_address_offset = 4;
54485452
static constexpr dart::compiler::target::word
5449-
AOT_Pointer_type_arguments_offset = 4;
5453+
AOT_Pointer_type_arguments_offset = 8;
54505454
static constexpr dart::compiler::target::word
54515455
AOT_SingleTargetCache_entry_point_offset = 8;
54525456
static constexpr dart::compiler::target::word
@@ -5947,9 +5951,9 @@ static constexpr dart::compiler::target::word
59475951
static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
59485952
16;
59495953
static constexpr dart::compiler::target::word
5950-
AOT_Pointer_c_memory_address_offset = 16;
5954+
AOT_Pointer_c_memory_address_offset = 8;
59515955
static constexpr dart::compiler::target::word
5952-
AOT_Pointer_type_arguments_offset = 8;
5956+
AOT_Pointer_type_arguments_offset = 16;
59535957
static constexpr dart::compiler::target::word
59545958
AOT_SingleTargetCache_entry_point_offset = 16;
59555959
static constexpr dart::compiler::target::word
@@ -6456,9 +6460,9 @@ static constexpr dart::compiler::target::word
64566460
static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
64576461
16;
64586462
static constexpr dart::compiler::target::word
6459-
AOT_Pointer_c_memory_address_offset = 16;
6463+
AOT_Pointer_c_memory_address_offset = 8;
64606464
static constexpr dart::compiler::target::word
6461-
AOT_Pointer_type_arguments_offset = 8;
6465+
AOT_Pointer_type_arguments_offset = 16;
64626466
static constexpr dart::compiler::target::word
64636467
AOT_SingleTargetCache_entry_point_offset = 16;
64646468
static constexpr dart::compiler::target::word

runtime/vm/raw_object.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,10 +2732,10 @@ class RawExternalTypedData : public RawTypedDataBase {
27322732

27332733
class RawPointer : public RawInstance {
27342734
RAW_HEAP_OBJECT_IMPLEMENTATION(Pointer);
2735-
VISIT_FROM(RawCompressed, type_arguments_)
2736-
RawTypeArguments* type_arguments_;
2735+
VISIT_FROM(RawCompressed, c_memory_address_)
27372736
RawInteger* c_memory_address_;
2738-
VISIT_TO(RawCompressed, c_memory_address_)
2737+
RawTypeArguments* type_arguments_;
2738+
VISIT_TO(RawCompressed, type_arguments_)
27392739

27402740
friend class Pointer;
27412741
};

0 commit comments

Comments
 (0)