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

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

Issue 878103002: Revert of 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: Created 5 years, 11 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/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 } 404 }
405 405
406 406
407 void LCodeGen::DoCallFunction(LCallFunction* instr) { 407 void LCodeGen::DoCallFunction(LCallFunction* instr) {
408 DCHECK(ToRegister(instr->context()).is(cp)); 408 DCHECK(ToRegister(instr->context()).is(cp));
409 DCHECK(ToRegister(instr->function()).Is(x1)); 409 DCHECK(ToRegister(instr->function()).Is(x1));
410 DCHECK(ToRegister(instr->result()).Is(x0)); 410 DCHECK(ToRegister(instr->result()).Is(x0));
411 411
412 int arity = instr->arity(); 412 int arity = instr->arity();
413 CallFunctionFlags flags = instr->hydrogen()->function_flags(); 413 CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags());
414 if (instr->hydrogen()->HasVectorAndSlot()) { 414 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
415 Register slot_register = ToRegister(instr->temp_slot());
416 Register vector_register = ToRegister(instr->temp_vector());
417 DCHECK(slot_register.is(x3));
418 DCHECK(vector_register.is(x2));
419
420 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
421 int index = vector->GetIndex(instr->hydrogen()->slot());
422
423 __ Mov(vector_register, vector);
424 __ Mov(slot_register, Operand(Smi::FromInt(index)));
425
426 CallICState::CallType call_type =
427 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
428
429 Handle<Code> ic =
430 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
431 CallCode(ic, RelocInfo::CODE_TARGET, instr);
432 } else {
433 CallFunctionStub stub(isolate(), arity, flags);
434 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
435 }
436 after_push_argument_ = false; 415 after_push_argument_ = false;
437 } 416 }
438 417
439 418
440 void LCodeGen::DoCallNew(LCallNew* instr) { 419 void LCodeGen::DoCallNew(LCallNew* instr) {
441 DCHECK(ToRegister(instr->context()).is(cp)); 420 DCHECK(ToRegister(instr->context()).is(cp));
442 DCHECK(instr->IsMarkedAsCall()); 421 DCHECK(instr->IsMarkedAsCall());
443 DCHECK(ToRegister(instr->constructor()).is(x1)); 422 DCHECK(ToRegister(instr->constructor()).is(x1));
444 423
445 __ Mov(x0, instr->arity()); 424 __ Mov(x0, instr->arity());
(...skipping 5638 matching lines...) Expand 10 before | Expand all | Expand 10 after
6084 Handle<ScopeInfo> scope_info = instr->scope_info(); 6063 Handle<ScopeInfo> scope_info = instr->scope_info();
6085 __ Push(scope_info); 6064 __ Push(scope_info);
6086 __ Push(ToRegister(instr->function())); 6065 __ Push(ToRegister(instr->function()));
6087 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6066 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6088 RecordSafepoint(Safepoint::kNoLazyDeopt); 6067 RecordSafepoint(Safepoint::kNoLazyDeopt);
6089 } 6068 }
6090 6069
6091 6070
6092 6071
6093 } } // namespace v8::internal 6072 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698