OLD | NEW |
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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 5458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5469 | 5469 |
5470 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { | 5470 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
5471 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 5471 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
5472 LOperand* input = instr->value(); | 5472 LOperand* input = instr->value(); |
5473 __ test(ToOperand(input), Immediate(kSmiTagMask)); | 5473 __ test(ToOperand(input), Immediate(kSmiTagMask)); |
5474 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); | 5474 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); |
5475 } | 5475 } |
5476 } | 5476 } |
5477 | 5477 |
5478 | 5478 |
| 5479 void LCodeGen::DoCheckArrayBufferNotNeutered( |
| 5480 LCheckArrayBufferNotNeutered* instr) { |
| 5481 Register view = ToRegister(instr->view()); |
| 5482 Register scratch = ToRegister(instr->scratch()); |
| 5483 |
| 5484 Label has_no_buffer; |
| 5485 __ mov(scratch, FieldOperand(view, JSArrayBufferView::kBufferOffset)); |
| 5486 __ JumpIfSmi(scratch, &has_no_buffer); |
| 5487 __ test_b(FieldOperand(scratch, JSArrayBuffer::kBitFieldOffset), |
| 5488 1 << JSArrayBuffer::WasNeutered::kShift); |
| 5489 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); |
| 5490 |
| 5491 __ bind(&has_no_buffer); |
| 5492 } |
| 5493 |
| 5494 |
5479 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5495 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
5480 Register input = ToRegister(instr->value()); | 5496 Register input = ToRegister(instr->value()); |
5481 Register temp = ToRegister(instr->temp()); | 5497 Register temp = ToRegister(instr->temp()); |
5482 | 5498 |
5483 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); | 5499 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); |
5484 | 5500 |
5485 if (instr->hydrogen()->is_interval_check()) { | 5501 if (instr->hydrogen()->is_interval_check()) { |
5486 InstanceType first; | 5502 InstanceType first; |
5487 InstanceType last; | 5503 InstanceType last; |
5488 instr->hydrogen()->GetCheckInterval(&first, &last); | 5504 instr->hydrogen()->GetCheckInterval(&first, &last); |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6347 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6363 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6348 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6364 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6349 } | 6365 } |
6350 | 6366 |
6351 | 6367 |
6352 #undef __ | 6368 #undef __ |
6353 | 6369 |
6354 } } // namespace v8::internal | 6370 } } // namespace v8::internal |
6355 | 6371 |
6356 #endif // V8_TARGET_ARCH_X87 | 6372 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |