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

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

Issue 868453005: Continue learning for calls in optimized code when we have no type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@navier
Patch Set: Compile error fix. 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 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
4120 int index = vector->GetIndex(instr->hydrogen()->slot());
4121
4122 __ Move(vector_register, vector);
4123 __ mov(slot_register, Operand(Smi::FromInt(index)));
4124
4125 CallICState::CallType call_type =
4126 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
4127
4128 Handle<Code> ic =
4129 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
4130 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4131 } else {
4132 CallFunctionStub stub(isolate(), arity, flags);
4133 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4134 }
4114 } 4135 }
4115 4136
4116 4137
4117 void LCodeGen::DoCallNew(LCallNew* instr) { 4138 void LCodeGen::DoCallNew(LCallNew* instr) {
4118 DCHECK(ToRegister(instr->context()).is(cp)); 4139 DCHECK(ToRegister(instr->context()).is(cp));
4119 DCHECK(ToRegister(instr->constructor()).is(r1)); 4140 DCHECK(ToRegister(instr->constructor()).is(r1));
4120 DCHECK(ToRegister(instr->result()).is(r0)); 4141 DCHECK(ToRegister(instr->result()).is(r0));
4121 4142
4122 __ mov(r0, Operand(instr->arity())); 4143 __ mov(r0, Operand(instr->arity()));
4123 // No cell in r2 for construct type feedback in optimized code 4144 // 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); 5977 __ Push(scope_info);
5957 __ push(ToRegister(instr->function())); 5978 __ push(ToRegister(instr->function()));
5958 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5979 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5959 RecordSafepoint(Safepoint::kNoLazyDeopt); 5980 RecordSafepoint(Safepoint::kNoLazyDeopt);
5960 } 5981 }
5961 5982
5962 5983
5963 #undef __ 5984 #undef __
5964 5985
5965 } } // namespace v8::internal 5986 } } // 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