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

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

Issue 885593002: Continue learning for calls in crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't remove inlining text size limit yet, just alter it. 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 | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.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/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 4091 matching lines...) Expand 10 before | Expand all | Expand 10 after
4102 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); 4102 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
4103 } 4103 }
4104 4104
4105 4105
4106 void LCodeGen::DoCallFunction(LCallFunction* instr) { 4106 void LCodeGen::DoCallFunction(LCallFunction* instr) {
4107 DCHECK(ToRegister(instr->context()).is(cp)); 4107 DCHECK(ToRegister(instr->context()).is(cp));
4108 DCHECK(ToRegister(instr->function()).is(r1)); 4108 DCHECK(ToRegister(instr->function()).is(r1));
4109 DCHECK(ToRegister(instr->result()).is(r0)); 4109 DCHECK(ToRegister(instr->result()).is(r0));
4110 4110
4111 int arity = instr->arity(); 4111 int arity = instr->arity();
4112 CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags()); 4112 CallFunctionFlags flags = instr->hydrogen()->function_flags();
4113 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4113 if (instr->hydrogen()->HasVectorAndSlot()) {
4114 Register slot_register = ToRegister(instr->temp_slot());
4115 Register vector_register = ToRegister(instr->temp_vector());
4116 DCHECK(slot_register.is(r3));
4117 DCHECK(vector_register.is(r2));
4118
4119 AllowDeferredHandleDereference vector_structure_check;
4120 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
4121 int index = vector->GetIndex(instr->hydrogen()->slot());
4122
4123 __ Move(vector_register, vector);
4124 __ mov(slot_register, Operand(Smi::FromInt(index)));
4125
4126 CallICState::CallType call_type =
4127 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
4128
4129 Handle<Code> ic =
4130 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
4131 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4132 } else {
4133 CallFunctionStub stub(isolate(), arity, flags);
4134 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4135 }
4114 } 4136 }
4115 4137
4116 4138
4117 void LCodeGen::DoCallNew(LCallNew* instr) { 4139 void LCodeGen::DoCallNew(LCallNew* instr) {
4118 DCHECK(ToRegister(instr->context()).is(cp)); 4140 DCHECK(ToRegister(instr->context()).is(cp));
4119 DCHECK(ToRegister(instr->constructor()).is(r1)); 4141 DCHECK(ToRegister(instr->constructor()).is(r1));
4120 DCHECK(ToRegister(instr->result()).is(r0)); 4142 DCHECK(ToRegister(instr->result()).is(r0));
4121 4143
4122 __ mov(r0, Operand(instr->arity())); 4144 __ mov(r0, Operand(instr->arity()));
4123 // No cell in r2 for construct type feedback in optimized code 4145 // No cell in r2 for construct type feedback in optimized code
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
5956 __ Push(scope_info); 5978 __ Push(scope_info);
5957 __ push(ToRegister(instr->function())); 5979 __ push(ToRegister(instr->function()));
5958 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5980 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5959 RecordSafepoint(Safepoint::kNoLazyDeopt); 5981 RecordSafepoint(Safepoint::kNoLazyDeopt);
5960 } 5982 }
5961 5983
5962 5984
5963 #undef __ 5985 #undef __
5964 5986
5965 } } // namespace v8::internal 5987 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698