| 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/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 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 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 __ Ldr(result, FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); | 2709 __ Ldr(result, FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
| 2710 __ Ldr(result, FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 2710 __ Ldr(result, FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
| 2711 DeoptimizeIfZero(result, instr, Deoptimizer::kNoCache); | 2711 DeoptimizeIfZero(result, instr, Deoptimizer::kNoCache); |
| 2712 | 2712 |
| 2713 __ Bind(&done); | 2713 __ Bind(&done); |
| 2714 } | 2714 } |
| 2715 | 2715 |
| 2716 | 2716 |
| 2717 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 2717 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
| 2718 Register object = ToRegister(instr->object()); | 2718 Register object = ToRegister(instr->object()); |
| 2719 Register null_value = x5; | |
| 2720 | 2719 |
| 2721 DCHECK(instr->IsMarkedAsCall()); | 2720 DCHECK(instr->IsMarkedAsCall()); |
| 2722 DCHECK(object.Is(x0)); | 2721 DCHECK(object.Is(x0)); |
| 2723 | 2722 |
| 2724 DeoptimizeIfSmi(object, instr, Deoptimizer::kSmi); | |
| 2725 | |
| 2726 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | |
| 2727 __ CompareObjectType(object, x1, x1, JS_PROXY_TYPE); | |
| 2728 DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject); | |
| 2729 | |
| 2730 Label use_cache, call_runtime; | 2723 Label use_cache, call_runtime; |
| 2731 __ LoadRoot(null_value, Heap::kNullValueRootIndex); | 2724 __ CheckEnumCache(object, x5, x1, x2, x3, x4, &call_runtime); |
| 2732 __ CheckEnumCache(object, null_value, x1, x2, x3, x4, &call_runtime); | |
| 2733 | 2725 |
| 2734 __ Ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 2726 __ Ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 2735 __ B(&use_cache); | 2727 __ B(&use_cache); |
| 2736 | 2728 |
| 2737 // Get the set of properties to enumerate. | 2729 // Get the set of properties to enumerate. |
| 2738 __ Bind(&call_runtime); | 2730 __ Bind(&call_runtime); |
| 2739 __ Push(object); | 2731 __ Push(object); |
| 2740 CallRuntime(Runtime::kGetPropertyNamesFast, instr); | 2732 CallRuntime(Runtime::kGetPropertyNamesFast, instr); |
| 2741 | |
| 2742 __ Ldr(x1, FieldMemOperand(object, HeapObject::kMapOffset)); | |
| 2743 DeoptimizeIfNotRoot(x1, Heap::kMetaMapRootIndex, instr, | |
| 2744 Deoptimizer::kWrongMap); | |
| 2745 | |
| 2746 __ Bind(&use_cache); | 2733 __ Bind(&use_cache); |
| 2747 } | 2734 } |
| 2748 | 2735 |
| 2749 | 2736 |
| 2750 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { | 2737 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { |
| 2751 Register input = ToRegister(instr->value()); | 2738 Register input = ToRegister(instr->value()); |
| 2752 Register result = ToRegister(instr->result()); | 2739 Register result = ToRegister(instr->result()); |
| 2753 | 2740 |
| 2754 __ AssertString(input); | 2741 __ AssertString(input); |
| 2755 | 2742 |
| (...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5780 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5767 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 5781 __ Push(scope_info); | 5768 __ Push(scope_info); |
| 5782 __ Push(ToRegister(instr->function())); | 5769 __ Push(ToRegister(instr->function())); |
| 5783 CallRuntime(Runtime::kPushBlockContext, instr); | 5770 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5784 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5771 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5785 } | 5772 } |
| 5786 | 5773 |
| 5787 | 5774 |
| 5788 } // namespace internal | 5775 } // namespace internal |
| 5789 } // namespace v8 | 5776 } // namespace v8 |
| OLD | NEW |