| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 return &cache_.kIfExceptionCOperator; | 455 return &cache_.kIfExceptionCOperator; |
| 456 case IfExceptionHint::kLocallyUncaught: | 456 case IfExceptionHint::kLocallyUncaught: |
| 457 return &cache_.kIfExceptionUOperator; | 457 return &cache_.kIfExceptionUOperator; |
| 458 } | 458 } |
| 459 UNREACHABLE(); | 459 UNREACHABLE(); |
| 460 return nullptr; | 460 return nullptr; |
| 461 } | 461 } |
| 462 | 462 |
| 463 | 463 |
| 464 const Operator* CommonOperatorBuilder::Switch(size_t control_output_count) { | 464 const Operator* CommonOperatorBuilder::Switch(size_t control_output_count) { |
| 465 DCHECK_GE(control_output_count, 3u); // Disallow trivial switches. | |
| 466 return new (zone()) Operator( // -- | 465 return new (zone()) Operator( // -- |
| 467 IrOpcode::kSwitch, Operator::kKontrol, // opcode | 466 IrOpcode::kSwitch, Operator::kKontrol, // opcode |
| 468 "Switch", // name | 467 "Switch", // name |
| 469 1, 0, 1, 0, 0, control_output_count); // counts | 468 1, 0, 1, 0, 0, control_output_count); // counts |
| 470 } | 469 } |
| 471 | 470 |
| 472 | 471 |
| 473 const Operator* CommonOperatorBuilder::IfValue(int32_t index) { | 472 const Operator* CommonOperatorBuilder::IfValue(int32_t index) { |
| 474 return new (zone()) Operator1<int32_t>( // -- | 473 return new (zone()) Operator1<int32_t>( // -- |
| 475 IrOpcode::kIfValue, Operator::kKontrol, // opcode | 474 IrOpcode::kIfValue, Operator::kKontrol, // opcode |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 Handle<SharedFunctionInfo> shared_info, | 814 Handle<SharedFunctionInfo> shared_info, |
| 816 ContextCallingMode context_calling_mode) { | 815 ContextCallingMode context_calling_mode) { |
| 817 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 816 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
| 818 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info, | 817 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info, |
| 819 context_calling_mode); | 818 context_calling_mode); |
| 820 } | 819 } |
| 821 | 820 |
| 822 } // namespace compiler | 821 } // namespace compiler |
| 823 } // namespace internal | 822 } // namespace internal |
| 824 } // namespace v8 | 823 } // namespace v8 |
| OLD | NEW |