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 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2017 Register receiver = ToRegister(instr->receiver()); | 2017 Register receiver = ToRegister(instr->receiver()); |
2018 Register name = ToRegister(instr->name()); | 2018 Register name = ToRegister(instr->name()); |
2019 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister())); | 2019 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister())); |
2020 DCHECK(name.is(LoadDescriptor::NameRegister())); | 2020 DCHECK(name.is(LoadDescriptor::NameRegister())); |
2021 DCHECK(receiver.is(x1)); | 2021 DCHECK(receiver.is(x1)); |
2022 DCHECK(name.is(x2)); | 2022 DCHECK(name.is(x2)); |
2023 Register scratch = x4; | 2023 Register scratch = x4; |
2024 Register extra = x5; | 2024 Register extra = x5; |
2025 Register extra2 = x6; | 2025 Register extra2 = x6; |
2026 Register extra3 = x7; | 2026 Register extra3 = x7; |
2027 DCHECK(!FLAG_vector_ics || | |
2028 !AreAliased(ToRegister(instr->slot()), ToRegister(instr->vector()), | |
2029 scratch, extra, extra2, extra3)); | |
2030 | 2027 |
2031 // Important for the tail-call. | 2028 // The probe will tail call to a handler if found. |
2032 bool must_teardown_frame = NeedsEagerFrame(); | 2029 isolate()->stub_cache()->GenerateProbe( |
2033 | 2030 masm(), Code::LOAD_IC, instr->hydrogen()->flags(), false, receiver, name, |
2034 if (!instr->hydrogen()->is_just_miss()) { | 2031 scratch, extra, extra2, extra3); |
2035 DCHECK(!instr->hydrogen()->is_keyed_load()); | |
2036 | |
2037 // The probe will tail call to a handler if found. | |
2038 isolate()->stub_cache()->GenerateProbe( | |
2039 masm(), Code::LOAD_IC, instr->hydrogen()->flags(), must_teardown_frame, | |
2040 receiver, name, scratch, extra, extra2, extra3); | |
2041 } | |
2042 | 2032 |
2043 // Tail call to miss if we ended up here. | 2033 // Tail call to miss if we ended up here. |
2044 if (must_teardown_frame) __ LeaveFrame(StackFrame::INTERNAL); | 2034 LoadIC::GenerateMiss(masm()); |
2045 if (instr->hydrogen()->is_keyed_load()) { | |
2046 KeyedLoadIC::GenerateMiss(masm()); | |
2047 } else { | |
2048 LoadIC::GenerateMiss(masm()); | |
2049 } | |
2050 } | 2035 } |
2051 | 2036 |
2052 | 2037 |
2053 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { | 2038 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { |
2054 DCHECK(instr->IsMarkedAsCall()); | 2039 DCHECK(instr->IsMarkedAsCall()); |
2055 DCHECK(ToRegister(instr->result()).Is(x0)); | 2040 DCHECK(ToRegister(instr->result()).Is(x0)); |
2056 | 2041 |
2057 if (instr->hydrogen()->IsTailCall()) { | 2042 if (instr->hydrogen()->IsTailCall()) { |
2058 if (NeedsEagerFrame()) __ LeaveFrame(StackFrame::INTERNAL); | 2043 if (NeedsEagerFrame()) __ LeaveFrame(StackFrame::INTERNAL); |
2059 | 2044 |
(...skipping 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6023 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6008 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6024 __ Push(scope_info); | 6009 __ Push(scope_info); |
6025 __ Push(ToRegister(instr->function())); | 6010 __ Push(ToRegister(instr->function())); |
6026 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6011 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6027 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6012 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6028 } | 6013 } |
6029 | 6014 |
6030 | 6015 |
6031 | 6016 |
6032 } } // namespace v8::internal | 6017 } } // namespace v8::internal |
OLD | NEW |