Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 5af19d01ef4d5592c2498c92001d805b1e68ac59..d4b8b6186d677e50e8fd1098a1e944421b2a7e1e 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -4973,6 +4973,22 @@ void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
} |
+void LCodeGen::DoCheckArrayBufferNotNeutered( |
+ LCheckArrayBufferNotNeutered* instr) { |
+ Register view = ToRegister(instr->view()); |
+ Register scratch = ToRegister(instr->scratch()); |
+ |
+ Label has_no_buffer; |
+ __ mov(scratch, FieldOperand(view, JSArrayBufferView::kBufferOffset)); |
+ __ JumpIfSmi(scratch, &has_no_buffer); |
+ __ test_b(FieldOperand(scratch, JSArrayBuffer::kBitFieldOffset), |
+ 1 << JSArrayBuffer::WasNeutered::kShift); |
+ DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); |
+ |
+ __ bind(&has_no_buffer); |
+} |
+ |
+ |
void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
Register input = ToRegister(instr->value()); |
Register temp = ToRegister(instr->temp()); |