Commit c0f1ff24 authored by Michaël Zasso's avatar Michaël Zasso Committed by Commit Bot

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: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46045}
parent e9d728d0
......@@ -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",
......
......@@ -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; }
......
......@@ -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"
......
// 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_
......@@ -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(
......
......@@ -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',
......
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