| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.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 3939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3950 Register name = ToRegister(instr->name()); | 3950 Register name = ToRegister(instr->name()); |
| 3951 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister())); | 3951 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister())); |
| 3952 DCHECK(name.is(LoadDescriptor::NameRegister())); | 3952 DCHECK(name.is(LoadDescriptor::NameRegister())); |
| 3953 DCHECK(receiver.is(r1)); | 3953 DCHECK(receiver.is(r1)); |
| 3954 DCHECK(name.is(r2)); | 3954 DCHECK(name.is(r2)); |
| 3955 Register scratch = r4; | 3955 Register scratch = r4; |
| 3956 Register extra = r5; | 3956 Register extra = r5; |
| 3957 Register extra2 = r6; | 3957 Register extra2 = r6; |
| 3958 Register extra3 = r9; | 3958 Register extra3 = r9; |
| 3959 | 3959 |
| 3960 #ifdef DEBUG | 3960 // The probe will tail call to a handler if found. |
| 3961 Register slot = FLAG_vector_ics ? ToRegister(instr->slot()) : no_reg; | 3961 isolate()->stub_cache()->GenerateProbe( |
| 3962 Register vector = FLAG_vector_ics ? ToRegister(instr->vector()) : no_reg; | 3962 masm(), Code::LOAD_IC, instr->hydrogen()->flags(), false, receiver, name, |
| 3963 DCHECK(!FLAG_vector_ics || | 3963 scratch, extra, extra2, extra3); |
| 3964 !AreAliased(slot, vector, scratch, extra, extra2, extra3)); | |
| 3965 #endif | |
| 3966 | |
| 3967 // Important for the tail-call. | |
| 3968 bool must_teardown_frame = NeedsEagerFrame(); | |
| 3969 | |
| 3970 if (!instr->hydrogen()->is_just_miss()) { | |
| 3971 DCHECK(!instr->hydrogen()->is_keyed_load()); | |
| 3972 | |
| 3973 // The probe will tail call to a handler if found. | |
| 3974 isolate()->stub_cache()->GenerateProbe( | |
| 3975 masm(), Code::LOAD_IC, instr->hydrogen()->flags(), must_teardown_frame, | |
| 3976 receiver, name, scratch, extra, extra2, extra3); | |
| 3977 } | |
| 3978 | 3964 |
| 3979 // Tail call to miss if we ended up here. | 3965 // Tail call to miss if we ended up here. |
| 3980 if (must_teardown_frame) __ LeaveFrame(StackFrame::INTERNAL); | 3966 LoadIC::GenerateMiss(masm()); |
| 3981 if (instr->hydrogen()->is_keyed_load()) { | |
| 3982 KeyedLoadIC::GenerateMiss(masm()); | |
| 3983 } else { | |
| 3984 LoadIC::GenerateMiss(masm()); | |
| 3985 } | |
| 3986 } | 3967 } |
| 3987 | 3968 |
| 3988 | 3969 |
| 3989 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { | 3970 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { |
| 3990 DCHECK(ToRegister(instr->result()).is(r0)); | 3971 DCHECK(ToRegister(instr->result()).is(r0)); |
| 3991 | 3972 |
| 3992 if (instr->hydrogen()->IsTailCall()) { | 3973 if (instr->hydrogen()->IsTailCall()) { |
| 3993 if (NeedsEagerFrame()) __ LeaveFrame(StackFrame::INTERNAL); | 3974 if (NeedsEagerFrame()) __ LeaveFrame(StackFrame::INTERNAL); |
| 3994 | 3975 |
| 3995 if (instr->target()->IsConstantOperand()) { | 3976 if (instr->target()->IsConstantOperand()) { |
| (...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5929 __ Push(scope_info); | 5910 __ Push(scope_info); |
| 5930 __ push(ToRegister(instr->function())); | 5911 __ push(ToRegister(instr->function())); |
| 5931 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5912 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5932 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5913 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5933 } | 5914 } |
| 5934 | 5915 |
| 5935 | 5916 |
| 5936 #undef __ | 5917 #undef __ |
| 5937 | 5918 |
| 5938 } } // namespace v8::internal | 5919 } } // namespace v8::internal |
| OLD | NEW |