OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
7 | 7 |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3002 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); | 3002 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); |
3003 } | 3003 } |
3004 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3004 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
3005 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3005 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3006 Label done; | 3006 Label done; |
3007 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3007 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
3008 __ CmpP(result, scratch); | 3008 __ CmpP(result, scratch); |
3009 __ bne(&done); | 3009 __ bne(&done); |
3010 if (info()->IsStub()) { | 3010 if (info()->IsStub()) { |
3011 // A stub can safely convert the hole to undefined only if the array | 3011 // A stub can safely convert the hole to undefined only if the array |
3012 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3012 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise |
3013 // it needs to bail out. | 3013 // it needs to bail out. |
3014 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3014 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
3015 __ LoadP(result, FieldMemOperand(result, Cell::kValueOffset)); | 3015 __ LoadP(result, FieldMemOperand(result, Cell::kValueOffset)); |
3016 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kArrayProtectorValid), r0); | 3016 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kProtectorValid), r0); |
3017 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); | 3017 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); |
3018 } | 3018 } |
3019 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 3019 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
3020 __ bind(&done); | 3020 __ bind(&done); |
3021 } | 3021 } |
3022 } | 3022 } |
3023 | 3023 |
3024 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 3024 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
3025 if (instr->is_fixed_typed_array()) { | 3025 if (instr->is_fixed_typed_array()) { |
3026 DoLoadKeyedExternalArray(instr); | 3026 DoLoadKeyedExternalArray(instr); |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5560 __ LoadP(result, | 5560 __ LoadP(result, |
5561 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5561 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5562 __ bind(deferred->exit()); | 5562 __ bind(deferred->exit()); |
5563 __ bind(&done); | 5563 __ bind(&done); |
5564 } | 5564 } |
5565 | 5565 |
5566 #undef __ | 5566 #undef __ |
5567 | 5567 |
5568 } // namespace internal | 5568 } // namespace internal |
5569 } // namespace v8 | 5569 } // namespace v8 |
OLD | NEW |