Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1946)

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 1108313003: Add HArrayBufferNotNeutered instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ppc/lithium-ppc.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/ppc/lithium-ppc.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698