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 5479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5490 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); | 5490 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); |
5491 } | 5491 } |
5492 } | 5492 } |
5493 | 5493 |
5494 | 5494 |
5495 void LCodeGen::DoCheckArrayBufferNotNeutered( | 5495 void LCodeGen::DoCheckArrayBufferNotNeutered( |
5496 LCheckArrayBufferNotNeutered* instr) { | 5496 LCheckArrayBufferNotNeutered* instr) { |
5497 Register view = ToRegister(instr->view()); | 5497 Register view = ToRegister(instr->view()); |
5498 Register scratch = ToRegister(instr->scratch()); | 5498 Register scratch = ToRegister(instr->scratch()); |
5499 | 5499 |
5500 Label has_no_buffer; | |
5501 __ mov(scratch, FieldOperand(view, JSArrayBufferView::kBufferOffset)); | 5500 __ mov(scratch, FieldOperand(view, JSArrayBufferView::kBufferOffset)); |
5502 __ JumpIfSmi(scratch, &has_no_buffer); | |
5503 __ test_b(FieldOperand(scratch, JSArrayBuffer::kBitFieldOffset), | 5501 __ test_b(FieldOperand(scratch, JSArrayBuffer::kBitFieldOffset), |
5504 1 << JSArrayBuffer::WasNeutered::kShift); | 5502 1 << JSArrayBuffer::WasNeutered::kShift); |
5505 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); | 5503 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); |
5506 | |
5507 __ bind(&has_no_buffer); | |
5508 } | 5504 } |
5509 | 5505 |
5510 | 5506 |
5511 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5507 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
5512 Register input = ToRegister(instr->value()); | 5508 Register input = ToRegister(instr->value()); |
5513 Register temp = ToRegister(instr->temp()); | 5509 Register temp = ToRegister(instr->temp()); |
5514 | 5510 |
5515 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); | 5511 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); |
5516 | 5512 |
5517 if (instr->hydrogen()->is_interval_check()) { | 5513 if (instr->hydrogen()->is_interval_check()) { |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6379 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6375 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6380 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6376 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6381 } | 6377 } |
6382 | 6378 |
6383 | 6379 |
6384 #undef __ | 6380 #undef __ |
6385 | 6381 |
6386 } } // namespace v8::internal | 6382 } } // namespace v8::internal |
6387 | 6383 |
6388 #endif // V8_TARGET_ARCH_X87 | 6384 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |