Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 7c1668f1fa11a0334beb6891e91582a365ab7615..b095119a53643c08010d91a4af50b7dfb5a6d6d8 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -5161,6 +5161,22 @@ void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
} |
+void LCodeGen::DoCheckArrayBufferNotNeutered( |
+ LCheckArrayBufferNotNeutered* instr) { |
+ Register view = ToRegister(instr->view()); |
+ |
+ Label has_no_buffer; |
+ __ movp(kScratchRegister, |
+ FieldOperand(view, JSArrayBufferView::kBufferOffset)); |
+ __ JumpIfSmi(kScratchRegister, &has_no_buffer); |
+ __ testb(FieldOperand(kScratchRegister, JSArrayBuffer::kBitFieldOffset), |
+ Immediate(1 << JSArrayBuffer::WasNeutered::kShift)); |
+ DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); |
Sven Panne
2015/04/28 13:45:16
Would it be worth introducing a new deopt message
|
+ |
+ __ bind(&has_no_buffer); |
+} |
+ |
+ |
void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
Register input = ToRegister(instr->value()); |