| OLD | NEW | 
|    1 // Copyright 2015 the V8 project authors. All rights reserved. |    1 // Copyright 2015 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/access-builder.h" |    5 #include "src/compiler/access-builder.h" | 
|    6 #include "src/compiler/graph.h" |    6 #include "src/compiler/graph.h" | 
|    7 #include "src/compiler/graph-visualizer.h" |    7 #include "src/compiler/graph-visualizer.h" | 
|    8 #include "src/compiler/js-graph.h" |    8 #include "src/compiler/js-graph.h" | 
|    9 #include "src/compiler/loop-peeling.h" |    9 #include "src/compiler/loop-peeling.h" | 
|   10 #include "src/compiler/machine-operator.h" |   10 #include "src/compiler/machine-operator.h" | 
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  471                          0, 0, 1, 1, 0, 2); |  471                          0, 0, 1, 1, 0, 2); | 
|  472  |  472  | 
|  473  |  473  | 
|  474 TEST_F(LoopPeelingTest, TwoExitLoopWithCall_nope) { |  474 TEST_F(LoopPeelingTest, TwoExitLoopWithCall_nope) { | 
|  475   Node* p0 = Parameter(0); |  475   Node* p0 = Parameter(0); | 
|  476   Node* loop = graph()->NewNode(common()->Loop(2), start(), start()); |  476   Node* loop = graph()->NewNode(common()->Loop(2), start(), start()); | 
|  477   Branch b1 = NewBranch(p0, loop); |  477   Branch b1 = NewBranch(p0, loop); | 
|  478  |  478  | 
|  479   Node* call = graph()->NewNode(&kMockCall, b1.if_true); |  479   Node* call = graph()->NewNode(&kMockCall, b1.if_true); | 
|  480   Node* if_success = graph()->NewNode(common()->IfSuccess(), call); |  480   Node* if_success = graph()->NewNode(common()->IfSuccess(), call); | 
|  481   Node* if_exception = graph()->NewNode(common()->IfException(), call); |  481   Node* if_exception = graph()->NewNode( | 
 |  482       common()->IfException(IfExceptionHint::kLocallyUncaught), call); | 
|  482  |  483  | 
|  483   loop->ReplaceInput(1, if_success); |  484   loop->ReplaceInput(1, if_success); | 
|  484   Node* merge = graph()->NewNode(common()->Merge(2), b1.if_false, if_exception); |  485   Node* merge = graph()->NewNode(common()->Merge(2), b1.if_false, if_exception); | 
|  485   InsertReturn(p0, start(), merge); |  486   InsertReturn(p0, start(), merge); | 
|  486  |  487  | 
|  487   { |  488   { | 
|  488     LoopTree* loop_tree = GetLoopTree(); |  489     LoopTree* loop_tree = GetLoopTree(); | 
|  489     LoopTree::Loop* loop = loop_tree->outer_loops()[0]; |  490     LoopTree::Loop* loop = loop_tree->outer_loops()[0]; | 
|  490     EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); |  491     EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop)); | 
|  491   } |  492   } | 
|  492 } |  493 } | 
|  493  |  494  | 
|  494  |  495  | 
|  495 }  // namespace compiler |  496 }  // namespace compiler | 
|  496 }  // namespace internal |  497 }  // namespace internal | 
|  497 }  // namespace v8 |  498 }  // namespace v8 | 
| OLD | NEW |