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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 1108313003: Add HArrayBufferNotNeutered instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 4955 matching lines...) Expand 10 before | Expand all | Expand 10 after
4966 4966
4967 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { 4967 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
4968 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 4968 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
4969 LOperand* input = instr->value(); 4969 LOperand* input = instr->value();
4970 __ test(ToOperand(input), Immediate(kSmiTagMask)); 4970 __ test(ToOperand(input), Immediate(kSmiTagMask));
4971 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); 4971 DeoptimizeIf(zero, instr, Deoptimizer::kSmi);
4972 } 4972 }
4973 } 4973 }
4974 4974
4975 4975
4976 void LCodeGen::DoCheckArrayBufferNotNeutered(
4977 LCheckArrayBufferNotNeutered* instr) {
4978 Register view = ToRegister(instr->view());
4979 Register scratch = ToRegister(instr->scratch());
4980
4981 Label has_no_buffer;
4982 __ mov(scratch, FieldOperand(view, JSArrayBufferView::kBufferOffset));
4983 __ JumpIfSmi(scratch, &has_no_buffer);
4984 __ test_b(FieldOperand(scratch, JSArrayBuffer::kBitFieldOffset),
4985 1 << JSArrayBuffer::WasNeutered::kShift);
4986 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds);
4987
4988 __ bind(&has_no_buffer);
4989 }
4990
4991
4976 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 4992 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
4977 Register input = ToRegister(instr->value()); 4993 Register input = ToRegister(instr->value());
4978 Register temp = ToRegister(instr->temp()); 4994 Register temp = ToRegister(instr->temp());
4979 4995
4980 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); 4996 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset));
4981 4997
4982 if (instr->hydrogen()->is_interval_check()) { 4998 if (instr->hydrogen()->is_interval_check()) {
4983 InstanceType first; 4999 InstanceType first;
4984 InstanceType last; 5000 InstanceType last;
4985 instr->hydrogen()->GetCheckInterval(&first, &last); 5001 instr->hydrogen()->GetCheckInterval(&first, &last);
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
5755 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5771 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5756 RecordSafepoint(Safepoint::kNoLazyDeopt); 5772 RecordSafepoint(Safepoint::kNoLazyDeopt);
5757 } 5773 }
5758 5774
5759 5775
5760 #undef __ 5776 #undef __
5761 5777
5762 } } // namespace v8::internal 5778 } } // namespace v8::internal
5763 5779
5764 #endif // V8_TARGET_ARCH_IA32 5780 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698