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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.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. 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/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/hydrogen-osr.h" 8 #include "src/hydrogen-osr.h"
9 #include "src/ic/stub-cache.h"
9 #include "src/mips64/lithium-codegen-mips64.h" 10 #include "src/mips64/lithium-codegen-mips64.h"
10 #include "src/mips64/lithium-gap-resolver-mips64.h" 11 #include "src/mips64/lithium-gap-resolver-mips64.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 16
16 class SafepointGenerator FINAL : public CallWrapper { 17 class SafepointGenerator FINAL : public CallWrapper {
17 public: 18 public:
18 SafepointGenerator(LCodeGen* codegen, 19 SafepointGenerator(LCodeGen* codegen,
(...skipping 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3966 } else { 3967 } else {
3967 CallKnownFunction(known_function, 3968 CallKnownFunction(known_function,
3968 instr->hydrogen()->formal_parameter_count(), 3969 instr->hydrogen()->formal_parameter_count(),
3969 instr->arity(), 3970 instr->arity(),
3970 instr, 3971 instr,
3971 A1_CONTAINS_TARGET); 3972 A1_CONTAINS_TARGET);
3972 } 3973 }
3973 } 3974 }
3974 3975
3975 3976
3977 void LCodeGen::DoTailCallThroughMegamorphicCache(
3978 LTailCallThroughMegamorphicCache* instr) {
3979 Register receiver = ToRegister(instr->receiver());
3980 Register name = ToRegister(instr->name());
3981 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister()));
3982 DCHECK(name.is(LoadDescriptor::NameRegister()));
3983 DCHECK(receiver.is(a1));
3984 DCHECK(name.is(a2));
3985
3986 Register scratch = a3;
3987 Register extra = a4;
3988 Register extra2 = a5;
3989 Register extra3 = a6;
3990
3991 // Important for the tail-call.
3992 bool must_teardown_frame = NeedsEagerFrame();
3993
3994 // The probe will tail call to a handler if found.
3995 isolate()->stub_cache()->GenerateProbe(masm(), instr->hydrogen()->flags(),
3996 must_teardown_frame, receiver, name,
3997 scratch, extra, extra2, extra3);
3998
3999 // Tail call to miss if we ended up here.
4000 if (must_teardown_frame) __ LeaveFrame(StackFrame::INTERNAL);
4001 LoadIC::GenerateMiss(masm());
4002 }
4003
4004
3976 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { 4005 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) {
3977 DCHECK(ToRegister(instr->result()).is(v0)); 4006 DCHECK(ToRegister(instr->result()).is(v0));
3978 4007
3979 LPointerMap* pointers = instr->pointer_map(); 4008 LPointerMap* pointers = instr->pointer_map();
3980 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); 4009 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt);
3981 4010
3982 if (instr->target()->IsConstantOperand()) { 4011 if (instr->target()->IsConstantOperand()) {
3983 LConstantOperand* target = LConstantOperand::cast(instr->target()); 4012 LConstantOperand* target = LConstantOperand::cast(instr->target());
3984 Handle<Code> code = Handle<Code>::cast(ToHandle(target)); 4013 Handle<Code> code = Handle<Code>::cast(ToHandle(target));
3985 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); 4014 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET));
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
5936 __ li(at, scope_info); 5965 __ li(at, scope_info);
5937 __ Push(at, ToRegister(instr->function())); 5966 __ Push(at, ToRegister(instr->function()));
5938 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5967 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5939 RecordSafepoint(Safepoint::kNoLazyDeopt); 5968 RecordSafepoint(Safepoint::kNoLazyDeopt);
5940 } 5969 }
5941 5970
5942 5971
5943 #undef __ 5972 #undef __
5944 5973
5945 } } // namespace v8::internal 5974 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698