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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 class CheckpointMatcher : public MatcherInterface<Node*> { | 73 class CheckpointMatcher : public MatcherInterface<Node*> { |
74 public: | 74 public: |
75 explicit CheckpointMatcher(const char* liveness, Node* empty_values, | 75 explicit CheckpointMatcher(const char* liveness, Node* empty_values, |
76 int locals_count, Node* replacement) | 76 int locals_count, Node* replacement) |
77 : liveness_(liveness), | 77 : liveness_(liveness), |
78 empty_values_(empty_values), | 78 empty_values_(empty_values), |
79 locals_count_(locals_count), | 79 locals_count_(locals_count), |
80 replacement_(replacement) {} | 80 replacement_(replacement) {} |
81 | 81 |
82 void DescribeTo(std::ostream* os) const OVERRIDE { | 82 void DescribeTo(std::ostream* os) const override { |
83 *os << "is a frame state with '" << liveness_ | 83 *os << "is a frame state with '" << liveness_ |
84 << "' liveness, empty " | 84 << "' liveness, empty " |
85 "parameters and empty expression stack"; | 85 "parameters and empty expression stack"; |
86 } | 86 } |
87 | 87 |
88 bool MatchAndExplain(Node* frame_state, | 88 bool MatchAndExplain(Node* frame_state, |
89 MatchResultListener* listener) const OVERRIDE { | 89 MatchResultListener* listener) const override { |
90 if (frame_state == NULL) { | 90 if (frame_state == NULL) { |
91 *listener << "which is NULL"; | 91 *listener << "which is NULL"; |
92 return false; | 92 return false; |
93 } | 93 } |
94 DCHECK(frame_state->opcode() == IrOpcode::kFrameState); | 94 DCHECK(frame_state->opcode() == IrOpcode::kFrameState); |
95 | 95 |
96 FrameStateCallInfo state_info = | 96 FrameStateCallInfo state_info = |
97 OpParameter<FrameStateCallInfo>(frame_state); | 97 OpParameter<FrameStateCallInfo>(frame_state); |
98 int ast_num = state_info.bailout_id().ToInt(); | 98 int ast_num = state_info.bailout_id().ToInt(); |
99 int first_const = intconst_from_bailout_id(ast_num, locals_count_); | 99 int first_const = intconst_from_bailout_id(ast_num, locals_count_); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); | 364 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); |
365 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); | 365 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); |
366 | 366 |
367 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); | 367 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); |
368 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); | 368 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); |
369 } | 369 } |
370 | 370 |
371 } // namespace compiler | 371 } // namespace compiler |
372 } // namespace internal | 372 } // namespace internal |
373 } // namespace v8 | 373 } // namespace v8 |
OLD | NEW |