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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 public: | 353 public: |
354 CallOperator(const CallDescriptor* descriptor, const char* mnemonic) | 354 CallOperator(const CallDescriptor* descriptor, const char* mnemonic) |
355 : Operator1<const CallDescriptor*>( | 355 : Operator1<const CallDescriptor*>( |
356 IrOpcode::kCall, descriptor->properties(), mnemonic, | 356 IrOpcode::kCall, descriptor->properties(), mnemonic, |
357 descriptor->InputCount() + descriptor->FrameStateCount(), | 357 descriptor->InputCount() + descriptor->FrameStateCount(), |
358 Operator::ZeroIfPure(descriptor->properties()), | 358 Operator::ZeroIfPure(descriptor->properties()), |
359 Operator::ZeroIfPure(descriptor->properties()), | 359 Operator::ZeroIfPure(descriptor->properties()), |
360 descriptor->ReturnCount(), | 360 descriptor->ReturnCount(), |
361 Operator::ZeroIfPure(descriptor->properties()), 0, descriptor) {} | 361 Operator::ZeroIfPure(descriptor->properties()), 0, descriptor) {} |
362 | 362 |
363 virtual void PrintParameter(std::ostream& os) const OVERRIDE { | 363 void PrintParameter(std::ostream& os) const OVERRIDE { |
364 os << "[" << *parameter() << "]"; | 364 os << "[" << *parameter() << "]"; |
365 } | 365 } |
366 }; | 366 }; |
367 return new (zone()) CallOperator(descriptor, "Call"); | 367 return new (zone()) CallOperator(descriptor, "Call"); |
368 } | 368 } |
369 | 369 |
370 | 370 |
371 const Operator* CommonOperatorBuilder::Projection(size_t index) { | 371 const Operator* CommonOperatorBuilder::Projection(size_t index) { |
372 return new (zone()) Operator1<size_t>( // -- | 372 return new (zone()) Operator1<size_t>( // -- |
373 IrOpcode::kProjection, Operator::kPure, // opcode | 373 IrOpcode::kProjection, Operator::kPure, // opcode |
374 "Projection", // name | 374 "Projection", // name |
375 1, 0, 0, 1, 0, 0, // counts | 375 1, 0, 0, 1, 0, 0, // counts |
376 index); // parameter | 376 index); // parameter |
377 } | 377 } |
378 | 378 |
379 } // namespace compiler | 379 } // namespace compiler |
380 } // namespace internal | 380 } // namespace internal |
381 } // namespace v8 | 381 } // namespace v8 |
OLD | NEW |