Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 13da0b99b1fad3d81514f65db56d079c7c6d1480..badd1773748e580f44b3ef3e0ba8dc71de0d4239 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -2229,6 +2229,23 @@ void LCodeGen::DoCheckSmi(LCheckSmi* instr) { |
} |
+void LCodeGen::DoCheckArrayBufferNotNeutered( |
+ LCheckArrayBufferNotNeutered* instr) { |
+ UseScratchRegisterScope temps(masm()); |
+ Register view = ToRegister(instr->view()); |
+ Register scratch = temps.AcquireX(); |
+ |
+ Label has_no_buffer; |
+ __ Ldr(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
+ __ JumpIfSmi(scratch, &has_no_buffer); |
+ __ Ldr(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
+ __ Tst(scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift)); |
+ DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds); |
+ |
+ __ Bind(&has_no_buffer); |
+} |
+ |
+ |
void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
Register input = ToRegister(instr->value()); |
Register scratch = ToRegister(instr->temp()); |