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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 Node* result_; // Only valid if mode_ == kFlags_set. | 331 Node* result_; // Only valid if mode_ == kFlags_set. |
332 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. | 332 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. |
333 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. | 333 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. |
334 }; | 334 }; |
335 | 335 |
336 | 336 |
337 // An internal helper class for generating the operands to calls. | 337 // An internal helper class for generating the operands to calls. |
338 // TODO(bmeurer): Get rid of the CallBuffer business and make | 338 // TODO(bmeurer): Get rid of the CallBuffer business and make |
339 // InstructionSelector::VisitCall platform independent instead. | 339 // InstructionSelector::VisitCall platform independent instead. |
340 struct CallBuffer { | 340 struct CallBuffer { |
341 CallBuffer(Zone* zone, CallDescriptor* descriptor, | 341 CallBuffer(Zone* zone, const CallDescriptor* descriptor, |
342 FrameStateDescriptor* frame_state); | 342 FrameStateDescriptor* frame_state); |
343 | 343 |
344 CallDescriptor* descriptor; | 344 const CallDescriptor* descriptor; |
345 FrameStateDescriptor* frame_state_descriptor; | 345 FrameStateDescriptor* frame_state_descriptor; |
346 NodeVector output_nodes; | 346 NodeVector output_nodes; |
347 InstructionOperandVector outputs; | 347 InstructionOperandVector outputs; |
348 InstructionOperandVector instruction_args; | 348 InstructionOperandVector instruction_args; |
349 NodeVector pushed_nodes; | 349 NodeVector pushed_nodes; |
350 | 350 |
351 size_t input_count() const { return descriptor->InputCount(); } | 351 size_t input_count() const { return descriptor->InputCount(); } |
352 | 352 |
353 size_t frame_state_count() const { return descriptor->FrameStateCount(); } | 353 size_t frame_state_count() const { return descriptor->FrameStateCount(); } |
354 | 354 |
355 size_t frame_state_value_count() const { | 355 size_t frame_state_value_count() const { |
356 return (frame_state_descriptor == NULL) | 356 return (frame_state_descriptor == NULL) |
357 ? 0 | 357 ? 0 |
358 : (frame_state_descriptor->GetTotalSize() + | 358 : (frame_state_descriptor->GetTotalSize() + |
359 1); // Include deopt id. | 359 1); // Include deopt id. |
360 } | 360 } |
361 }; | 361 }; |
362 | 362 |
363 } // namespace compiler | 363 } // namespace compiler |
364 } // namespace internal | 364 } // namespace internal |
365 } // namespace v8 | 365 } // namespace v8 |
366 | 366 |
367 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 367 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
OLD | NEW |