OLD | NEW |
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 473 |
474 private: | 474 private: |
475 ZoneVector<Node*> objects_; | 475 ZoneVector<Node*> objects_; |
476 }; | 476 }; |
477 | 477 |
478 // Returns the number of instruction operands added to inputs. | 478 // Returns the number of instruction operands added to inputs. |
479 size_t InstructionSelector::AddOperandToStateValueDescriptor( | 479 size_t InstructionSelector::AddOperandToStateValueDescriptor( |
480 StateValueList* values, InstructionOperandVector* inputs, | 480 StateValueList* values, InstructionOperandVector* inputs, |
481 OperandGenerator* g, StateObjectDeduplicator* deduplicator, Node* input, | 481 OperandGenerator* g, StateObjectDeduplicator* deduplicator, Node* input, |
482 MachineType type, FrameStateInputKind kind, Zone* zone) { | 482 MachineType type, FrameStateInputKind kind, Zone* zone) { |
| 483 if (input == nullptr) { |
| 484 values->PushOptimizedOut(); |
| 485 return 0; |
| 486 } |
| 487 |
483 switch (input->opcode()) { | 488 switch (input->opcode()) { |
484 case IrOpcode::kObjectState: { | 489 case IrOpcode::kObjectState: { |
485 UNREACHABLE(); | 490 UNREACHABLE(); |
486 return 0; | 491 return 0; |
487 } | 492 } |
488 case IrOpcode::kTypedObjectState: { | 493 case IrOpcode::kTypedObjectState: { |
489 size_t id = deduplicator->GetObjectId(input); | 494 size_t id = deduplicator->GetObjectId(input); |
490 if (id == StateObjectDeduplicator::kNotDuplicated) { | 495 if (id == StateObjectDeduplicator::kNotDuplicated) { |
491 size_t entries = 0; | 496 size_t entries = 0; |
492 id = deduplicator->InsertObject(input); | 497 id = deduplicator->InsertObject(input); |
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2124 return new (instruction_zone()) FrameStateDescriptor( | 2129 return new (instruction_zone()) FrameStateDescriptor( |
2125 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2130 instruction_zone(), state_info.type(), state_info.bailout_id(), |
2126 state_info.state_combine(), parameters, locals, stack, | 2131 state_info.state_combine(), parameters, locals, stack, |
2127 state_info.shared_info(), outer_state); | 2132 state_info.shared_info(), outer_state); |
2128 } | 2133 } |
2129 | 2134 |
2130 | 2135 |
2131 } // namespace compiler | 2136 } // namespace compiler |
2132 } // namespace internal | 2137 } // namespace internal |
2133 } // namespace v8 | 2138 } // namespace v8 |
OLD | NEW |