OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 5412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5423 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, cr0); | 5423 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, cr0); |
5424 } | 5424 } |
5425 } | 5425 } |
5426 | 5426 |
5427 | 5427 |
5428 void LCodeGen::DoCheckArrayBufferNotNeutered( | 5428 void LCodeGen::DoCheckArrayBufferNotNeutered( |
5429 LCheckArrayBufferNotNeutered* instr) { | 5429 LCheckArrayBufferNotNeutered* instr) { |
5430 Register view = ToRegister(instr->view()); | 5430 Register view = ToRegister(instr->view()); |
5431 Register scratch = scratch0(); | 5431 Register scratch = scratch0(); |
5432 | 5432 |
5433 Label has_no_buffer; | |
5434 __ LoadP(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); | 5433 __ LoadP(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
5435 __ JumpIfSmi(scratch, &has_no_buffer); | |
5436 __ lwz(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); | 5434 __ lwz(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
5437 __ andi(r0, scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift)); | 5435 __ andi(r0, scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift)); |
5438 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds, cr0); | 5436 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds, cr0); |
5439 | |
5440 __ bind(&has_no_buffer); | |
5441 } | 5437 } |
5442 | 5438 |
5443 | 5439 |
5444 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5440 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
5445 Register input = ToRegister(instr->value()); | 5441 Register input = ToRegister(instr->value()); |
5446 Register scratch = scratch0(); | 5442 Register scratch = scratch0(); |
5447 | 5443 |
5448 __ LoadP(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); | 5444 __ LoadP(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); |
5449 __ lbz(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 5445 __ lbz(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
5450 | 5446 |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6209 __ Push(scope_info); | 6205 __ Push(scope_info); |
6210 __ push(ToRegister(instr->function())); | 6206 __ push(ToRegister(instr->function())); |
6211 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6207 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6212 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6208 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6213 } | 6209 } |
6214 | 6210 |
6215 | 6211 |
6216 #undef __ | 6212 #undef __ |
6217 } | 6213 } |
6218 } // namespace v8::internal | 6214 } // namespace v8::internal |
OLD | NEW |