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

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.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/arm64/code-generator-arm64.cc ('k') | src/compiler/ast-graph-builder.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/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); 1470 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
1471 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); 1471 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
1472 if (hint == IfExceptionHint::kLocallyCaught) { 1472 if (hint == IfExceptionHint::kLocallyCaught) {
1473 flags |= CallDescriptor::kHasLocalCatchHandler; 1473 flags |= CallDescriptor::kHasLocalCatchHandler;
1474 } 1474 }
1475 flags |= CallDescriptor::kHasExceptionHandler; 1475 flags |= CallDescriptor::kHasExceptionHandler;
1476 buffer.instruction_args.push_back(g.Label(handler)); 1476 buffer.instruction_args.push_back(g.Label(handler));
1477 } 1477 }
1478 1478
1479 // Select the appropriate opcode based on the call type. 1479 // Select the appropriate opcode based on the call type.
1480 InstructionCode opcode; 1480 InstructionCode opcode = kArchNop;
1481 switch (descriptor->kind()) { 1481 switch (descriptor->kind()) {
1482 case CallDescriptor::kCallAddress: 1482 case CallDescriptor::kCallAddress:
1483 opcode = 1483 opcode =
1484 kArchCallCFunction | 1484 kArchCallCFunction |
1485 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); 1485 MiscField::encode(static_cast<int>(descriptor->CParameterCount()));
1486 break; 1486 break;
1487 case CallDescriptor::kCallCodeObject: 1487 case CallDescriptor::kCallCodeObject:
1488 opcode = kArchCallCodeObject | MiscField::encode(flags); 1488 opcode = kArchCallCodeObject | MiscField::encode(flags);
1489 break; 1489 break;
1490 case CallDescriptor::kCallJSFunction: 1490 case CallDescriptor::kCallJSFunction:
1491 opcode = kArchCallJSFunction | MiscField::encode(flags); 1491 opcode = kArchCallJSFunction | MiscField::encode(flags);
1492 break; 1492 break;
1493 default: 1493 case CallDescriptor::kLazyBailout:
1494 UNREACHABLE(); 1494 opcode = kArchLazyBailout | MiscField::encode(flags);
1495 return; 1495 break;
1496 } 1496 }
1497 1497
1498 // Emit the call instruction. 1498 // Emit the call instruction.
1499 size_t const output_count = buffer.outputs.size(); 1499 size_t const output_count = buffer.outputs.size();
1500 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; 1500 auto* outputs = output_count ? &buffer.outputs.front() : nullptr;
1501 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), 1501 Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
1502 &buffer.instruction_args.front())->MarkAsCall(); 1502 &buffer.instruction_args.front())->MarkAsCall();
1503 } 1503 }
1504 1504
1505 1505
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 MachineOperatorBuilder::kFloat64RoundTruncate | 2117 MachineOperatorBuilder::kFloat64RoundTruncate |
2118 MachineOperatorBuilder::kFloat64RoundTiesAway | 2118 MachineOperatorBuilder::kFloat64RoundTiesAway |
2119 MachineOperatorBuilder::kWord32ShiftIsSafe | 2119 MachineOperatorBuilder::kWord32ShiftIsSafe |
2120 MachineOperatorBuilder::kInt32DivIsSafe | 2120 MachineOperatorBuilder::kInt32DivIsSafe |
2121 MachineOperatorBuilder::kUint32DivIsSafe; 2121 MachineOperatorBuilder::kUint32DivIsSafe;
2122 } 2122 }
2123 2123
2124 } // namespace compiler 2124 } // namespace compiler
2125 } // namespace internal 2125 } // namespace internal
2126 } // namespace v8 2126 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698