Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698