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

Unified Diff: test/unittests/compiler/js-type-feedback-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
Index: test/unittests/compiler/js-type-feedback-unittest.cc
diff --git a/test/unittests/compiler/js-type-feedback-unittest.cc b/test/unittests/compiler/js-type-feedback-unittest.cc
index 251293ddcf3c5d8e0c510832c50e303aeb42e93e..3f981f74accac054498c7d110d2839fc2635de81 100644
--- a/test/unittests/compiler/js-type-feedback-unittest.cc
+++ b/test/unittests/compiler/js-type-feedback-unittest.cc
@@ -82,8 +82,7 @@ class JSTypeFeedbackTest : public TypedGraphTest {
Node* vector = UndefinedConstant();
Node* context = UndefinedConstant();
- Unique<Name> name = Unique<Name>::CreateUninitialized(
- isolate()->factory()->InternalizeUtf8String(string));
+ Handle<Name> name = isolate()->factory()->InternalizeUtf8String(string);
const Operator* op = javascript()->LoadGlobal(name, feedback);
Node* load = graph()->NewNode(op, context, global, vector, context);
if (mode == JSTypeFeedbackSpecializer::kDeoptimizationEnabled) {
@@ -193,10 +192,9 @@ TEST_F(JSTypeFeedbackTest, JSLoadNamedGlobalConstNumberWithDeoptimization) {
TEST_F(JSTypeFeedbackTest, JSLoadNamedGlobalConstString) {
- Unique<HeapObject> kValue = Unique<HeapObject>::CreateImmovable(
- isolate()->factory()->undefined_string());
+ Handle<HeapObject> kValue = isolate()->factory()->undefined_string();
const char* kName = "mango";
- SetGlobalProperty(kName, kValue.handle());
+ SetGlobalProperty(kName, kValue);
Node* ret = ReturnLoadNamedFromGlobal(
kName, graph()->start(), graph()->start(),
@@ -211,10 +209,9 @@ TEST_F(JSTypeFeedbackTest, JSLoadNamedGlobalConstString) {
TEST_F(JSTypeFeedbackTest, JSLoadNamedGlobalConstStringWithDeoptimization) {
- Unique<HeapObject> kValue = Unique<HeapObject>::CreateImmovable(
- isolate()->factory()->undefined_string());
+ Handle<HeapObject> kValue = isolate()->factory()->undefined_string();
const char* kName = "mango";
- SetGlobalProperty(kName, kValue.handle());
+ SetGlobalProperty(kName, kValue);
Node* ret = ReturnLoadNamedFromGlobal(
kName, graph()->start(), graph()->start(),
@@ -277,7 +274,7 @@ TEST_F(JSTypeFeedbackTest, JSLoadNamedGlobalPropertyCellSmiWithDeoptimization) {
HeapObjectMatcher cell(cell_capture.value());
EXPECT_TRUE(cell.HasValue());
- EXPECT_TRUE(cell.Value().handle()->IsPropertyCell());
+ EXPECT_TRUE(cell.Value()->IsPropertyCell());
EXPECT_THAT(ret,
IsReturn(load_field_match, load_field_match, graph()->start()));
@@ -329,7 +326,7 @@ TEST_F(JSTypeFeedbackTest,
HeapObjectMatcher cell(cell_capture.value());
EXPECT_TRUE(cell.HasValue());
- EXPECT_TRUE(cell.Value().handle()->IsPropertyCell());
+ EXPECT_TRUE(cell.Value()->IsPropertyCell());
EXPECT_THAT(ret,
IsReturn(load_field_match, load_field_match, graph()->start()));
« no previous file with comments | « test/unittests/compiler/js-context-relaxation-unittest.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698