[ptr-compr][wasm] Adding TypeCompressedTaggedXXX uses

We are changing all heap Tagged loads and stores to used the Compressed
representation. From this point forward,
MachineType::TypeCompressedTaggedXXX has to be used instead of
MachineType::TaggedXXX.

This function was added in the middle of my CLs and therefore was not
included in my wasm CL.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977, v8:7703
Change-Id: If3973d436ae04520b36d0f442b7886a58ac901ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1601137
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61325}
This commit is contained in:
Santiago Aboy Solanes 2019-05-08 11:41:50 +01:00 committed by Commit Bot
parent c19ff9027f
commit 2e1fe0760a

View File

@ -4807,20 +4807,23 @@ Node* WasmGraphBuilder::TableGrow(uint32_t table_index, Node* value,
}
Node* WasmGraphBuilder::TableSize(uint32_t table_index) {
Node* tables = LOAD_INSTANCE_FIELD(Tables, MachineType::TaggedPointer());
Node* tables =
LOAD_INSTANCE_FIELD(Tables, MachineType::TypeCompressedTaggedPointer());
Node* table = LOAD_FIXED_ARRAY_SLOT_ANY(tables, table_index);
int storage_field_size = WasmTableObject::kElementsOffsetEnd -
WasmTableObject::kElementsOffset + 1;
Node* storage = LOAD_RAW(
table, wasm::ObjectAccess::ToTagged(WasmTableObject::kEntriesOffset),
assert_size(storage_field_size, MachineType::TaggedPointer()));
assert_size(storage_field_size,
MachineType::TypeCompressedTaggedPointer()));
int length_field_size =
FixedArray::kLengthOffsetEnd - FixedArray::kLengthOffset + 1;
Node* table_size =
LOAD_RAW(storage, wasm::ObjectAccess::ToTagged(FixedArray::kLengthOffset),
assert_size(length_field_size, MachineType::TaggedSigned()));
assert_size(length_field_size,
MachineType::TypeCompressedTaggedSigned()));
return BuildChangeSmiToInt32(table_size);
}