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

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

Issue 1158563008: [turbofan] Introduce prediction for exception handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Architecture ports. Created 5 years, 6 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/common-operator.cc ('k') | src/compiler/linkage.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698