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

Unified Diff: test/unittests/compiler/graph-unittest.cc

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/compiler/graph-unittest.h ('k') | test/unittests/compiler/interpreter-assembler-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/graph-unittest.cc
diff --git a/test/unittests/compiler/graph-unittest.cc b/test/unittests/compiler/graph-unittest.cc
index 6b8546b95a4380bd5b49462aa2a7e845ff141cf4..2b297100c2cd0cc94fd09687cc1a01c2f2aee129 100644
--- a/test/unittests/compiler/graph-unittest.cc
+++ b/test/unittests/compiler/graph-unittest.cc
@@ -51,33 +51,25 @@ Node* GraphTest::NumberConstant(volatile double value) {
Node* GraphTest::HeapConstant(const Handle<HeapObject>& value) {
- return HeapConstant(Unique<HeapObject>::CreateUninitialized(value));
-}
-
-
-Node* GraphTest::HeapConstant(const Unique<HeapObject>& value) {
Node* node = graph()->NewNode(common()->HeapConstant(value));
- Type* type = Type::Constant(value.handle(), zone());
+ Type* type = Type::Constant(value, zone());
NodeProperties::SetBounds(node, Bounds(type));
return node;
}
Node* GraphTest::FalseConstant() {
- return HeapConstant(
- Unique<HeapObject>::CreateImmovable(factory()->false_value()));
+ return HeapConstant(factory()->false_value());
}
Node* GraphTest::TrueConstant() {
- return HeapConstant(
- Unique<HeapObject>::CreateImmovable(factory()->true_value()));
+ return HeapConstant(factory()->true_value());
}
Node* GraphTest::UndefinedConstant() {
- return HeapConstant(
- Unique<HeapObject>::CreateImmovable(factory()->undefined_value()));
+ return HeapConstant(factory()->undefined_value());
}
@@ -92,20 +84,17 @@ Node* GraphTest::EmptyFrameState() {
Matcher<Node*> GraphTest::IsFalseConstant() {
- return IsHeapConstant(
- Unique<HeapObject>::CreateImmovable(factory()->false_value()));
+ return IsHeapConstant(factory()->false_value());
}
Matcher<Node*> GraphTest::IsTrueConstant() {
- return IsHeapConstant(
- Unique<HeapObject>::CreateImmovable(factory()->true_value()));
+ return IsHeapConstant(factory()->true_value());
}
Matcher<Node*> GraphTest::IsUndefinedConstant() {
- return IsHeapConstant(
- Unique<HeapObject>::CreateImmovable(factory()->undefined_value()));
+ return IsHeapConstant(factory()->undefined_value());
}
« no previous file with comments | « test/unittests/compiler/graph-unittest.h ('k') | test/unittests/compiler/interpreter-assembler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698