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

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

Issue 1683793004: [crankshaft] Disable Crankshaft when it sees a tail call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/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/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 367
368 void LCodeGen::DoCallFunction(LCallFunction* instr) { 368 void LCodeGen::DoCallFunction(LCallFunction* instr) {
369 HCallFunction* hinstr = instr->hydrogen(); 369 HCallFunction* hinstr = instr->hydrogen();
370 DCHECK(ToRegister(instr->context()).is(cp)); 370 DCHECK(ToRegister(instr->context()).is(cp));
371 DCHECK(ToRegister(instr->function()).Is(x1)); 371 DCHECK(ToRegister(instr->function()).Is(x1));
372 DCHECK(ToRegister(instr->result()).Is(x0)); 372 DCHECK(ToRegister(instr->result()).Is(x0));
373 373
374 int arity = instr->arity(); 374 int arity = instr->arity();
375 ConvertReceiverMode mode = hinstr->convert_mode(); 375 ConvertReceiverMode mode = hinstr->convert_mode();
376 TailCallMode tail_call_mode = hinstr->tail_call_mode();
377 if (hinstr->HasVectorAndSlot()) { 376 if (hinstr->HasVectorAndSlot()) {
378 Register slot_register = ToRegister(instr->temp_slot()); 377 Register slot_register = ToRegister(instr->temp_slot());
379 Register vector_register = ToRegister(instr->temp_vector()); 378 Register vector_register = ToRegister(instr->temp_vector());
380 DCHECK(slot_register.is(x3)); 379 DCHECK(slot_register.is(x3));
381 DCHECK(vector_register.is(x2)); 380 DCHECK(vector_register.is(x2));
382 381
383 AllowDeferredHandleDereference vector_structure_check; 382 AllowDeferredHandleDereference vector_structure_check;
384 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); 383 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector();
385 int index = vector->GetIndex(hinstr->slot()); 384 int index = vector->GetIndex(hinstr->slot());
386 385
387 __ Mov(vector_register, vector); 386 __ Mov(vector_register, vector);
388 __ Mov(slot_register, Operand(Smi::FromInt(index))); 387 __ Mov(slot_register, Operand(Smi::FromInt(index)));
389 388
390 Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, 389 Handle<Code> ic =
391 tail_call_mode) 390 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code();
392 .code();
393 CallCode(ic, RelocInfo::CODE_TARGET, instr); 391 CallCode(ic, RelocInfo::CODE_TARGET, instr);
394 } else { 392 } else {
395 __ Mov(x0, arity); 393 __ Mov(x0, arity);
396 CallCode(isolate()->builtins()->Call(mode, tail_call_mode), 394 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr);
397 RelocInfo::CODE_TARGET, instr);
398 } 395 }
399 RecordPushedArgumentsDelta(hinstr->argument_delta()); 396 RecordPushedArgumentsDelta(hinstr->argument_delta());
400 } 397 }
401 398
402 399
403 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 400 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
404 DCHECK(instr->IsMarkedAsCall()); 401 DCHECK(instr->IsMarkedAsCall());
405 DCHECK(ToRegister(instr->context()).is(cp)); 402 DCHECK(ToRegister(instr->context()).is(cp));
406 DCHECK(ToRegister(instr->constructor()).is(x1)); 403 DCHECK(ToRegister(instr->constructor()).is(x1));
407 404
(...skipping 5355 matching lines...) Expand 10 before | Expand all | Expand 10 after
5763 Handle<ScopeInfo> scope_info = instr->scope_info(); 5760 Handle<ScopeInfo> scope_info = instr->scope_info();
5764 __ Push(scope_info); 5761 __ Push(scope_info);
5765 __ Push(ToRegister(instr->function())); 5762 __ Push(ToRegister(instr->function()));
5766 CallRuntime(Runtime::kPushBlockContext, instr); 5763 CallRuntime(Runtime::kPushBlockContext, instr);
5767 RecordSafepoint(Safepoint::kNoLazyDeopt); 5764 RecordSafepoint(Safepoint::kNoLazyDeopt);
5768 } 5765 }
5769 5766
5770 5767
5771 } // namespace internal 5768 } // namespace internal
5772 } // namespace v8 5769 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698