| OLD | NEW |
| 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/js-graph.h" | 5 #include "src/compiler/js-graph.h" |
| 6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
| 7 #include "src/compiler/liveness-analyzer.h" | 7 #include "src/compiler/liveness-analyzer.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/state-values-utils.h" | 9 #include "src/compiler/state-values-utils.h" |
| 10 #include "test/unittests/compiler/graph-unittest.h" | 10 #include "test/unittests/compiler/graph-unittest.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 Node* locals = | 57 Node* locals = |
| 58 graph()->NewNode(locals_op, locals_count_, &local_inputs.front()); | 58 graph()->NewNode(locals_op, locals_count_, &local_inputs.front()); |
| 59 | 59 |
| 60 const FrameStateFunctionInfo* state_info = | 60 const FrameStateFunctionInfo* state_info = |
| 61 common()->CreateFrameStateFunctionInfo( | 61 common()->CreateFrameStateFunctionInfo( |
| 62 FrameStateType::kJavaScriptFunction, 0, locals_count_, | 62 FrameStateType::kJavaScriptFunction, 0, locals_count_, |
| 63 Handle<SharedFunctionInfo>(), CALL_MAINTAINS_NATIVE_CONTEXT); | 63 Handle<SharedFunctionInfo>(), CALL_MAINTAINS_NATIVE_CONTEXT); |
| 64 | 64 |
| 65 const Operator* op = common()->FrameState( | 65 const Operator* op = common()->FrameState( |
| 66 BailoutId(ast_num), OutputFrameStateCombine::Ignore(), state_info); | 66 BailoutId(ast_num), OutputFrameStateCombine::Ignore(), state_info); |
| 67 Node* result = graph()->NewNode(op, empty_values_, locals, empty_values_, | 67 Node* result = |
| 68 jsgraph()->UndefinedConstant(), | 68 graph()->NewNode(op, empty_values_, locals, empty_values_, |
| 69 jsgraph()->UndefinedConstant()); | 69 jsgraph()->UndefinedConstant(), |
| 70 jsgraph()->UndefinedConstant(), graph()->start()); |
| 70 | 71 |
| 71 current_block_->Checkpoint(result); | 72 current_block_->Checkpoint(result); |
| 72 return result; | 73 return result; |
| 73 } | 74 } |
| 74 | 75 |
| 75 void Bind(int var) { current_block()->Bind(var); } | 76 void Bind(int var) { current_block()->Bind(var); } |
| 76 void Lookup(int var) { current_block()->Lookup(var); } | 77 void Lookup(int var) { current_block()->Lookup(var); } |
| 77 | 78 |
| 78 class CheckpointMatcher : public MatcherInterface<Node*> { | 79 class CheckpointMatcher : public MatcherInterface<Node*> { |
| 79 public: | 80 public: |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); | 369 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); |
| 369 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); | 370 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); |
| 370 | 371 |
| 371 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); | 372 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); |
| 372 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); | 373 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); |
| 373 } | 374 } |
| 374 | 375 |
| 375 } // namespace compiler | 376 } // namespace compiler |
| 376 } // namespace internal | 377 } // namespace internal |
| 377 } // namespace v8 | 378 } // namespace v8 |
| OLD | NEW |