| 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 = | 67 Node* result = graph()->NewNode(op, empty_values_, locals, empty_values_, |
| 68 graph()->NewNode(op, empty_values_, locals, empty_values_, | 68 jsgraph()->UndefinedConstant(), |
| 69 jsgraph()->UndefinedConstant(), | 69 jsgraph()->UndefinedConstant()); |
| 70 jsgraph()->UndefinedConstant(), graph()->start()); | |
| 71 | 70 |
| 72 current_block_->Checkpoint(result); | 71 current_block_->Checkpoint(result); |
| 73 return result; | 72 return result; |
| 74 } | 73 } |
| 75 | 74 |
| 76 void Bind(int var) { current_block()->Bind(var); } | 75 void Bind(int var) { current_block()->Bind(var); } |
| 77 void Lookup(int var) { current_block()->Lookup(var); } | 76 void Lookup(int var) { current_block()->Lookup(var); } |
| 78 | 77 |
| 79 class CheckpointMatcher : public MatcherInterface<Node*> { | 78 class CheckpointMatcher : public MatcherInterface<Node*> { |
| 80 public: | 79 public: |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); | 368 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); |
| 370 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); | 369 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); |
| 371 | 370 |
| 372 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); | 371 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); |
| 373 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); | 372 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); |
| 374 } | 373 } |
| 375 | 374 |
| 376 } // namespace compiler | 375 } // namespace compiler |
| 377 } // namespace internal | 376 } // namespace internal |
| 378 } // namespace v8 | 377 } // namespace v8 |
| OLD | NEW |