Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 667646474a9f9e4fff164d2703aa56e9dee3e9c9..fc33139cb01b0be2b882728f9f061a8ecc5f44e5 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -5154,6 +5154,22 @@ void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
} |
+void LCodeGen::DoCheckArrayBufferNotNeutered( |
+ LCheckArrayBufferNotNeutered* instr) { |
+ Register view = ToRegister(instr->view()); |
+ Register scratch = scratch0(); |
+ |
+ 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 = scratch0(); |