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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 InstructionOperand value = | 1040 InstructionOperand value = |
1041 g.CanBeImmediate(node) | 1041 g.CanBeImmediate(node) |
1042 ? g.UseImmediate(node) | 1042 ? g.UseImmediate(node) |
1043 : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node); | 1043 : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node); |
1044 Emit(kX64Push, g.NoOutput(), value); | 1044 Emit(kX64Push, g.NoOutput(), value); |
1045 } | 1045 } |
1046 | 1046 |
1047 // Pass label of exception handler block. | 1047 // Pass label of exception handler block. |
1048 CallDescriptor::Flags flags = descriptor->flags(); | 1048 CallDescriptor::Flags flags = descriptor->flags(); |
1049 if (handler) { | 1049 if (handler) { |
| 1050 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
| 1051 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); |
| 1052 if (hint == IfExceptionHint::kLocallyCaught) { |
| 1053 flags |= CallDescriptor::kHasLocalCatchHandler; |
| 1054 } |
1050 flags |= CallDescriptor::kHasExceptionHandler; | 1055 flags |= CallDescriptor::kHasExceptionHandler; |
1051 buffer.instruction_args.push_back(g.Label(handler)); | 1056 buffer.instruction_args.push_back(g.Label(handler)); |
1052 } | 1057 } |
1053 | 1058 |
1054 // Select the appropriate opcode based on the call type. | 1059 // Select the appropriate opcode based on the call type. |
1055 InstructionCode opcode; | 1060 InstructionCode opcode; |
1056 switch (descriptor->kind()) { | 1061 switch (descriptor->kind()) { |
1057 case CallDescriptor::kCallCodeObject: | 1062 case CallDescriptor::kCallCodeObject: |
1058 opcode = kArchCallCodeObject; | 1063 opcode = kArchCallCodeObject; |
1059 break; | 1064 break; |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 if (CpuFeatures::IsSupported(SSE4_1)) { | 1632 if (CpuFeatures::IsSupported(SSE4_1)) { |
1628 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1633 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1629 MachineOperatorBuilder::kFloat64RoundTruncate; | 1634 MachineOperatorBuilder::kFloat64RoundTruncate; |
1630 } | 1635 } |
1631 return flags; | 1636 return flags; |
1632 } | 1637 } |
1633 | 1638 |
1634 } // namespace compiler | 1639 } // namespace compiler |
1635 } // namespace internal | 1640 } // namespace internal |
1636 } // namespace v8 | 1641 } // namespace v8 |
OLD | NEW |