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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.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/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction-codes.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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); 900 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
901 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); 901 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
902 if (hint == IfExceptionHint::kLocallyCaught) { 902 if (hint == IfExceptionHint::kLocallyCaught) {
903 flags |= CallDescriptor::kHasLocalCatchHandler; 903 flags |= CallDescriptor::kHasLocalCatchHandler;
904 } 904 }
905 flags |= CallDescriptor::kHasExceptionHandler; 905 flags |= CallDescriptor::kHasExceptionHandler;
906 buffer.instruction_args.push_back(g.Label(handler)); 906 buffer.instruction_args.push_back(g.Label(handler));
907 } 907 }
908 908
909 // Select the appropriate opcode based on the call type. 909 // Select the appropriate opcode based on the call type.
910 InstructionCode opcode; 910 InstructionCode opcode = kArchNop;
911 switch (descriptor->kind()) { 911 switch (descriptor->kind()) {
912 case CallDescriptor::kCallAddress: 912 case CallDescriptor::kCallAddress:
913 opcode = 913 opcode =
914 kArchCallCFunction | 914 kArchCallCFunction |
915 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); 915 MiscField::encode(static_cast<int>(descriptor->CParameterCount()));
916 break; 916 break;
917 case CallDescriptor::kCallCodeObject: 917 case CallDescriptor::kCallCodeObject:
918 opcode = kArchCallCodeObject | MiscField::encode(flags); 918 opcode = kArchCallCodeObject | MiscField::encode(flags);
919 break; 919 break;
920 case CallDescriptor::kCallJSFunction: 920 case CallDescriptor::kCallJSFunction:
921 opcode = kArchCallJSFunction | MiscField::encode(flags); 921 opcode = kArchCallJSFunction | MiscField::encode(flags);
922 break; 922 break;
923 default: 923 case CallDescriptor::kLazyBailout:
924 UNREACHABLE(); 924 opcode = kArchLazyBailout | MiscField::encode(flags);
925 return; 925 break;
926 } 926 }
927 927
928 // Emit the call instruction. 928 // Emit the call instruction.
929 size_t const output_count = buffer.outputs.size(); 929 size_t const output_count = buffer.outputs.size();
930 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; 930 auto* outputs = output_count ? &buffer.outputs.front() : nullptr;
931 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), 931 Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
932 &buffer.instruction_args.front())->MarkAsCall(); 932 &buffer.instruction_args.front())->MarkAsCall();
933 } 933 }
934 934
935 935
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 if (CpuFeatures::IsSupported(SSE4_1)) { 1377 if (CpuFeatures::IsSupported(SSE4_1)) {
1378 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1378 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1379 MachineOperatorBuilder::kFloat64RoundTruncate; 1379 MachineOperatorBuilder::kFloat64RoundTruncate;
1380 } 1380 }
1381 return flags; 1381 return flags;
1382 } 1382 }
1383 1383
1384 } // namespace compiler 1384 } // namespace compiler
1385 } // namespace internal 1385 } // namespace internal
1386 } // namespace v8 1386 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction-codes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698