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 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
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 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2228 DeoptimizeIfNotSmi(value, instr, Deoptimizer::kNotASmi); | 2228 DeoptimizeIfNotSmi(value, instr, Deoptimizer::kNotASmi); |
2229 } | 2229 } |
2230 | 2230 |
2231 | 2231 |
2232 void LCodeGen::DoCheckArrayBufferNotNeutered( | 2232 void LCodeGen::DoCheckArrayBufferNotNeutered( |
2233 LCheckArrayBufferNotNeutered* instr) { | 2233 LCheckArrayBufferNotNeutered* instr) { |
2234 UseScratchRegisterScope temps(masm()); | 2234 UseScratchRegisterScope temps(masm()); |
2235 Register view = ToRegister(instr->view()); | 2235 Register view = ToRegister(instr->view()); |
2236 Register scratch = temps.AcquireX(); | 2236 Register scratch = temps.AcquireX(); |
2237 | 2237 |
2238 Label has_no_buffer; | |
2239 __ Ldr(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); | 2238 __ Ldr(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
2240 __ JumpIfSmi(scratch, &has_no_buffer); | |
2241 __ Ldr(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); | 2239 __ Ldr(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
2242 __ Tst(scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift)); | 2240 __ Tst(scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift)); |
2243 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds); | 2241 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds); |
2244 | |
2245 __ Bind(&has_no_buffer); | |
2246 } | 2242 } |
2247 | 2243 |
2248 | 2244 |
2249 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 2245 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
2250 Register input = ToRegister(instr->value()); | 2246 Register input = ToRegister(instr->value()); |
2251 Register scratch = ToRegister(instr->temp()); | 2247 Register scratch = ToRegister(instr->temp()); |
2252 | 2248 |
2253 __ Ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); | 2249 __ Ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); |
2254 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 2250 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
2255 | 2251 |
(...skipping 3789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6045 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6041 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6046 __ Push(scope_info); | 6042 __ Push(scope_info); |
6047 __ Push(ToRegister(instr->function())); | 6043 __ Push(ToRegister(instr->function())); |
6048 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6044 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6049 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6045 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6050 } | 6046 } |
6051 | 6047 |
6052 | 6048 |
6053 | 6049 |
6054 } } // namespace v8::internal | 6050 } } // namespace v8::internal |
OLD | NEW |