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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ZoneVector<Node*> local_inputs(locals_count_, nullptr, zone()); | 53 ZoneVector<Node*> local_inputs(locals_count_, nullptr, zone()); |
54 for (int i = 0; i < locals_count_; i++) { | 54 for (int i = 0; i < locals_count_; i++) { |
55 local_inputs[i] = jsgraph()->Int32Constant(i + first_const); | 55 local_inputs[i] = jsgraph()->Int32Constant(i + first_const); |
56 } | 56 } |
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>()); | 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 = graph()->NewNode(op, empty_values_, locals, empty_values_, |
68 jsgraph()->UndefinedConstant(), | 68 jsgraph()->UndefinedConstant(), |
69 jsgraph()->UndefinedConstant()); | 69 jsgraph()->UndefinedConstant()); |
70 | 70 |
71 current_block_->Checkpoint(result); | 71 current_block_->Checkpoint(result); |
72 return result; | 72 return result; |
73 } | 73 } |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); | 368 EXPECT_THAT(c1_in_loop, IsCheckpointModuloLiveness(".L.L")); |
369 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); | 369 EXPECT_THAT(c2_in_loop, IsCheckpointModuloLiveness("LL.L")); |
370 | 370 |
371 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); | 371 EXPECT_THAT(c1_end, IsCheckpointModuloLiveness(".LL.")); |
372 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); | 372 EXPECT_THAT(c2_end, IsCheckpointModuloLiveness("....")); |
373 } | 373 } |
374 | 374 |
375 } // namespace compiler | 375 } // namespace compiler |
376 } // namespace internal | 376 } // namespace internal |
377 } // namespace v8 | 377 } // namespace v8 |
OLD | NEW |