| 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 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2890 } | 2890 } |
| 2891 | 2891 |
| 2892 | 2892 |
| 2893 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 2893 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
| 2894 Register object = ToRegister(instr->object()); | 2894 Register object = ToRegister(instr->object()); |
| 2895 Register null_value = x5; | 2895 Register null_value = x5; |
| 2896 | 2896 |
| 2897 DCHECK(instr->IsMarkedAsCall()); | 2897 DCHECK(instr->IsMarkedAsCall()); |
| 2898 DCHECK(object.Is(x0)); | 2898 DCHECK(object.Is(x0)); |
| 2899 | 2899 |
| 2900 DeoptimizeIfRoot(object, Heap::kUndefinedValueRootIndex, instr, | |
| 2901 Deoptimizer::kUndefined); | |
| 2902 | |
| 2903 __ LoadRoot(null_value, Heap::kNullValueRootIndex); | |
| 2904 __ Cmp(object, null_value); | |
| 2905 DeoptimizeIf(eq, instr, Deoptimizer::kNull); | |
| 2906 | |
| 2907 DeoptimizeIfSmi(object, instr, Deoptimizer::kSmi); | 2900 DeoptimizeIfSmi(object, instr, Deoptimizer::kSmi); |
| 2908 | 2901 |
| 2909 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 2902 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
| 2910 __ CompareObjectType(object, x1, x1, LAST_JS_PROXY_TYPE); | 2903 __ CompareObjectType(object, x1, x1, LAST_JS_PROXY_TYPE); |
| 2911 DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject); | 2904 DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject); |
| 2912 | 2905 |
| 2913 Label use_cache, call_runtime; | 2906 Label use_cache, call_runtime; |
| 2907 __ LoadRoot(null_value, Heap::kNullValueRootIndex); |
| 2914 __ CheckEnumCache(object, null_value, x1, x2, x3, x4, &call_runtime); | 2908 __ CheckEnumCache(object, null_value, x1, x2, x3, x4, &call_runtime); |
| 2915 | 2909 |
| 2916 __ Ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 2910 __ Ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 2917 __ B(&use_cache); | 2911 __ B(&use_cache); |
| 2918 | 2912 |
| 2919 // Get the set of properties to enumerate. | 2913 // Get the set of properties to enumerate. |
| 2920 __ Bind(&call_runtime); | 2914 __ Bind(&call_runtime); |
| 2921 __ Push(object); | 2915 __ Push(object); |
| 2922 CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr); | 2916 CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr); |
| 2923 | 2917 |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6017 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6011 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 6018 __ Push(scope_info); | 6012 __ Push(scope_info); |
| 6019 __ Push(ToRegister(instr->function())); | 6013 __ Push(ToRegister(instr->function())); |
| 6020 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6014 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6021 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6015 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6022 } | 6016 } |
| 6023 | 6017 |
| 6024 | 6018 |
| 6025 | 6019 |
| 6026 } } // namespace v8::internal | 6020 } } // namespace v8::internal |
| OLD | NEW |