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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 Typer typer; | 42 Typer typer; |
43 Node* context_node; | 43 Node* context_node; |
44 | 44 |
45 Node* Parameter(Type* t, int32_t index = 0) { | 45 Node* Parameter(Type* t, int32_t index = 0) { |
46 Node* n = graph.NewNode(common.Parameter(index), graph.start()); | 46 Node* n = graph.NewNode(common.Parameter(index), graph.start()); |
47 NodeProperties::SetBounds(n, Bounds(Type::None(), t)); | 47 NodeProperties::SetBounds(n, Bounds(Type::None(), t)); |
48 return n; | 48 return n; |
49 } | 49 } |
50 | 50 |
51 Node* UndefinedConstant() { | 51 Node* UndefinedConstant() { |
52 Unique<Object> unique = | 52 Unique<HeapObject> unique = Unique<HeapObject>::CreateImmovable( |
53 Unique<Object>::CreateImmovable(isolate->factory()->undefined_value()); | 53 isolate->factory()->undefined_value()); |
54 return graph.NewNode(common.HeapConstant(unique)); | 54 return graph.NewNode(common.HeapConstant(unique)); |
55 } | 55 } |
56 | 56 |
57 Node* HeapConstant(Handle<Object> constant) { | 57 Node* HeapConstant(Handle<HeapObject> constant) { |
58 Unique<Object> unique = Unique<Object>::CreateUninitialized(constant); | 58 Unique<HeapObject> unique = |
| 59 Unique<HeapObject>::CreateUninitialized(constant); |
59 return graph.NewNode(common.HeapConstant(unique)); | 60 return graph.NewNode(common.HeapConstant(unique)); |
60 } | 61 } |
61 | 62 |
62 Node* EmptyFrameState(Node* context) { | 63 Node* EmptyFrameState(Node* context) { |
63 Node* parameters = graph.NewNode(common.StateValues(0)); | 64 Node* parameters = graph.NewNode(common.StateValues(0)); |
64 Node* locals = graph.NewNode(common.StateValues(0)); | 65 Node* locals = graph.NewNode(common.StateValues(0)); |
65 Node* stack = graph.NewNode(common.StateValues(0)); | 66 Node* stack = graph.NewNode(common.StateValues(0)); |
66 | 67 |
67 Node* state_node = | 68 Node* state_node = |
68 graph.NewNode(common.FrameState(JS_FRAME, BailoutId(0), | 69 graph.NewNode(common.FrameState(JS_FRAME, BailoutId(0), |
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 CHECK_EQ(p1, r->InputAt(0)); | 1378 CHECK_EQ(p1, r->InputAt(0)); |
1378 CHECK_EQ(p0, r->InputAt(1)); | 1379 CHECK_EQ(p0, r->InputAt(1)); |
1379 } else { | 1380 } else { |
1380 CHECK_EQ(p0, r->InputAt(0)); | 1381 CHECK_EQ(p0, r->InputAt(0)); |
1381 CHECK_EQ(p1, r->InputAt(1)); | 1382 CHECK_EQ(p1, r->InputAt(1)); |
1382 } | 1383 } |
1383 } | 1384 } |
1384 } | 1385 } |
1385 } | 1386 } |
1386 } | 1387 } |
OLD | NEW |