| 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/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
| 9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Unique<Object>::CreateImmovable(isolate->factory()->undefined_value()); | 53 Unique<Object>::CreateImmovable(isolate->factory()->undefined_value()); |
| 54 return graph.NewNode(common.HeapConstant(unique)); | 54 return graph.NewNode(common.HeapConstant(unique)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 Node* EmptyFrameState(Node* context) { | 57 Node* EmptyFrameState(Node* context) { |
| 58 Node* parameters = graph.NewNode(common.StateValues(0)); | 58 Node* parameters = graph.NewNode(common.StateValues(0)); |
| 59 Node* locals = graph.NewNode(common.StateValues(0)); | 59 Node* locals = graph.NewNode(common.StateValues(0)); |
| 60 Node* stack = graph.NewNode(common.StateValues(0)); | 60 Node* stack = graph.NewNode(common.StateValues(0)); |
| 61 | 61 |
| 62 Node* state_node = | 62 Node* state_node = |
| 63 graph.NewNode(common.FrameState(JS_FRAME, BailoutId(0), kIgnoreOutput), | 63 graph.NewNode(common.FrameState(BailoutId(0), kIgnoreOutput), |
| 64 parameters, locals, stack, context, UndefinedConstant()); | 64 parameters, locals, stack, context, UndefinedConstant()); |
| 65 | 65 |
| 66 return state_node; | 66 return state_node; |
| 67 } | 67 } |
| 68 | 68 |
| 69 Node* reduce(Node* node) { | 69 Node* reduce(Node* node) { |
| 70 JSGraph jsgraph(&graph, &common, &javascript, &typer, &machine); | 70 JSGraph jsgraph(&graph, &common, &javascript, &typer, &machine); |
| 71 JSTypedLowering reducer(&jsgraph); | 71 JSTypedLowering reducer(&jsgraph); |
| 72 Reduction reduction = reducer.Reduce(node); | 72 Reduction reduction = reducer.Reduce(node); |
| 73 if (reduction.Changed()) return reduction.replacement(); | 73 if (reduction.Changed()) return reduction.replacement(); |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 CHECK_EQ(p1, r->InputAt(0)); | 1371 CHECK_EQ(p1, r->InputAt(0)); |
| 1372 CHECK_EQ(p0, r->InputAt(1)); | 1372 CHECK_EQ(p0, r->InputAt(1)); |
| 1373 } else { | 1373 } else { |
| 1374 CHECK_EQ(p0, r->InputAt(0)); | 1374 CHECK_EQ(p0, r->InputAt(0)); |
| 1375 CHECK_EQ(p1, r->InputAt(1)); | 1375 CHECK_EQ(p1, r->InputAt(1)); |
| 1376 } | 1376 } |
| 1377 } | 1377 } |
| 1378 } | 1378 } |
| 1379 } | 1379 } |
| 1380 } | 1380 } |
| OLD | NEW |