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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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/arm64/lithium-arm64.cc ('k') | src/flag-definitions.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 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 CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags()); 413 CallFunctionFlags flags = instr->hydrogen()->function_flags();
414 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 414 if (instr->hydrogen()->HasVectorAndSlot()) {
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 AllowDeferredHandleDereference vector_structure_check;
421 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
422 int index = vector->GetIndex(instr->hydrogen()->slot());
423
424 __ Mov(vector_register, vector);
425 __ Mov(slot_register, Operand(Smi::FromInt(index)));
426
427 CallICState::CallType call_type =
428 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
429
430 Handle<Code> ic =
431 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
432 CallCode(ic, RelocInfo::CODE_TARGET, instr);
433 } else {
434 CallFunctionStub stub(isolate(), arity, flags);
435 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
436 }
415 after_push_argument_ = false; 437 after_push_argument_ = false;
416 } 438 }
417 439
418 440
419 void LCodeGen::DoCallNew(LCallNew* instr) { 441 void LCodeGen::DoCallNew(LCallNew* instr) {
420 DCHECK(ToRegister(instr->context()).is(cp)); 442 DCHECK(ToRegister(instr->context()).is(cp));
421 DCHECK(instr->IsMarkedAsCall()); 443 DCHECK(instr->IsMarkedAsCall());
422 DCHECK(ToRegister(instr->constructor()).is(x1)); 444 DCHECK(ToRegister(instr->constructor()).is(x1));
423 445
424 __ Mov(x0, instr->arity()); 446 __ Mov(x0, instr->arity());
(...skipping 5638 matching lines...) Expand 10 before | Expand all | Expand 10 after
6063 Handle<ScopeInfo> scope_info = instr->scope_info(); 6085 Handle<ScopeInfo> scope_info = instr->scope_info();
6064 __ Push(scope_info); 6086 __ Push(scope_info);
6065 __ Push(ToRegister(instr->function())); 6087 __ Push(ToRegister(instr->function()));
6066 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6088 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6067 RecordSafepoint(Safepoint::kNoLazyDeopt); 6089 RecordSafepoint(Safepoint::kNoLazyDeopt);
6068 } 6090 }
6069 6091
6070 6092
6071 6093
6072 } } // namespace v8::internal 6094 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698