| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); | 890 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
| 891 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); | 891 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); |
| 892 if (hint == IfExceptionHint::kLocallyCaught) { | 892 if (hint == IfExceptionHint::kLocallyCaught) { |
| 893 flags |= CallDescriptor::kHasLocalCatchHandler; | 893 flags |= CallDescriptor::kHasLocalCatchHandler; |
| 894 } | 894 } |
| 895 flags |= CallDescriptor::kHasExceptionHandler; | 895 flags |= CallDescriptor::kHasExceptionHandler; |
| 896 buffer.instruction_args.push_back(g.Label(handler)); | 896 buffer.instruction_args.push_back(g.Label(handler)); |
| 897 } | 897 } |
| 898 | 898 |
| 899 // Select the appropriate opcode based on the call type. | 899 // Select the appropriate opcode based on the call type. |
| 900 InstructionCode opcode; | 900 InstructionCode opcode = kArchNop; |
| 901 switch (descriptor->kind()) { | 901 switch (descriptor->kind()) { |
| 902 case CallDescriptor::kCallAddress: | 902 case CallDescriptor::kCallAddress: |
| 903 opcode = | 903 opcode = |
| 904 kArchCallCFunction | | 904 kArchCallCFunction | |
| 905 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); | 905 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); |
| 906 break; | 906 break; |
| 907 case CallDescriptor::kCallCodeObject: | 907 case CallDescriptor::kCallCodeObject: |
| 908 opcode = kArchCallCodeObject | MiscField::encode(flags); | 908 opcode = kArchCallCodeObject | MiscField::encode(flags); |
| 909 break; | 909 break; |
| 910 case CallDescriptor::kCallJSFunction: | 910 case CallDescriptor::kCallJSFunction: |
| 911 opcode = kArchCallJSFunction | MiscField::encode(flags); | 911 opcode = kArchCallJSFunction | MiscField::encode(flags); |
| 912 break; | 912 break; |
| 913 default: | 913 case CallDescriptor::kLazyBailout: |
| 914 UNREACHABLE(); | 914 opcode = kArchLazyBailout | MiscField::encode(flags); |
| 915 return; | 915 break; |
| 916 } | 916 } |
| 917 | 917 |
| 918 // Emit the call instruction. | 918 // Emit the call instruction. |
| 919 size_t const output_count = buffer.outputs.size(); | 919 size_t const output_count = buffer.outputs.size(); |
| 920 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; | 920 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; |
| 921 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), | 921 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), |
| 922 &buffer.instruction_args.front())->MarkAsCall(); | 922 &buffer.instruction_args.front())->MarkAsCall(); |
| 923 } | 923 } |
| 924 | 924 |
| 925 | 925 |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 MachineOperatorBuilder::kFloat32Min | | 1370 MachineOperatorBuilder::kFloat32Min | |
| 1371 MachineOperatorBuilder::kFloat64Max | | 1371 MachineOperatorBuilder::kFloat64Max | |
| 1372 MachineOperatorBuilder::kFloat64Min | | 1372 MachineOperatorBuilder::kFloat64Min | |
| 1373 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1373 MachineOperatorBuilder::kWord32ShiftIsSafe; |
| 1374 return flags; | 1374 return flags; |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 } // namespace compiler | 1377 } // namespace compiler |
| 1378 } // namespace internal | 1378 } // namespace internal |
| 1379 } // namespace v8 | 1379 } // namespace v8 |
| OLD | NEW |