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/schedule.cc

Issue 961973002: [turbofan] First shot at eager deoptimization in Turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 2 Created 5 years, 9 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/schedule.h" 5 #include "src/compiler/schedule.h"
6 6
7 #include "src/compiler/node.h" 7 #include "src/compiler/node.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 case BasicBlock::kNone: 99 case BasicBlock::kNone:
100 return os << "none"; 100 return os << "none";
101 case BasicBlock::kGoto: 101 case BasicBlock::kGoto:
102 return os << "goto"; 102 return os << "goto";
103 case BasicBlock::kCall: 103 case BasicBlock::kCall:
104 return os << "call"; 104 return os << "call";
105 case BasicBlock::kBranch: 105 case BasicBlock::kBranch:
106 return os << "branch"; 106 return os << "branch";
107 case BasicBlock::kSwitch: 107 case BasicBlock::kSwitch:
108 return os << "switch"; 108 return os << "switch";
109 case BasicBlock::kDeoptimize:
110 return os << "deoptimize";
109 case BasicBlock::kReturn: 111 case BasicBlock::kReturn:
110 return os << "return"; 112 return os << "return";
111 case BasicBlock::kThrow: 113 case BasicBlock::kThrow:
112 return os << "throw"; 114 return os << "throw";
113 } 115 }
114 UNREACHABLE(); 116 UNREACHABLE();
115 return os; 117 return os;
116 } 118 }
117 119
118 120
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 234
233 235
234 void Schedule::AddReturn(BasicBlock* block, Node* input) { 236 void Schedule::AddReturn(BasicBlock* block, Node* input) {
235 DCHECK_EQ(BasicBlock::kNone, block->control()); 237 DCHECK_EQ(BasicBlock::kNone, block->control());
236 block->set_control(BasicBlock::kReturn); 238 block->set_control(BasicBlock::kReturn);
237 SetControlInput(block, input); 239 SetControlInput(block, input);
238 if (block != end()) AddSuccessor(block, end()); 240 if (block != end()) AddSuccessor(block, end());
239 } 241 }
240 242
241 243
244 void Schedule::AddDeoptimize(BasicBlock* block, Node* input) {
245 DCHECK_EQ(BasicBlock::kNone, block->control());
246 block->set_control(BasicBlock::kDeoptimize);
247 SetControlInput(block, input);
248 if (block != end()) AddSuccessor(block, end());
249 }
250
251
242 void Schedule::AddThrow(BasicBlock* block, Node* input) { 252 void Schedule::AddThrow(BasicBlock* block, Node* input) {
243 DCHECK_EQ(BasicBlock::kNone, block->control()); 253 DCHECK_EQ(BasicBlock::kNone, block->control());
244 block->set_control(BasicBlock::kThrow); 254 block->set_control(BasicBlock::kThrow);
245 SetControlInput(block, input); 255 SetControlInput(block, input);
246 if (block != end()) AddSuccessor(block, end()); 256 if (block != end()) AddSuccessor(block, end());
247 } 257 }
248 258
249 259
250 void Schedule::InsertBranch(BasicBlock* block, BasicBlock* end, Node* branch, 260 void Schedule::InsertBranch(BasicBlock* block, BasicBlock* end, Node* branch,
251 BasicBlock* tblock, BasicBlock* fblock) { 261 BasicBlock* tblock, BasicBlock* fblock) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 364 }
355 os << "\n"; 365 os << "\n";
356 } 366 }
357 } 367 }
358 return os; 368 return os;
359 } 369 }
360 370
361 } // namespace compiler 371 } // namespace compiler
362 } // namespace internal 372 } // namespace internal
363 } // namespace v8 373 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698