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

Unified Diff: src/compiler/machine-operator-reducer-unittest.cc

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/compiler/node-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator-reducer-unittest.cc
diff --git a/src/compiler/machine-operator-reducer-unittest.cc b/src/compiler/machine-operator-reducer-unittest.cc
index ab95fb8730ca675036ef50d83f80b0157b609200..4267161954a03ab494102e893577cfa747a60c2e 100644
--- a/src/compiler/machine-operator-reducer-unittest.cc
+++ b/src/compiler/machine-operator-reducer-unittest.cc
@@ -249,7 +249,7 @@ TEST_F(MachineOperatorReducerTest, ChangeFloat64ToUint32WithConstant) {
Reduction reduction = Reduce(graph()->NewNode(
machine()->ChangeFloat64ToUint32(), Float64Constant(FastUI2D(x))));
ASSERT_TRUE(reduction.Changed());
- EXPECT_THAT(reduction.replacement(), IsInt32Constant(BitCast<int32_t>(x)));
+ EXPECT_THAT(reduction.replacement(), IsInt32Constant(bit_cast<int32_t>(x)));
}
}
@@ -290,7 +290,7 @@ TEST_F(MachineOperatorReducerTest, ChangeUint32ToFloat64WithConstant) {
TRACED_FOREACH(uint32_t, x, kUint32Values) {
Reduction reduction =
Reduce(graph()->NewNode(machine()->ChangeUint32ToFloat64(),
- Int32Constant(BitCast<int32_t>(x))));
+ Int32Constant(bit_cast<int32_t>(x))));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsFloat64Constant(FastUI2D(x)));
}
@@ -303,11 +303,12 @@ TEST_F(MachineOperatorReducerTest, ChangeUint32ToFloat64WithConstant) {
TEST_F(MachineOperatorReducerTest, ChangeUint32ToUint64WithConstant) {
TRACED_FOREACH(uint32_t, x, kUint32Values) {
- Reduction reduction = Reduce(graph()->NewNode(
- machine()->ChangeUint32ToUint64(), Int32Constant(BitCast<int32_t>(x))));
+ Reduction reduction =
+ Reduce(graph()->NewNode(machine()->ChangeUint32ToUint64(),
+ Int32Constant(bit_cast<int32_t>(x))));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(),
- IsInt64Constant(BitCast<int64_t>(static_cast<uint64_t>(x))));
+ IsInt64Constant(bit_cast<int64_t>(static_cast<uint64_t>(x))));
}
}
@@ -357,8 +358,8 @@ TEST_F(MachineOperatorReducerTest, TruncateInt64ToInt32WithConstant) {
graph()->NewNode(machine()->TruncateInt64ToInt32(), Int64Constant(x)));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(),
- IsInt32Constant(BitCast<int32_t>(
- static_cast<uint32_t>(BitCast<uint64_t>(x)))));
+ IsInt32Constant(bit_cast<int32_t>(
+ static_cast<uint32_t>(bit_cast<uint64_t>(x)))));
}
}
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/compiler/node-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698