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

Side by Side Diff: src/compiler/mips/instruction-selector-mips.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/mips/code-generator-mips.cc ('k') | src/compiler/mips64/code-generator-mips64.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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); 577 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
578 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); 578 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
579 if (hint == IfExceptionHint::kLocallyCaught) { 579 if (hint == IfExceptionHint::kLocallyCaught) {
580 flags |= CallDescriptor::kHasLocalCatchHandler; 580 flags |= CallDescriptor::kHasLocalCatchHandler;
581 } 581 }
582 flags |= CallDescriptor::kHasExceptionHandler; 582 flags |= CallDescriptor::kHasExceptionHandler;
583 buffer.instruction_args.push_back(g.Label(handler)); 583 buffer.instruction_args.push_back(g.Label(handler));
584 } 584 }
585 585
586 // Select the appropriate opcode based on the call type. 586 // Select the appropriate opcode based on the call type.
587 InstructionCode opcode; 587 InstructionCode opcode = kArchNop;
588 switch (descriptor->kind()) { 588 switch (descriptor->kind()) {
589 case CallDescriptor::kCallAddress: 589 case CallDescriptor::kCallAddress:
590 opcode = 590 opcode =
591 kArchCallCFunction | 591 kArchCallCFunction |
592 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); 592 MiscField::encode(static_cast<int>(descriptor->CParameterCount()));
593 break; 593 break;
594 case CallDescriptor::kCallCodeObject: 594 case CallDescriptor::kCallCodeObject:
595 opcode = kArchCallCodeObject | MiscField::encode(flags); 595 opcode = kArchCallCodeObject | MiscField::encode(flags);
596 break; 596 break;
597 case CallDescriptor::kCallJSFunction: 597 case CallDescriptor::kCallJSFunction:
598 opcode = kArchCallJSFunction | MiscField::encode(flags); 598 opcode = kArchCallJSFunction | MiscField::encode(flags);
599 break; 599 break;
600 default: 600 case CallDescriptor::kLazyBailout:
601 UNREACHABLE(); 601 opcode = kArchLazyBailout | MiscField::encode(flags);
602 return; 602 break;
603 } 603 }
604 604
605 // Emit the call instruction. 605 // Emit the call instruction.
606 size_t const output_count = buffer.outputs.size(); 606 size_t const output_count = buffer.outputs.size();
607 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; 607 auto* outputs = output_count ? &buffer.outputs.front() : nullptr;
608 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), 608 Emit(opcode, output_count, outputs, buffer.instruction_args.size(),
609 &buffer.instruction_args.front())->MarkAsCall(); 609 &buffer.instruction_args.front())->MarkAsCall();
610 } 610 }
611 611
612 612
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 IsFp64Mode()) { 1151 IsFp64Mode()) {
1152 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1152 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1153 MachineOperatorBuilder::kFloat64RoundTruncate; 1153 MachineOperatorBuilder::kFloat64RoundTruncate;
1154 } 1154 }
1155 return flags; 1155 return flags;
1156 } 1156 }
1157 1157
1158 } // namespace compiler 1158 } // namespace compiler
1159 } // namespace internal 1159 } // namespace internal
1160 } // namespace v8 1160 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698