Commit 2e6db3af authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [wasm] adding case for kAttachedReference in Serializer/Deseriealizer

For PPC/s390 the case is missing where reference=attachedreference
how_to_code=kFromCode and  where_to_point=kStartOfObject. On PPC/s390
IsCodedSpecially always return true, hence how_to_code will not be a
straight pointer.
This should also fix the similar issue on mipsel.
The testcase was added as part of https://codereview.chromium.org/2205973003/

R=mtrofin@chromium.org, yangguo@chromium.org, titzer@chromium.org

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2247093002
Cr-Commit-Position: refs/heads/master@{#38789}
parent be23ef54
......@@ -649,6 +649,7 @@ bool Deserializer::ReadData(Object** current, Object** limit, int source_space,
// the current object.
SINGLE_CASE(kAttachedReference, kPlain, kStartOfObject, 0)
SINGLE_CASE(kAttachedReference, kPlain, kInnerPointer, 0)
SINGLE_CASE(kAttachedReference, kFromCode, kStartOfObject, 0)
SINGLE_CASE(kAttachedReference, kFromCode, kInnerPointer, 0)
// Find a builtin and write a pointer to it to the current object.
SINGLE_CASE(kBuiltin, kPlain, kStartOfObject, 0)
......
......@@ -248,6 +248,7 @@ void Serializer::PutAttachedReference(SerializerReference reference,
DCHECK(reference.is_attached_reference());
DCHECK((how_to_code == kPlain && where_to_point == kStartOfObject) ||
(how_to_code == kPlain && where_to_point == kInnerPointer) ||
(how_to_code == kFromCode && where_to_point == kStartOfObject) ||
(how_to_code == kFromCode && where_to_point == kInnerPointer));
sink_.Put(kAttachedReference + how_to_code + where_to_point, "AttachedRef");
sink_.PutInt(reference.attached_reference_index(), "AttachedRefIndex");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment