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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 InstructionOperand value = | 836 InstructionOperand value = |
837 g.CanBeImmediate(node) | 837 g.CanBeImmediate(node) |
838 ? g.UseImmediate(node) | 838 ? g.UseImmediate(node) |
839 : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node); | 839 : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node); |
840 Emit(kIA32Push, g.NoOutput(), value); | 840 Emit(kIA32Push, g.NoOutput(), value); |
841 } | 841 } |
842 | 842 |
843 // Pass label of exception handler block. | 843 // Pass label of exception handler block. |
844 CallDescriptor::Flags flags = descriptor->flags(); | 844 CallDescriptor::Flags flags = descriptor->flags(); |
845 if (handler) { | 845 if (handler) { |
| 846 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
| 847 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); |
| 848 if (hint == IfExceptionHint::kLocallyCaught) { |
| 849 flags |= CallDescriptor::kHasLocalCatchHandler; |
| 850 } |
846 flags |= CallDescriptor::kHasExceptionHandler; | 851 flags |= CallDescriptor::kHasExceptionHandler; |
847 buffer.instruction_args.push_back(g.Label(handler)); | 852 buffer.instruction_args.push_back(g.Label(handler)); |
848 } | 853 } |
849 | 854 |
850 // Select the appropriate opcode based on the call type. | 855 // Select the appropriate opcode based on the call type. |
851 InstructionCode opcode; | 856 InstructionCode opcode; |
852 switch (descriptor->kind()) { | 857 switch (descriptor->kind()) { |
853 case CallDescriptor::kCallCodeObject: { | 858 case CallDescriptor::kCallCodeObject: { |
854 opcode = kArchCallCodeObject; | 859 opcode = kArchCallCodeObject; |
855 break; | 860 break; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 if (CpuFeatures::IsSupported(SSE4_1)) { | 1319 if (CpuFeatures::IsSupported(SSE4_1)) { |
1315 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1320 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1316 MachineOperatorBuilder::kFloat64RoundTruncate; | 1321 MachineOperatorBuilder::kFloat64RoundTruncate; |
1317 } | 1322 } |
1318 return flags; | 1323 return flags; |
1319 } | 1324 } |
1320 | 1325 |
1321 } // namespace compiler | 1326 } // namespace compiler |
1322 } // namespace internal | 1327 } // namespace internal |
1323 } // namespace v8 | 1328 } // namespace v8 |
OLD | NEW |