| 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/js-typed-lowering.h" | 6 #include "src/compiler/js-typed-lowering.h" |
| 7 #include "src/compiler/machine-operator.h" | 7 #include "src/compiler/machine-operator.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
| 10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 Typer typer; | 56 Typer typer; |
| 57 Node* context_node; | 57 Node* context_node; |
| 58 | 58 |
| 59 Node* Parameter(Type* t, int32_t index = 0) { | 59 Node* Parameter(Type* t, int32_t index = 0) { |
| 60 Node* n = graph.NewNode(common.Parameter(index), graph.start()); | 60 Node* n = graph.NewNode(common.Parameter(index), graph.start()); |
| 61 NodeProperties::SetBounds(n, Bounds(Type::None(), t)); | 61 NodeProperties::SetBounds(n, Bounds(Type::None(), t)); |
| 62 return n; | 62 return n; |
| 63 } | 63 } |
| 64 | 64 |
| 65 Node* UndefinedConstant() { | 65 Node* UndefinedConstant() { |
| 66 Unique<HeapObject> unique = Unique<HeapObject>::CreateImmovable( | 66 Handle<HeapObject> value = isolate->factory()->undefined_value(); |
| 67 isolate->factory()->undefined_value()); | 67 return graph.NewNode(common.HeapConstant(value)); |
| 68 return graph.NewNode(common.HeapConstant(unique)); | |
| 69 } | 68 } |
| 70 | 69 |
| 71 Node* HeapConstant(Handle<HeapObject> constant) { | 70 Node* HeapConstant(Handle<HeapObject> constant) { |
| 72 Unique<HeapObject> unique = | 71 return graph.NewNode(common.HeapConstant(constant)); |
| 73 Unique<HeapObject>::CreateUninitialized(constant); | |
| 74 return graph.NewNode(common.HeapConstant(unique)); | |
| 75 } | 72 } |
| 76 | 73 |
| 77 Node* EmptyFrameState(Node* context) { | 74 Node* EmptyFrameState(Node* context) { |
| 78 Node* parameters = graph.NewNode(common.StateValues(0)); | 75 Node* parameters = graph.NewNode(common.StateValues(0)); |
| 79 Node* locals = graph.NewNode(common.StateValues(0)); | 76 Node* locals = graph.NewNode(common.StateValues(0)); |
| 80 Node* stack = graph.NewNode(common.StateValues(0)); | 77 Node* stack = graph.NewNode(common.StateValues(0)); |
| 81 | 78 |
| 82 Node* state_node = graph.NewNode( | 79 Node* state_node = graph.NewNode( |
| 83 common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(), | 80 common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(), |
| 84 nullptr), | 81 nullptr), |
| (...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 CHECK_EQ(p1, r->InputAt(0)); | 1248 CHECK_EQ(p1, r->InputAt(0)); |
| 1252 CHECK_EQ(p0, r->InputAt(1)); | 1249 CHECK_EQ(p0, r->InputAt(1)); |
| 1253 } else { | 1250 } else { |
| 1254 CHECK_EQ(p0, r->InputAt(0)); | 1251 CHECK_EQ(p0, r->InputAt(0)); |
| 1255 CHECK_EQ(p1, r->InputAt(1)); | 1252 CHECK_EQ(p1, r->InputAt(1)); |
| 1256 } | 1253 } |
| 1257 } | 1254 } |
| 1258 } | 1255 } |
| 1259 } | 1256 } |
| 1260 } | 1257 } |
| OLD | NEW |