@@ -924,13 +924,27 @@ class V8_EXPORT_PRIVATE CodeAssembler {
924924 return UncheckedCast<Type>(UnalignedLoad (mt, base, offset));
925925 }
926926
927+ template <typename Type>
928+ TNode<Type> UnalignedLoad (TNode<BytecodeArray> base, TNode<IntPtrT> offset) {
929+ MachineType type = MachineTypeOf<Type>::value;
930+ if (UnalignedLoadSupported (type.representation ())) {
931+ return UncheckedCast<Type>(Load (type, base, offset));
932+ } else {
933+ TNode<RawPtrT> base_raw = BitcastTaggedToWord (base);
934+ return UncheckedCast<Type>(UnalignedLoad (type, base_raw, offset));
935+ }
936+ }
937+
927938 // Store value to raw memory location.
928939 void Store (Node* base, Node* value);
929940 void Store (Node* base, Node* offset, Node* value);
930941 void StoreEphemeronKey (Node* base, Node* offset, Node* value);
931942 void StoreNoWriteBarrier (MachineRepresentation rep, Node* base, Node* value);
932943 void StoreNoWriteBarrier (MachineRepresentation rep, Node* base, Node* offset,
933944 Node* value);
945+ void UnalignedStoreNoWriteBarrier (MachineRepresentation rep,
946+ TNode<BytecodeArray> base,
947+ TNode<IntPtrT> offset, Node* value);
934948 void UnsafeStoreNoWriteBarrier (MachineRepresentation rep, Node* base,
935949 Node* value);
936950 void UnsafeStoreNoWriteBarrier (MachineRepresentation rep, Node* base,
0 commit comments