OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 5147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5158 Condition cc = masm()->CheckSmi(ToRegister(input)); | 5158 Condition cc = masm()->CheckSmi(ToRegister(input)); |
5159 DeoptimizeIf(cc, instr, Deoptimizer::kSmi); | 5159 DeoptimizeIf(cc, instr, Deoptimizer::kSmi); |
5160 } | 5160 } |
5161 } | 5161 } |
5162 | 5162 |
5163 | 5163 |
5164 void LCodeGen::DoCheckArrayBufferNotNeutered( | 5164 void LCodeGen::DoCheckArrayBufferNotNeutered( |
5165 LCheckArrayBufferNotNeutered* instr) { | 5165 LCheckArrayBufferNotNeutered* instr) { |
5166 Register view = ToRegister(instr->view()); | 5166 Register view = ToRegister(instr->view()); |
5167 | 5167 |
5168 Label has_no_buffer; | |
5169 __ movp(kScratchRegister, | 5168 __ movp(kScratchRegister, |
5170 FieldOperand(view, JSArrayBufferView::kBufferOffset)); | 5169 FieldOperand(view, JSArrayBufferView::kBufferOffset)); |
5171 __ JumpIfSmi(kScratchRegister, &has_no_buffer); | |
5172 __ testb(FieldOperand(kScratchRegister, JSArrayBuffer::kBitFieldOffset), | 5170 __ testb(FieldOperand(kScratchRegister, JSArrayBuffer::kBitFieldOffset), |
5173 Immediate(1 << JSArrayBuffer::WasNeutered::kShift)); | 5171 Immediate(1 << JSArrayBuffer::WasNeutered::kShift)); |
5174 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); | 5172 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); |
5175 | |
5176 __ bind(&has_no_buffer); | |
5177 } | 5173 } |
5178 | 5174 |
5179 | 5175 |
5180 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5176 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
5181 Register input = ToRegister(instr->value()); | 5177 Register input = ToRegister(instr->value()); |
5182 | 5178 |
5183 __ movp(kScratchRegister, FieldOperand(input, HeapObject::kMapOffset)); | 5179 __ movp(kScratchRegister, FieldOperand(input, HeapObject::kMapOffset)); |
5184 | 5180 |
5185 if (instr->hydrogen()->is_interval_check()) { | 5181 if (instr->hydrogen()->is_interval_check()) { |
5186 InstanceType first; | 5182 InstanceType first; |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5949 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5945 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5950 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5946 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5951 } | 5947 } |
5952 | 5948 |
5953 | 5949 |
5954 #undef __ | 5950 #undef __ |
5955 | 5951 |
5956 } } // namespace v8::internal | 5952 } } // namespace v8::internal |
5957 | 5953 |
5958 #endif // V8_TARGET_ARCH_X64 | 5954 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |