| 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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/compiler/instruction-selector.h" | 9 #include "src/compiler/instruction-selector.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 } | 311 } |
| 312 | 312 |
| 313 private: | 313 private: |
| 314 FlagsMode mode_; | 314 FlagsMode mode_; |
| 315 FlagsCondition condition_; | 315 FlagsCondition condition_; |
| 316 Node* result_; // Only valid if mode_ == kFlags_set. | 316 Node* result_; // Only valid if mode_ == kFlags_set. |
| 317 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. | 317 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. |
| 318 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. | 318 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 | |
| 322 // An internal helper class for generating the operands to calls. | |
| 323 // TODO(bmeurer): Get rid of the CallBuffer business and make | |
| 324 // InstructionSelector::VisitCall platform independent instead. | |
| 325 struct CallBuffer { | |
| 326 CallBuffer(Zone* zone, const CallDescriptor* descriptor, | |
| 327 FrameStateDescriptor* frame_state); | |
| 328 | |
| 329 const CallDescriptor* descriptor; | |
| 330 FrameStateDescriptor* frame_state_descriptor; | |
| 331 NodeVector output_nodes; | |
| 332 InstructionOperandVector outputs; | |
| 333 InstructionOperandVector instruction_args; | |
| 334 NodeVector pushed_nodes; | |
| 335 | |
| 336 size_t input_count() const { return descriptor->InputCount(); } | |
| 337 | |
| 338 size_t frame_state_count() const { return descriptor->FrameStateCount(); } | |
| 339 | |
| 340 size_t frame_state_value_count() const { | |
| 341 return (frame_state_descriptor == NULL) | |
| 342 ? 0 | |
| 343 : (frame_state_descriptor->GetTotalSize() + | |
| 344 1); // Include deopt id. | |
| 345 } | |
| 346 }; | |
| 347 | |
| 348 } // namespace compiler | 321 } // namespace compiler |
| 349 } // namespace internal | 322 } // namespace internal |
| 350 } // namespace v8 | 323 } // namespace v8 |
| 351 | 324 |
| 352 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 325 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| OLD | NEW |