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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2729163002: [turbofan] compute arguments length in deoptimizer (Closed)
Patch Set: fix comment Created 3 years, 9 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/compiler/instruction.h ('k') | src/compiler/opcodes.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 if (isolate->heap()->IsRootHandle(constant, &root_index) && 447 if (isolate->heap()->IsRootHandle(constant, &root_index) &&
448 root_index == Heap::kOptimizedOutRootIndex) { 448 root_index == Heap::kOptimizedOutRootIndex) {
449 // For an optimized-out object we return an invalid instruction 449 // For an optimized-out object we return an invalid instruction
450 // operand, so that we take the fast path for optimized-out values. 450 // operand, so that we take the fast path for optimized-out values.
451 return InstructionOperand(); 451 return InstructionOperand();
452 } 452 }
453 453
454 return g->UseImmediate(input); 454 return g->UseImmediate(input);
455 } 455 }
456 case IrOpcode::kArgumentsElementsState: 456 case IrOpcode::kArgumentsElementsState:
457 case IrOpcode::kArgumentsLengthState:
457 case IrOpcode::kObjectState: 458 case IrOpcode::kObjectState:
458 case IrOpcode::kTypedObjectState: 459 case IrOpcode::kTypedObjectState:
459 UNREACHABLE(); 460 UNREACHABLE();
460 break; 461 break;
461 default: 462 default:
462 switch (kind) { 463 switch (kind) {
463 case FrameStateInputKind::kStackSlot: 464 case FrameStateInputKind::kStackSlot:
464 return g->UseUniqueSlot(input); 465 return g->UseUniqueSlot(input);
465 case FrameStateInputKind::kAny: 466 case FrameStateInputKind::kAny:
466 // Currently deopts "wrap" other operations, so the deopt's inputs 467 // Currently deopts "wrap" other operations, so the deopt's inputs
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (input == nullptr) { 507 if (input == nullptr) {
507 values->PushOptimizedOut(); 508 values->PushOptimizedOut();
508 return 0; 509 return 0;
509 } 510 }
510 511
511 switch (input->opcode()) { 512 switch (input->opcode()) {
512 case IrOpcode::kArgumentsElementsState: { 513 case IrOpcode::kArgumentsElementsState: {
513 values->PushArgumentsElements(IsRestOf(input->op())); 514 values->PushArgumentsElements(IsRestOf(input->op()));
514 return 0; 515 return 0;
515 } 516 }
517 case IrOpcode::kArgumentsLengthState: {
518 values->PushArgumentsLength(IsRestOf(input->op()));
519 return 0;
520 }
516 case IrOpcode::kObjectState: { 521 case IrOpcode::kObjectState: {
517 UNREACHABLE(); 522 UNREACHABLE();
518 return 0; 523 return 0;
519 } 524 }
520 case IrOpcode::kTypedObjectState: { 525 case IrOpcode::kTypedObjectState: {
521 size_t id = deduplicator->GetObjectId(input); 526 size_t id = deduplicator->GetObjectId(input);
522 if (id == StateObjectDeduplicator::kNotDuplicated) { 527 if (id == StateObjectDeduplicator::kNotDuplicated) {
523 size_t entries = 0; 528 size_t entries = 0;
524 id = deduplicator->InsertObject(input); 529 id = deduplicator->InsertObject(input);
525 StateValueList* nested = values->PushRecursiveField(zone, id); 530 StateValueList* nested = values->PushRecursiveField(zone, id);
(...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2698 return new (instruction_zone()) FrameStateDescriptor( 2703 return new (instruction_zone()) FrameStateDescriptor(
2699 instruction_zone(), state_info.type(), state_info.bailout_id(), 2704 instruction_zone(), state_info.type(), state_info.bailout_id(),
2700 state_info.state_combine(), parameters, locals, stack, 2705 state_info.state_combine(), parameters, locals, stack,
2701 state_info.shared_info(), outer_state); 2706 state_info.shared_info(), outer_state);
2702 } 2707 }
2703 2708
2704 2709
2705 } // namespace compiler 2710 } // namespace compiler
2706 } // namespace internal 2711 } // namespace internal
2707 } // namespace v8 2712 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698