Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 546733003: MIPS: To aid vector-based load ic work, we need to be able to handle the megamorphic load case in h… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic/mips64/stub-cache-mips64.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "src/v8.h" 28 #include "src/v8.h"
29 29
30 #include "src/base/bits.h" 30 #include "src/base/bits.h"
31 #include "src/code-stubs.h" 31 #include "src/code-stubs.h"
32 #include "src/hydrogen-osr.h" 32 #include "src/hydrogen-osr.h"
33 #include "src/ic/stub-cache.h"
33 #include "src/mips/lithium-codegen-mips.h" 34 #include "src/mips/lithium-codegen-mips.h"
34 #include "src/mips/lithium-gap-resolver-mips.h" 35 #include "src/mips/lithium-gap-resolver-mips.h"
35 36
36 37
37 namespace v8 { 38 namespace v8 {
38 namespace internal { 39 namespace internal {
39 40
40 41
41 class SafepointGenerator FINAL : public CallWrapper { 42 class SafepointGenerator FINAL : public CallWrapper {
42 public: 43 public:
(...skipping 3884 matching lines...) Expand 10 before | Expand all | Expand 10 after
3927 } else { 3928 } else {
3928 CallKnownFunction(known_function, 3929 CallKnownFunction(known_function,
3929 instr->hydrogen()->formal_parameter_count(), 3930 instr->hydrogen()->formal_parameter_count(),
3930 instr->arity(), 3931 instr->arity(),
3931 instr, 3932 instr,
3932 A1_CONTAINS_TARGET); 3933 A1_CONTAINS_TARGET);
3933 } 3934 }
3934 } 3935 }
3935 3936
3936 3937
3938 void LCodeGen::DoTailCallThroughMegamorphicCache(
3939 LTailCallThroughMegamorphicCache* instr) {
3940 Register receiver = ToRegister(instr->receiver());
3941 Register name = ToRegister(instr->name());
3942 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister()));
3943 DCHECK(name.is(LoadDescriptor::NameRegister()));
3944 DCHECK(receiver.is(a1));
3945 DCHECK(name.is(a2));
3946
3947 Register scratch = a3;
3948 Register extra = t0;
3949 Register extra2 = t1;
3950 Register extra3 = t2;
3951
3952 // Important for the tail-call.
3953 bool must_teardown_frame = NeedsEagerFrame();
3954
3955 // The probe will tail call to a handler if found.
3956 isolate()->stub_cache()->GenerateProbe(masm(), instr->hydrogen()->flags(),
3957 must_teardown_frame, receiver, name,
3958 scratch, extra, extra2, extra3);
3959
3960 // Tail call to miss if we ended up here.
3961 if (must_teardown_frame) __ LeaveFrame(StackFrame::INTERNAL);
3962 LoadIC::GenerateMiss(masm());
3963 }
3964
3965
3937 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { 3966 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) {
3938 DCHECK(ToRegister(instr->result()).is(v0)); 3967 DCHECK(ToRegister(instr->result()).is(v0));
3939 3968
3940 LPointerMap* pointers = instr->pointer_map(); 3969 LPointerMap* pointers = instr->pointer_map();
3941 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); 3970 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt);
3942 3971
3943 if (instr->target()->IsConstantOperand()) { 3972 if (instr->target()->IsConstantOperand()) {
3944 LConstantOperand* target = LConstantOperand::cast(instr->target()); 3973 LConstantOperand* target = LConstantOperand::cast(instr->target());
3945 Handle<Code> code = Handle<Code>::cast(ToHandle(target)); 3974 Handle<Code> code = Handle<Code>::cast(ToHandle(target));
3946 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); 3975 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET));
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
5898 __ li(at, scope_info); 5927 __ li(at, scope_info);
5899 __ Push(at, ToRegister(instr->function())); 5928 __ Push(at, ToRegister(instr->function()));
5900 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5929 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5901 RecordSafepoint(Safepoint::kNoLazyDeopt); 5930 RecordSafepoint(Safepoint::kNoLazyDeopt);
5902 } 5931 }
5903 5932
5904 5933
5905 #undef __ 5934 #undef __
5906 5935
5907 } } // namespace v8::internal 5936 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/mips64/stub-cache-mips64.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698