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

Side by Side Diff: src/compiler/x87/instruction-selector-x87.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/x87/code-generator-x87.cc ('k') | test/mjsunit/mjsunit.status » ('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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); 890 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
891 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); 891 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
892 if (hint == IfExceptionHint::kLocallyCaught) { 892 if (hint == IfExceptionHint::kLocallyCaught) {
893 flags |= CallDescriptor::kHasLocalCatchHandler; 893 flags |= CallDescriptor::kHasLocalCatchHandler;
894 } 894 }
895 flags |= CallDescriptor::kHasExceptionHandler; 895 flags |= CallDescriptor::kHasExceptionHandler;
896 buffer.instruction_args.push_back(g.Label(handler)); 896 buffer.instruction_args.push_back(g.Label(handler));
897 } 897 }
898 898
899 // Select the appropriate opcode based on the call type. 899 // Select the appropriate opcode based on the call type.
900 InstructionCode opcode; 900 InstructionCode opcode = kArchNop;
901 switch (descriptor->kind()) { 901 switch (descriptor->kind()) {
902 case CallDescriptor::kCallAddress: 902 case CallDescriptor::kCallAddress:
903 opcode = 903 opcode =
904 kArchCallCFunction | 904 kArchCallCFunction |
905 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); 905 MiscField::encode(static_cast<int>(descriptor->CParameterCount()));
906 break; 906 break;
907 case CallDescriptor::kCallCodeObject: 907 case CallDescriptor::kCallCodeObject:
908 opcode = kArchCallCodeObject | MiscField::encode(flags); 908 opcode = kArchCallCodeObject | MiscField::encode(flags);
909 break; 909 break;
910 case CallDescriptor::kCallJSFunction: 910 case CallDescriptor::kCallJSFunction:
911 opcode = kArchCallJSFunction | MiscField::encode(flags); 911 opcode = kArchCallJSFunction | MiscField::encode(flags);
912 break; 912 break;
913 default: 913 case CallDescriptor::kLazyBailout:
914 UNREACHABLE(); 914 opcode = kArchLazyBailout | MiscField::encode(flags);
915 return; 915 break;
916 } 916 }
917 917
918 // Emit the call instruction. 918 // Emit the call instruction.
919 size_t const output_count = buffer.outputs.size(); 919 size_t const output_count = buffer.outputs.size();
920 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; 920 auto* outputs = output_count ? &buffer.outputs.front() : nullptr;
921 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), 921 Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
922 &buffer.instruction_args.front())->MarkAsCall(); 922 &buffer.instruction_args.front())->MarkAsCall();
923 } 923 }
924 924
925 925
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 MachineOperatorBuilder::kFloat32Min | 1370 MachineOperatorBuilder::kFloat32Min |
1371 MachineOperatorBuilder::kFloat64Max | 1371 MachineOperatorBuilder::kFloat64Max |
1372 MachineOperatorBuilder::kFloat64Min | 1372 MachineOperatorBuilder::kFloat64Min |
1373 MachineOperatorBuilder::kWord32ShiftIsSafe; 1373 MachineOperatorBuilder::kWord32ShiftIsSafe;
1374 return flags; 1374 return flags;
1375 } 1375 }
1376 1376
1377 } // namespace compiler 1377 } // namespace compiler
1378 } // namespace internal 1378 } // namespace internal
1379 } // namespace v8 1379 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698