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

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

Issue 877253003: MIPS: Continue learning for calls in crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | 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 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after
4046 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); 4046 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
4047 } 4047 }
4048 4048
4049 4049
4050 void LCodeGen::DoCallFunction(LCallFunction* instr) { 4050 void LCodeGen::DoCallFunction(LCallFunction* instr) {
4051 DCHECK(ToRegister(instr->context()).is(cp)); 4051 DCHECK(ToRegister(instr->context()).is(cp));
4052 DCHECK(ToRegister(instr->function()).is(a1)); 4052 DCHECK(ToRegister(instr->function()).is(a1));
4053 DCHECK(ToRegister(instr->result()).is(v0)); 4053 DCHECK(ToRegister(instr->result()).is(v0));
4054 4054
4055 int arity = instr->arity(); 4055 int arity = instr->arity();
4056 CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags()); 4056 CallFunctionFlags flags = instr->hydrogen()->function_flags();
4057 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4057 if (instr->hydrogen()->HasVectorAndSlot()) {
4058 Register slot_register = ToRegister(instr->temp_slot());
4059 Register vector_register = ToRegister(instr->temp_vector());
4060 DCHECK(slot_register.is(a3));
4061 DCHECK(vector_register.is(a2));
4062
4063 AllowDeferredHandleDereference vector_structure_check;
4064 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
4065 int index = vector->GetIndex(instr->hydrogen()->slot());
4066
4067 __ li(vector_register, vector);
4068 __ li(slot_register, Operand(Smi::FromInt(index)));
4069
4070 CallICState::CallType call_type =
4071 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
4072
4073 Handle<Code> ic =
4074 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
4075 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4076 } else {
4077 CallFunctionStub stub(isolate(), arity, flags);
4078 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4079 }
4058 } 4080 }
4059 4081
4060 4082
4061 void LCodeGen::DoCallNew(LCallNew* instr) { 4083 void LCodeGen::DoCallNew(LCallNew* instr) {
4062 DCHECK(ToRegister(instr->context()).is(cp)); 4084 DCHECK(ToRegister(instr->context()).is(cp));
4063 DCHECK(ToRegister(instr->constructor()).is(a1)); 4085 DCHECK(ToRegister(instr->constructor()).is(a1));
4064 DCHECK(ToRegister(instr->result()).is(v0)); 4086 DCHECK(ToRegister(instr->result()).is(v0));
4065 4087
4066 __ li(a0, Operand(instr->arity())); 4088 __ li(a0, Operand(instr->arity()));
4067 // No cell in a2 for construct type feedback in optimized code 4089 // No cell in a2 for construct type feedback in optimized code
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
5968 __ li(at, scope_info); 5990 __ li(at, scope_info);
5969 __ Push(at, ToRegister(instr->function())); 5991 __ Push(at, ToRegister(instr->function()));
5970 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5992 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5971 RecordSafepoint(Safepoint::kNoLazyDeopt); 5993 RecordSafepoint(Safepoint::kNoLazyDeopt);
5972 } 5994 }
5973 5995
5974 5996
5975 #undef __ 5997 #undef __
5976 5998
5977 } } // namespace v8::internal 5999 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698