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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 // for where to emit constants. | 1772 // for where to emit constants. |
1773 CallBufferFlags call_buffer_flags(kCallCodeImmediate | kCallAddressImmediate); | 1773 CallBufferFlags call_buffer_flags(kCallCodeImmediate | kCallAddressImmediate); |
1774 InitializeCallBuffer(node, &buffer, call_buffer_flags); | 1774 InitializeCallBuffer(node, &buffer, call_buffer_flags); |
1775 | 1775 |
1776 EmitPrepareArguments(&(buffer.pushed_nodes), descriptor, node); | 1776 EmitPrepareArguments(&(buffer.pushed_nodes), descriptor, node); |
1777 | 1777 |
1778 // Pass label of exception handler block. | 1778 // Pass label of exception handler block. |
1779 CallDescriptor::Flags flags = descriptor->flags(); | 1779 CallDescriptor::Flags flags = descriptor->flags(); |
1780 if (handler) { | 1780 if (handler) { |
1781 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); | 1781 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
1782 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); | |
1783 if (hint == IfExceptionHint::kLocallyCaught) { | |
1784 flags |= CallDescriptor::kHasLocalCatchHandler; | |
1785 } else if (hint == IfExceptionHint::kLocallyCaughtForPromiseReject) { | |
1786 flags |= CallDescriptor::kHasLocalCatchHandlerForPromiseReject; | |
1787 } | |
1788 flags |= CallDescriptor::kHasExceptionHandler; | 1782 flags |= CallDescriptor::kHasExceptionHandler; |
1789 buffer.instruction_args.push_back(g.Label(handler)); | 1783 buffer.instruction_args.push_back(g.Label(handler)); |
1790 } | 1784 } |
1791 | 1785 |
1792 bool from_native_stack = linkage()->GetIncomingDescriptor()->UseNativeStack(); | 1786 bool from_native_stack = linkage()->GetIncomingDescriptor()->UseNativeStack(); |
1793 bool to_native_stack = descriptor->UseNativeStack(); | 1787 bool to_native_stack = descriptor->UseNativeStack(); |
1794 if (from_native_stack != to_native_stack) { | 1788 if (from_native_stack != to_native_stack) { |
1795 // (arm64 only) Mismatch in the use of stack pointers. One or the other | 1789 // (arm64 only) Mismatch in the use of stack pointers. One or the other |
1796 // has to be restored manually by the code generator. | 1790 // has to be restored manually by the code generator. |
1797 flags |= to_native_stack ? CallDescriptor::kRestoreJSSP | 1791 flags |= to_native_stack ? CallDescriptor::kRestoreJSSP |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2073 return new (instruction_zone()) FrameStateDescriptor( | 2067 return new (instruction_zone()) FrameStateDescriptor( |
2074 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2068 instruction_zone(), state_info.type(), state_info.bailout_id(), |
2075 state_info.state_combine(), parameters, locals, stack, | 2069 state_info.state_combine(), parameters, locals, stack, |
2076 state_info.shared_info(), outer_state); | 2070 state_info.shared_info(), outer_state); |
2077 } | 2071 } |
2078 | 2072 |
2079 | 2073 |
2080 } // namespace compiler | 2074 } // namespace compiler |
2081 } // namespace internal | 2075 } // namespace internal |
2082 } // namespace v8 | 2076 } // namespace v8 |
OLD | NEW |