| Index: src/wasm/encoder.h
|
| diff --git a/src/wasm/encoder.h b/src/wasm/encoder.h
|
| index 19fc39703d63ef1f8add9036f4e42b9a001e4a41..ea4dbe0d424ed6637a96fa15a0437790396a2876 100644
|
| --- a/src/wasm/encoder.h
|
| +++ b/src/wasm/encoder.h
|
| @@ -36,25 +36,13 @@ class ZoneBuffer : public ZoneObject {
|
|
|
| void write_u16(uint16_t x) {
|
| EnsureSpace(2);
|
| -#if V8_TARGET_LITTLE_ENDIAN
|
| - WriteUnalignedUInt16(pos_, x);
|
| -#else
|
| - pos_[0] = x & 0xff;
|
| - pos_[1] = (x >> 8) & 0xff;
|
| -#endif
|
| + WriteLittleEndianValue<uint16_t>(pos_, x);
|
| pos_ += 2;
|
| }
|
|
|
| void write_u32(uint32_t x) {
|
| EnsureSpace(4);
|
| -#if V8_TARGET_LITTLE_ENDIAN
|
| - WriteUnalignedUInt32(pos_, x);
|
| -#else
|
| - pos_[0] = x & 0xff;
|
| - pos_[1] = (x >> 8) & 0xff;
|
| - pos_[2] = (x >> 16) & 0xff;
|
| - pos_[3] = (x >> 24) & 0xff;
|
| -#endif
|
| + WriteLittleEndianValue<uint32_t>(pos_, x);
|
| pos_ += 4;
|
| }
|
|
|
|
|