Index: src/ppc/lithium-codegen-ppc.cc |
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc |
index ae58f31ea396c75a16e3016dc574690b29861c19..c34718bad5b86b04cb897174a1936ca973de3eaa 100644 |
--- a/src/ppc/lithium-codegen-ppc.cc |
+++ b/src/ppc/lithium-codegen-ppc.cc |
@@ -5425,6 +5425,22 @@ void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
} |
+void LCodeGen::DoCheckArrayBufferNotNeutered( |
+ LCheckArrayBufferNotNeutered* instr) { |
+ Register view = ToRegister(instr->view()); |
+ Register scratch = scratch0(); |
+ |
+ Label has_no_buffer; |
+ __ LoadP(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
+ __ JumpIfSmi(scratch, &has_no_buffer); |
+ __ LoadP(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
+ __ andi(r0, 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(); |