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

Side by Side Diff: src/compiler/arm/instruction-selector-arm.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/arm/code-generator-arm.cc ('k') | src/compiler/arm64/code-generator-arm64.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 "src/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); 1157 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
1158 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); 1158 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
1159 if (hint == IfExceptionHint::kLocallyCaught) { 1159 if (hint == IfExceptionHint::kLocallyCaught) {
1160 flags |= CallDescriptor::kHasLocalCatchHandler; 1160 flags |= CallDescriptor::kHasLocalCatchHandler;
1161 } 1161 }
1162 flags |= CallDescriptor::kHasExceptionHandler; 1162 flags |= CallDescriptor::kHasExceptionHandler;
1163 buffer.instruction_args.push_back(g.Label(handler)); 1163 buffer.instruction_args.push_back(g.Label(handler));
1164 } 1164 }
1165 1165
1166 // Select the appropriate opcode based on the call type. 1166 // Select the appropriate opcode based on the call type.
1167 InstructionCode opcode; 1167 InstructionCode opcode = kArchNop;
1168 switch (descriptor->kind()) { 1168 switch (descriptor->kind()) {
1169 case CallDescriptor::kCallAddress: 1169 case CallDescriptor::kCallAddress:
1170 opcode = 1170 opcode =
1171 kArchCallCFunction | 1171 kArchCallCFunction |
1172 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); 1172 MiscField::encode(static_cast<int>(descriptor->CParameterCount()));
1173 break; 1173 break;
1174 case CallDescriptor::kCallCodeObject: 1174 case CallDescriptor::kCallCodeObject:
1175 opcode = kArchCallCodeObject | MiscField::encode(flags); 1175 opcode = kArchCallCodeObject | MiscField::encode(flags);
1176 break; 1176 break;
1177 case CallDescriptor::kCallJSFunction: 1177 case CallDescriptor::kCallJSFunction:
1178 opcode = kArchCallJSFunction | MiscField::encode(flags); 1178 opcode = kArchCallJSFunction | MiscField::encode(flags);
1179 break; 1179 break;
1180 default: 1180 case CallDescriptor::kLazyBailout:
1181 UNREACHABLE(); 1181 opcode = kArchLazyBailout | MiscField::encode(flags);
1182 return; 1182 break;
1183 } 1183 }
1184 1184
1185 // Emit the call instruction. 1185 // Emit the call instruction.
1186 size_t const output_count = buffer.outputs.size(); 1186 size_t const output_count = buffer.outputs.size();
1187 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; 1187 auto* outputs = output_count ? &buffer.outputs.front() : nullptr;
1188 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), 1188 Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
1189 &buffer.instruction_args.front())->MarkAsCall(); 1189 &buffer.instruction_args.front())->MarkAsCall();
1190 } 1190 }
1191 1191
1192 1192
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1666 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1667 MachineOperatorBuilder::kFloat64RoundTruncate | 1667 MachineOperatorBuilder::kFloat64RoundTruncate |
1668 MachineOperatorBuilder::kFloat64RoundTiesAway; 1668 MachineOperatorBuilder::kFloat64RoundTiesAway;
1669 } 1669 }
1670 return flags; 1670 return flags;
1671 } 1671 }
1672 1672
1673 } // namespace compiler 1673 } // namespace compiler
1674 } // namespace internal 1674 } // namespace internal
1675 } // namespace v8 1675 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698