Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 1412443003: [turbofan] Introduce lazy bailout, masked as a call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable test Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/compiler/x87/code-generator-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); 1125 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
1126 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); 1126 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
1127 if (hint == IfExceptionHint::kLocallyCaught) { 1127 if (hint == IfExceptionHint::kLocallyCaught) {
1128 flags |= CallDescriptor::kHasLocalCatchHandler; 1128 flags |= CallDescriptor::kHasLocalCatchHandler;
1129 } 1129 }
1130 flags |= CallDescriptor::kHasExceptionHandler; 1130 flags |= CallDescriptor::kHasExceptionHandler;
1131 buffer.instruction_args.push_back(g.Label(handler)); 1131 buffer.instruction_args.push_back(g.Label(handler));
1132 } 1132 }
1133 1133
1134 // Select the appropriate opcode based on the call type. 1134 // Select the appropriate opcode based on the call type.
1135 InstructionCode opcode; 1135 InstructionCode opcode = kArchNop;
1136 switch (descriptor->kind()) { 1136 switch (descriptor->kind()) {
1137 case CallDescriptor::kCallAddress: 1137 case CallDescriptor::kCallAddress:
1138 opcode = 1138 opcode =
1139 kArchCallCFunction | 1139 kArchCallCFunction |
1140 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); 1140 MiscField::encode(static_cast<int>(descriptor->CParameterCount()));
1141 break; 1141 break;
1142 case CallDescriptor::kCallCodeObject: 1142 case CallDescriptor::kCallCodeObject:
1143 opcode = kArchCallCodeObject | MiscField::encode(flags); 1143 opcode = kArchCallCodeObject | MiscField::encode(flags);
1144 break; 1144 break;
1145 case CallDescriptor::kCallJSFunction: 1145 case CallDescriptor::kCallJSFunction:
1146 opcode = kArchCallJSFunction | MiscField::encode(flags); 1146 opcode = kArchCallJSFunction | MiscField::encode(flags);
1147 break; 1147 break;
1148 default: 1148 case CallDescriptor::kLazyBailout:
1149 UNREACHABLE(); 1149 opcode = kArchLazyBailout | MiscField::encode(flags);
1150 return; 1150 break;
1151 } 1151 }
1152 1152
1153 // Emit the call instruction. 1153 // Emit the call instruction.
1154 size_t const output_count = buffer.outputs.size(); 1154 size_t const output_count = buffer.outputs.size();
1155 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; 1155 auto* outputs = output_count ? &buffer.outputs.front() : nullptr;
1156 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), 1156 Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
1157 &buffer.instruction_args.front())->MarkAsCall(); 1157 &buffer.instruction_args.front())->MarkAsCall();
1158 } 1158 }
1159 1159
1160 1160
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 if (CpuFeatures::IsSupported(SSE4_1)) { 1724 if (CpuFeatures::IsSupported(SSE4_1)) {
1725 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1725 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1726 MachineOperatorBuilder::kFloat64RoundTruncate; 1726 MachineOperatorBuilder::kFloat64RoundTruncate;
1727 } 1727 }
1728 return flags; 1728 return flags;
1729 } 1729 }
1730 1730
1731 } // namespace compiler 1731 } // namespace compiler
1732 } // namespace internal 1732 } // namespace internal
1733 } // namespace v8 1733 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/compiler/x87/code-generator-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698