Commit 70dbac4b authored by Ivica Bogosavljevic's avatar Ivica Bogosavljevic Committed by Commit Bot

Fix compilation failures with GCC 6.3.0

Bug: 
Change-Id: If2468dab0ce2ef59a1f9cc8e4d8dc57b320f8c5f
Reviewed-on: https://chromium-review.googlesource.com/789041
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49629}
parent 4ca9d843
......@@ -79,7 +79,6 @@ struct UnobservableStore {
StoreOffset offset_;
bool operator==(const UnobservableStore) const;
bool operator!=(const UnobservableStore) const;
bool operator<(const UnobservableStore) const;
};
......@@ -140,7 +139,6 @@ class RedundantStoreFinder final {
void Visit(Node* node);
private:
static bool IsEffectful(Node* node);
void VisitEffectfulNode(Node* node);
UnobservablesSet RecomputeUseIntersection(Node* node);
UnobservablesSet RecomputeSet(Node* node, UnobservablesSet uses);
......@@ -251,10 +249,6 @@ void StoreStoreElimination::Run(JSGraph* js_graph, Zone* temp_zone) {
}
}
bool RedundantStoreFinder::IsEffectful(Node* node) {
return (node->op()->EffectInputCount() >= 1);
}
// Recompute unobservables-set for a node. Will also mark superfluous nodes
// as to be removed.
......@@ -552,9 +546,6 @@ bool UnobservableStore::operator==(const UnobservableStore other) const {
return (id_ == other.id_) && (offset_ == other.offset_);
}
bool UnobservableStore::operator!=(const UnobservableStore other) const {
return !(*this == other);
}
bool UnobservableStore::operator<(const UnobservableStore other) const {
return (id_ < other.id_) || (id_ == other.id_ && offset_ < other.offset_);
......
......@@ -1299,14 +1299,16 @@ TEST_F(ValueSerializerTest, DecodeDenseArrayContainingUndefined) {
}
TEST_F(ValueSerializerTest, RoundTripDate) {
RoundTripTest("new Date(1e6)", [](Local<Value> value) {
RoundTripTest("new Date(1e6)", [this](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_EQ(1e6, Date::Cast(*value)->ValueOf());
EXPECT_TRUE("Object.getPrototypeOf(result) === Date.prototype");
EXPECT_TRUE(EvaluateScriptForResultBool(
"Object.getPrototypeOf(result) === Date.prototype"));
});
RoundTripTest("new Date(Date.UTC(1867, 6, 1))", [](Local<Value> value) {
RoundTripTest("new Date(Date.UTC(1867, 6, 1))", [this](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_TRUE("result.toISOString() === '1867-07-01T00:00:00.000Z'");
EXPECT_TRUE(EvaluateScriptForResultBool(
"result.toISOString() === '1867-07-01T00:00:00.000Z'"));
});
RoundTripTest("new Date(NaN)", [](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
......@@ -1324,18 +1326,19 @@ TEST_F(ValueSerializerTest, DecodeDate) {
#if defined(V8_TARGET_LITTLE_ENDIAN)
DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84,
0x2e, 0x41, 0x00},
[](Local<Value> value) {
[this](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_EQ(1e6, Date::Cast(*value)->ValueOf());
EXPECT_TRUE("Object.getPrototypeOf(result) === Date.prototype");
EXPECT_TRUE(EvaluateScriptForResultBool(
"Object.getPrototypeOf(result) === Date.prototype"));
});
DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x20, 0x45, 0x27, 0x89,
0x87, 0xc2, 0x00},
[this](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_TRUE(EvaluateScriptForResultBool(
"result.toISOString() === '1867-07-01T00:00:00.000Z'"));
});
DecodeTest(
{0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x20, 0x45, 0x27, 0x89, 0x87,
0xc2, 0x00},
[](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_TRUE("result.toISOString() === '1867-07-01T00:00:00.000Z'");
});
DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf8, 0x7f, 0x00},
[](Local<Value> value) {
......@@ -1345,18 +1348,19 @@ TEST_F(ValueSerializerTest, DecodeDate) {
#else
DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x41, 0x2e, 0x84, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00},
[](Local<Value> value) {
[this](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_EQ(1e6, Date::Cast(*value)->ValueOf());
EXPECT_TRUE("Object.getPrototypeOf(result) === Date.prototype");
EXPECT_TRUE(EvaluateScriptForResultBool(
"Object.getPrototypeOf(result) === Date.prototype"));
});
DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0xc2, 0x87, 0x89, 0x27, 0x45, 0x20,
0x00, 0x00, 0x00},
[this](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_TRUE(EvaluateScriptForResultBool(
"result.toISOString() === '1867-07-01T00:00:00.000Z'"));
});
DecodeTest(
{0xff, 0x09, 0x3f, 0x00, 0x44, 0xc2, 0x87, 0x89, 0x27, 0x45, 0x20, 0x00,
0x00, 0x00},
[](Local<Value> value) {
ASSERT_TRUE(value->IsDate());
EXPECT_TRUE("result.toISOString() === '1867-07-01T00:00:00.000Z'");
});
DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00},
[](Local<Value> value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment