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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 Node* stack = state->InputAt(kFrameStateStackInput); | 548 Node* stack = state->InputAt(kFrameStateStackInput); |
549 Node* context = state->InputAt(kFrameStateContextInput); | 549 Node* context = state->InputAt(kFrameStateContextInput); |
550 Node* function = state->InputAt(kFrameStateFunctionInput); | 550 Node* function = state->InputAt(kFrameStateFunctionInput); |
551 | 551 |
552 DCHECK_EQ(descriptor->parameters_count(), | 552 DCHECK_EQ(descriptor->parameters_count(), |
553 StateValuesAccess(parameters).size()); | 553 StateValuesAccess(parameters).size()); |
554 DCHECK_EQ(descriptor->locals_count(), StateValuesAccess(locals).size()); | 554 DCHECK_EQ(descriptor->locals_count(), StateValuesAccess(locals).size()); |
555 DCHECK_EQ(descriptor->stack_count(), StateValuesAccess(stack).size()); | 555 DCHECK_EQ(descriptor->stack_count(), StateValuesAccess(stack).size()); |
556 | 556 |
557 StateValueList* values_descriptor = descriptor->GetStateValueDescriptors(); | 557 StateValueList* values_descriptor = descriptor->GetStateValueDescriptors(); |
| 558 |
| 559 DCHECK_EQ(values_descriptor->size(), 0u); |
| 560 values_descriptor->ReserveSize( |
| 561 descriptor->GetSize(OutputFrameStateCombine::Ignore())); |
| 562 |
558 entries += AddOperandToStateValueDescriptor( | 563 entries += AddOperandToStateValueDescriptor( |
559 values_descriptor, inputs, g, deduplicator, function, | 564 values_descriptor, inputs, g, deduplicator, function, |
560 MachineType::AnyTagged(), FrameStateInputKind::kStackSlot, zone); | 565 MachineType::AnyTagged(), FrameStateInputKind::kStackSlot, zone); |
561 for (StateValuesAccess::TypedNode input_node : | 566 for (StateValuesAccess::TypedNode input_node : |
562 StateValuesAccess(parameters)) { | 567 StateValuesAccess(parameters)) { |
563 entries += AddOperandToStateValueDescriptor(values_descriptor, inputs, g, | 568 entries += AddOperandToStateValueDescriptor(values_descriptor, inputs, g, |
564 deduplicator, input_node.node, | 569 deduplicator, input_node.node, |
565 input_node.type, kind, zone); | 570 input_node.type, kind, zone); |
566 } | 571 } |
567 if (descriptor->HasContext()) { | 572 if (descriptor->HasContext()) { |
(...skipping 1556 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 |