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

Unified Diff: src/arm64/lithium-codegen-arm64.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
Index: src/arm64/lithium-codegen-arm64.cc
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc
index 13da0b99b1fad3d81514f65db56d079c7c6d1480..badd1773748e580f44b3ef3e0ba8dc71de0d4239 100644
--- a/src/arm64/lithium-codegen-arm64.cc
+++ b/src/arm64/lithium-codegen-arm64.cc
@@ -2229,6 +2229,23 @@ void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
}
+void LCodeGen::DoCheckArrayBufferNotNeutered(
+ LCheckArrayBufferNotNeutered* instr) {
+ UseScratchRegisterScope temps(masm());
+ Register view = ToRegister(instr->view());
+ Register scratch = temps.AcquireX();
+
+ 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 = ToRegister(instr->temp());
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | src/x64/lithium-codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698