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/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, | 2965 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, |
2966 Operand(scratch)); | 2966 Operand(scratch)); |
2967 } | 2967 } |
2968 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 2968 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
2969 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 2969 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
2970 Label done; | 2970 Label done; |
2971 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 2971 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
2972 __ Branch(&done, ne, result, Operand(scratch)); | 2972 __ Branch(&done, ne, result, Operand(scratch)); |
2973 if (info()->IsStub()) { | 2973 if (info()->IsStub()) { |
2974 // A stub can safely convert the hole to undefined only if the array | 2974 // A stub can safely convert the hole to undefined only if the array |
2975 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 2975 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise |
2976 // it needs to bail out. | 2976 // it needs to bail out. |
2977 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 2977 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
2978 // The comparison only needs LS bits of value, which is a smi. | 2978 // The comparison only needs LS bits of value, which is a smi. |
2979 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); | 2979 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); |
2980 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole, result, | 2980 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole, result, |
2981 Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); | 2981 Operand(Smi::FromInt(Isolate::kProtectorValid))); |
2982 } | 2982 } |
2983 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 2983 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
2984 __ bind(&done); | 2984 __ bind(&done); |
2985 } | 2985 } |
2986 } | 2986 } |
2987 | 2987 |
2988 | 2988 |
2989 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 2989 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
2990 if (instr->is_fixed_typed_array()) { | 2990 if (instr->is_fixed_typed_array()) { |
2991 DoLoadKeyedExternalArray(instr); | 2991 DoLoadKeyedExternalArray(instr); |
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5621 __ ld(result, FieldMemOperand(scratch, | 5621 __ ld(result, FieldMemOperand(scratch, |
5622 FixedArray::kHeaderSize - kPointerSize)); | 5622 FixedArray::kHeaderSize - kPointerSize)); |
5623 __ bind(deferred->exit()); | 5623 __ bind(deferred->exit()); |
5624 __ bind(&done); | 5624 __ bind(&done); |
5625 } | 5625 } |
5626 | 5626 |
5627 #undef __ | 5627 #undef __ |
5628 | 5628 |
5629 } // namespace internal | 5629 } // namespace internal |
5630 } // namespace v8 | 5630 } // namespace v8 |
OLD | NEW |