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 3611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3622 __ Load(result, mem_op, representation); | 3622 __ Load(result, mem_op, representation); |
3623 | 3623 |
3624 if (instr->hydrogen()->RequiresHoleCheck()) { | 3624 if (instr->hydrogen()->RequiresHoleCheck()) { |
3625 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { | 3625 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
3626 DeoptimizeIfNotSmi(result, instr, Deoptimizer::kNotASmi); | 3626 DeoptimizeIfNotSmi(result, instr, Deoptimizer::kNotASmi); |
3627 } else { | 3627 } else { |
3628 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, | 3628 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, |
3629 Deoptimizer::kHole); | 3629 Deoptimizer::kHole); |
3630 } | 3630 } |
3631 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3631 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
3632 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3632 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS || |
| 3633 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3633 Label done; | 3634 Label done; |
3634 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 3635 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
3635 __ B(ne, &done); | 3636 __ B(ne, &done); |
3636 if (info()->IsStub()) { | 3637 if (info()->IsStub()) { |
3637 // A stub can safely convert the hole to undefined only if the array | 3638 // A stub can safely convert the hole to undefined only if the array |
3638 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3639 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise |
3639 // it needs to bail out. | 3640 // it needs to bail out. |
3640 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3641 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
3641 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | 3642 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
3642 __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3643 __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); |
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6049 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6050 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6050 __ Push(scope_info); | 6051 __ Push(scope_info); |
6051 __ Push(ToRegister(instr->function())); | 6052 __ Push(ToRegister(instr->function())); |
6052 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6053 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6053 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6054 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6054 } | 6055 } |
6055 | 6056 |
6056 | 6057 |
6057 | 6058 |
6058 } } // namespace v8::internal | 6059 } } // namespace v8::internal |
OLD | NEW |