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

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

Issue 943503003: Emit exception handler table in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_trycatch-4
Patch Set: Fix Win64 compilation failure. Created 5 years, 10 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/instruction-selector.h ('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/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/compiler/instruction-selector-impl.h" 9 #include "src/compiler/instruction-selector-impl.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 #endif 499 #endif
500 500
501 Node* input = block->control_input(); 501 Node* input = block->control_input();
502 switch (block->control()) { 502 switch (block->control()) {
503 case BasicBlock::kGoto: 503 case BasicBlock::kGoto:
504 return VisitGoto(block->SuccessorAt(0)); 504 return VisitGoto(block->SuccessorAt(0));
505 case BasicBlock::kCall: { 505 case BasicBlock::kCall: {
506 DCHECK_EQ(IrOpcode::kCall, input->opcode()); 506 DCHECK_EQ(IrOpcode::kCall, input->opcode());
507 BasicBlock* success = block->SuccessorAt(0); 507 BasicBlock* success = block->SuccessorAt(0);
508 // TODO(mstarzinger): Record location of {exception} in {handler_table}. 508 BasicBlock* exception = block->SuccessorAt(1);
509 // BasicBlock* exception = block->SuccessorAt(1); 509 return VisitCall(input, exception), VisitGoto(success);
510 return VisitCall(input), VisitGoto(success);
511 } 510 }
512 case BasicBlock::kBranch: { 511 case BasicBlock::kBranch: {
513 DCHECK_EQ(IrOpcode::kBranch, input->opcode()); 512 DCHECK_EQ(IrOpcode::kBranch, input->opcode());
514 BasicBlock* tbranch = block->SuccessorAt(0); 513 BasicBlock* tbranch = block->SuccessorAt(0);
515 BasicBlock* fbranch = block->SuccessorAt(1); 514 BasicBlock* fbranch = block->SuccessorAt(1);
516 if (tbranch == fbranch) return VisitGoto(tbranch); 515 if (tbranch == fbranch) return VisitGoto(tbranch);
517 // Treat special Branch(Always, IfTrue, IfFalse) as Goto(IfTrue). 516 // Treat special Branch(Always, IfTrue, IfFalse) as Goto(IfTrue).
518 Node* const condition = input->InputAt(0); 517 Node* const condition = input->InputAt(0);
519 if (condition->opcode() == IrOpcode::kAlways) return VisitGoto(tbranch); 518 if (condition->opcode() == IrOpcode::kAlways) return VisitGoto(tbranch);
520 return VisitBranch(input, tbranch, fbranch); 519 return VisitBranch(input, tbranch, fbranch);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 case IrOpcode::kFloat64Constant: 748 case IrOpcode::kFloat64Constant:
750 return MarkAsDouble(node), VisitConstant(node); 749 return MarkAsDouble(node), VisitConstant(node);
751 case IrOpcode::kHeapConstant: 750 case IrOpcode::kHeapConstant:
752 return MarkAsReference(node), VisitConstant(node); 751 return MarkAsReference(node), VisitConstant(node);
753 case IrOpcode::kNumberConstant: { 752 case IrOpcode::kNumberConstant: {
754 double value = OpParameter<double>(node); 753 double value = OpParameter<double>(node);
755 if (!IsSmiDouble(value)) MarkAsReference(node); 754 if (!IsSmiDouble(value)) MarkAsReference(node);
756 return VisitConstant(node); 755 return VisitConstant(node);
757 } 756 }
758 case IrOpcode::kCall: 757 case IrOpcode::kCall:
759 return VisitCall(node); 758 return VisitCall(node, nullptr);
760 case IrOpcode::kFrameState: 759 case IrOpcode::kFrameState:
761 case IrOpcode::kStateValues: 760 case IrOpcode::kStateValues:
762 return; 761 return;
763 case IrOpcode::kLoad: { 762 case IrOpcode::kLoad: {
764 LoadRepresentation rep = OpParameter<LoadRepresentation>(node); 763 LoadRepresentation rep = OpParameter<LoadRepresentation>(node);
765 MarkAsRepresentation(rep, node); 764 MarkAsRepresentation(rep, node);
766 return VisitLoad(node); 765 return VisitLoad(node);
767 } 766 }
768 case IrOpcode::kStore: 767 case IrOpcode::kStore:
769 return VisitStore(node); 768 return VisitStore(node);
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 MachineOperatorBuilder::Flags 1213 MachineOperatorBuilder::Flags
1215 InstructionSelector::SupportedMachineOperatorFlags() { 1214 InstructionSelector::SupportedMachineOperatorFlags() {
1216 return MachineOperatorBuilder::Flag::kNoFlags; 1215 return MachineOperatorBuilder::Flag::kNoFlags;
1217 } 1216 }
1218 1217
1219 #endif // !V8_TURBOFAN_BACKEND 1218 #endif // !V8_TURBOFAN_BACKEND
1220 1219
1221 } // namespace compiler 1220 } // namespace compiler
1222 } // namespace internal 1221 } // namespace internal
1223 } // namespace v8 1222 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698