Revert "Revert "Fix GCC 7 build errors""

This reverts commit da607264dd.

Reason for revert: Looked wrong. The persistent layout test
failures started in the next revision. The failure on the revision
of the reverted CL was just a flake.

Original change's description:
> Revert "Fix GCC 7 build errors"
> 
> This reverts commit c0f1ff2451.
> 
> Reason for revert: Speculative revert for layout test timeout:
> https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/16402
> 
> Original change's description:
> > Fix GCC 7 build errors
> > 
> > BUG=chromium:691681
> > R=​franzih@chromium.org
> > 
> > Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
> > Reviewed-on: https://chromium-review.googlesource.com/530227
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#46045}
> 
> TBR=adamk@chromium.org,franzih@chromium.org,mic.besace@gmail.com,verwaest@chromium.org
> 
> Change-Id: I2119a87a95ed9eb88b7b32ae436edf28dfc86c16
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:691681
> Reviewed-on: https://chromium-review.googlesource.com/541227
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46065}

TBR=adamk@chromium.org,machenbach@chromium.org,franzih@chromium.org,mic.besace@gmail.com,verwaest@chromium.org

Change-Id: Ieee7f6b3b80d380e720206e7b43c4b580918b1d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:691681
Reviewed-on: https://chromium-review.googlesource.com/541228
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46067}
This commit is contained in:
Michael Achenbach 2017-06-20 18:22:40 +00:00 committed by Commit Bot
parent d5040c4390
commit 41b02eec5f
6 changed files with 42 additions and 17 deletions

View File

@ -1782,6 +1782,7 @@ v8_source_set("v8_base") {
"src/objects/dictionary.h",
"src/objects/frame-array-inl.h",
"src/objects/frame-array.h",
"src/objects/hash-table-inl.h",
"src/objects/hash-table.h",
"src/objects/intl-objects.cc",
"src/objects/intl-objects.h",

View File

@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
IterateBody(obj);
IterateBody<StaticVisitor>(obj);
}
static inline int SizeOf(Map* map, HeapObject* object) { return kSize; }

View File

@ -32,6 +32,7 @@
#include "src/lookup.h"
#include "src/objects.h"
#include "src/objects/arguments-inl.h"
#include "src/objects/hash-table-inl.h"
#include "src/objects/hash-table.h"
#include "src/objects/literal-objects.h"
#include "src/objects/module-info.h"

View File

@ -0,0 +1,34 @@
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_OBJECTS_HASH_TABLE_INL_H_
#define V8_OBJECTS_HASH_TABLE_INL_H_
#include "src/objects/hash-table.h"
namespace v8 {
namespace internal {
template <typename Derived, typename Shape>
uint32_t HashTable<Derived, Shape>::Hash(Key key) {
if (Shape::UsesSeed) {
return Shape::SeededHash(key, GetHeap()->HashSeed());
} else {
return Shape::Hash(key);
}
}
template <typename Derived, typename Shape>
uint32_t HashTable<Derived, Shape>::HashForObject(Object* object) {
if (Shape::UsesSeed) {
return Shape::SeededHashForObject(GetHeap()->HashSeed(), object);
} else {
return Shape::HashForObject(object);
}
}
} // namespace internal
} // namespace v8
#endif // V8_OBJECTS_HASH_TABLE_INL_H_

View File

@ -144,22 +144,10 @@ class HashTable : public HashTableBase {
typedef Shape ShapeT;
typedef typename Shape::Key Key;
// Wrapper methods
inline uint32_t Hash(Key key) {
if (Shape::UsesSeed) {
return Shape::SeededHash(key, GetHeap()->HashSeed());
} else {
return Shape::Hash(key);
}
}
inline uint32_t HashForObject(Object* object) {
if (Shape::UsesSeed) {
return Shape::SeededHashForObject(GetHeap()->HashSeed(), object);
} else {
return Shape::HashForObject(object);
}
}
// Wrapper methods. Defined in src/objects/hash-table-inl.h
// to break a cycle with src/heap/heap.h.
inline uint32_t Hash(Key key);
inline uint32_t HashForObject(Object* object);
// Returns a new HashTable object.
MUST_USE_RESULT static Handle<Derived> New(

View File

@ -1237,6 +1237,7 @@
'objects/dictionary.h',
'objects/frame-array.h',
'objects/frame-array-inl.h',
'objects/hash-table-inl.h',
'objects/hash-table.h',
'objects/intl-objects.cc',
'objects/intl-objects.h',