Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4789213
[wasm] Do not call CheckForException on every node
manoskouk Feb 25, 2021
d433772
[mips][Liftoff] Use ValueKind instead of ValueType
LiuYu396 Feb 25, 2021
14558e0
[test] Disable flaky test
mi-ac Feb 25, 2021
9fa61a9
[node] Optimize the method Node::OwnedBy(Node const* owner)
tingshao Feb 20, 2021
3c9c301
[dict-proto] C++ implementation of SwissNameDictionary, pt. 6
Feb 25, 2021
a924232
[build] Fold v8_wrappers into v8_libbase
danelphick Feb 25, 2021
91b5439
[masm] Consistent LoadNativeContextSlot argument order
victorgomes Feb 25, 2021
2aad1b6
Changed version number to 9.1
lutzvahl Feb 25, 2021
0b3f82b
[cleanup] Improve the concurrent SharedMutexes comments and naming
santiaboy Feb 24, 2021
0e75ba1
Update V8 DEPS.
Feb 25, 2021
d7be571
[mips64][wasm-simd] Retrieve the value of SupportsWasmSimd128()
LiuYu396 Feb 25, 2021
9a31804
[profiler] Clean up CodeEvent tags
LeszekSwirski Feb 23, 2021
e2f0b1a
[cleanup] Unify the LocalIsolate/Isolate calls on js-heap-broker
santiaboy Feb 25, 2021
a385a75
Update COMMON_OWNERS.
hannespayer Feb 24, 2021
05774c1
Update OWNERS in src/*
hannespayer Feb 24, 2021
7c50535
Update OWNERS in test/*
hannespayer Feb 23, 2021
3a2836e
Update include/OWNERS
hannespayer Feb 23, 2021
17feb9b
Update ENG_REVIEW_OWNERS
hannespayer Feb 23, 2021
12eaa0f
[sparkplug][cleanup] Add helper to en-/decode VLQ.
Feb 25, 2021
1dcae4b
[wasm-simd][x64] Use movaps in i8x16.swizzle
ngzhian Feb 24, 2021
1cc8772
[ia32] Fix movhps definition
ngzhian Feb 24, 2021
884968c
[wasm-simd][x64] Optimize signed compares codegen
ngzhian Feb 24, 2021
47ffa7a
[wasm-simd] Remove i8x16.mul
ngzhian Feb 25, 2021
0eca1c7
PPC [simd]: Add vector load, store and splat to Sim
Feb 25, 2021
98998d1
cppgc: Fix build dependencies
mlippautz Feb 25, 2021
9c09c7c
PPC/s390: [wasm-simd] Remove i8x16.mul
Feb 25, 2021
79d24d9
PPC [simd]: Implement vector insert and extract on Sim
Feb 25, 2021
dc05afd
[wasm-simd] Remove post-mvp flag from i64x2.all_true tests
ngzhian Feb 25, 2021
199359d
cppgc: Add WasConservativeGC to HeapState
omerktz Feb 25, 2021
cd2248a
cppgc: Handle ephemerons with Mixin keys.
omerktz Feb 25, 2021
79e36b2
Update V8 DEPS.
Feb 26, 2021
dc0a1b4
[mips] Skip all Simd tests on MIPS like PPC
LiuYu396 Feb 26, 2021
19e8abb
[wasm] Store full type in the debug side table
backes Feb 25, 2021
98cbf95
[mips][wasm-simd] Remove i8x16.mul
LiuYu396 Feb 26, 2021
52cc7ba
[wasm] Rename more "type" to "kind"
backes Feb 26, 2021
6fe59c0
[no-wasm] Remove wasm tests and fuzzers
backes Feb 26, 2021
d61c64b
[wasm] Enable loop unrolling
manoskouk Feb 26, 2021
63dc18c
[csa] Optional data_type out-parameter for GetSharedFunctionInfoCode()
Feb 23, 2021
4840697
[compiler] Perform GetFieldIndexFor concurrently through Refs
santiaboy Feb 25, 2021
4e68c65
[wasm-simd][x64] Use kScratchDoubleReg/kScratchReg instead of temp
ngzhian Feb 25, 2021
3d972a5
PPC/s390: [wasm] Rename more "type" to "kind"
Feb 26, 2021
eb45367
cppgc: Rework testing GC infrastructure
mlippautz Feb 26, 2021
8380ebb
Revert "cppgc: Rework testing GC infrastructure"
fgmccabe Feb 26, 2021
1d31814
[wasm-simd][ia32][x64] Optimize extended add pairwise for AVX
ngzhian Feb 25, 2021
7c78ad8
[wasm-simd] Remove signselect
ngzhian Feb 25, 2021
ae13b85
Reland "cppgc: Rework testing GC infrastructure"
mlippautz Feb 26, 2021
8bc2cfb
Implement GetOptionsObject/CoerceOptionsToObject
FrankYFTang Feb 26, 2021
9960f69
Stop inlining the SupportsWasmSimd128 function
dtig Feb 19, 2021
5dce53b
Update V8 DEPS.
Feb 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
283 changes: 127 additions & 156 deletions BUILD.gn

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions COMMON_OWNERS
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
adamk@chromium.org
ahaas@chromium.org
bbudge@chromium.org
binji@chromium.org
bikineev@chromium.org
bmeurer@chromium.org
cbruni@chromium.org
Expand All @@ -15,20 +14,22 @@ gsathya@chromium.org
hablich@chromium.org
hpayer@chromium.org
ishell@chromium.org
jarin@chromium.org
jgruber@chromium.org
jkummerow@chromium.org
leszeks@chromium.org
machenbach@chromium.org
manoskouk@chromium.org
mathias@chromium.org
marja@chromium.org
mlippautz@chromium.org
mslekova@chromium.org
mvstanton@chromium.org
mythria@chromium.org
neis@chromium.org
nicohartmann@chromium.org
omerkatz@chromium.org
petermarshall@chromium.org
pthier@chromium.org
rmcilroy@chromium.org
sigurds@chromium.org
solanes@chromium.org
Expand Down
16 changes: 8 additions & 8 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ vars = {

deps = {
'build':
Var('chromium_url') + '/chromium/src/build.git' + '@' + '446bf3e5a00bfe4fd99d91cb76ec3b3a7b34d226',
Var('chromium_url') + '/chromium/src/build.git' + '@' + 'e28b4b7fb55c06c12eb43864a452c3224acda8ea',
'third_party/depot_tools':
Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '5fe664f150beaf71104ce7787560fabdb55ebf5b',
Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '8a2e6a7ae010a064744acd16ef26aa27a5df6e34',
'third_party/icu':
Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'e05b663d1c50b4e9ecc3ff9325f5158f1d071471',
'third_party/instrumented_libraries':
Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '0964a78c832d1d0f2669b020b073c38f67509cf2',
'buildtools':
Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '4c78ef9c38b683c5c5cbac70445378c2362cebfc',
Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'aa09fa765938e5e16c6309bd9f4ac2a01744ac1d',
'buildtools/clang_format/script':
Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '99803d74e35962f63a775f29477882afd4d57d94',
'buildtools/linux64': {
Expand All @@ -122,9 +122,9 @@ deps = {
'buildtools/third_party/libc++/trunk':
Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '8fa87946779682841e21e2da977eccfb6cb3bded',
'buildtools/third_party/libc++abi/trunk':
Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '196ba1aaa8ac285d94f4ea8d9836390a45360533',
Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '6918862bfc2bff22b45058fac22b1596c49982fb',
'buildtools/third_party/libunwind/trunk':
Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'a2cc4f8c554dedcb0c64cac5511b19c43f1f3d32',
Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '8d5fb6f1dd53c7cb8fda272eb70f45ac718fc671',
'buildtools/win': {
'packages': [
{
Expand Down Expand Up @@ -184,7 +184,7 @@ deps = {
'dep_type': 'cipd',
},
'third_party/catapult': {
'url': Var('chromium_url') + '/catapult.git' + '@' + '81c9d30d7f1b3c1ab0f1856761f738cc81741322',
'url': Var('chromium_url') + '/catapult.git' + '@' + '62360966a288637071d20581c4933f9471410f9c',
'condition': 'checkout_android',
},
'third_party/colorama/src': {
Expand Down Expand Up @@ -239,7 +239,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/third_party/aemu/linux-amd64',
'version': 'qI8e328VwkWv64EapCvG3Xj9_hDpKQFuJWeVdUHz7W0C'
'version': 'ftKmphEHEwMJc1_tTOsvx50Hd3J_GRNUTxp59ts3NjoC'
},
],
'condition': 'host_os == "linux" and checkout_fuchsia',
Expand All @@ -256,7 +256,7 @@ deps = {
'dep_type': 'cipd',
},
'tools/clang':
Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'cfd0f628093b7382ac054fb33e23fa9d9a278bc3',
Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '6a9fd91d34f5322be34654a1e85e40ed0a9b14c7',
'tools/luci-go': {
'packages': [
{
Expand Down
1 change: 0 additions & 1 deletion ENG_REVIEW_OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ adamk@chromium.org
danno@chromium.org
hpayer@chromium.org
rmcilroy@chromium.org
yangguo@chromium.org
14 changes: 4 additions & 10 deletions include/OWNERS
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
adamk@chromium.org
cbruni@chromium.org
danno@chromium.org
leszeks@chromium.org
mlippautz@chromium.org
ulan@chromium.org
verwaest@chromium.org
yangguo@chromium.org

per-file *DEPS=file:../COMMON_OWNERS
per-file v8-internal.h=file:../COMMON_OWNERS
per-file v8-inspector.h=dgozman@chromium.org
per-file v8-inspector.h=pfeldman@chromium.org
per-file v8-inspector.h=kozyatinskiy@chromium.org
per-file v8-inspector-protocol.h=dgozman@chromium.org
per-file v8-inspector-protocol.h=pfeldman@chromium.org
per-file v8-inspector-protocol.h=kozyatinskiy@chromium.org
per-file js_protocol.pdl=dgozman@chromium.org
per-file js_protocol.pdl=pfeldman@chromium.org
per-file js_protocol.pdl=bmeurer@chromium.org
per-file v8-inspector.h=file:../src/inspector/OWNERS
per-file v8-inspector-protocol.h=file:../src/inspector/OWNERS
per-file js_protocol.pdl=file:../src/inspector/OWNERS

# For branch updates:
per-file v8-version.h=file:../INFRA_OWNERS
Expand Down
11 changes: 11 additions & 0 deletions include/cppgc/heap-state.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ class V8_EXPORT HeapState final {
*/
static bool IsInAtomicPause(const HeapHandle& heap_handle);

/**
* Returns whether the last garbage collection was finalized conservatively
* (i.e., with a non-empty stack). This API is experimental and is expected to
* be removed in future.
*
* \param heap_handle The corresponding heap.
* \returns true if the last garbage collection was finalized conservatively,
* and false otherwise.
*/
static bool PreviousGCWasConservative(const HeapHandle& heap_handle);

private:
HeapState() = delete;
};
Expand Down
14 changes: 0 additions & 14 deletions include/cppgc/testing.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ class HeapHandle;
*/
namespace testing {

/**
* Testing helper used to acces heap internals.
*/
class V8_EXPORT Heap final {
public:
/**
* Atomically collects garbage on the C++ heap.
*
* \param heap_handle The corresponding heap.
* \param stack_state The stack state to assume for the garbage collection.
*/
void CollectGarbage(HeapHandle& heap_handle, EmbedderStackState stack_state);
};

/**
* Overrides the state of the stack with the provided value. Takes precedence
* over other parameters that set the stack state. Must no be nested.
Expand Down
15 changes: 10 additions & 5 deletions include/cppgc/visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,21 @@ class V8_EXPORT Visitor {
* \param key WeakMember reference weakly retaining a key object.
* \param value Member reference weakly retaining a value object.
*/
template <typename K, typename V>
void TraceEphemeron(const WeakMember<K>& key, const V* value) {
const K* k = key.GetRawAtomic();
template <typename KeyType, typename ValueType>
void TraceEphemeron(const WeakMember<KeyType>& key, const ValueType* value) {
const KeyType* k = key.GetRawAtomic();
if (!k) return;
TraceDescriptor value_desc = TraceTrait<V>::GetTraceDescriptor(value);
TraceDescriptor value_desc =
TraceTrait<ValueType>::GetTraceDescriptor(value);
// KeyType might be a GarbageCollectedMixin.
const void* key_base_object_payload =
TraceTrait<KeyType>::GetTraceDescriptor(k).base_object_payload;
CPPGC_DCHECK(key_base_object_payload);
// `value` must always be non-null. `value_desc.base_object_payload` may be
// null in the case that value is not a garbage-collected object but only
// traceable.
CPPGC_DCHECK(value);
VisitEphemeron(key, value, value_desc);
VisitEphemeron(key_base_object_payload, value, value_desc);
}

/**
Expand Down
15 changes: 15 additions & 0 deletions include/v8-cppgc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <memory>
#include <vector>

#include "cppgc/common.h"
#include "cppgc/custom-space.h"
#include "cppgc/heap-statistics.h"
#include "cppgc/internal/write-barrier.h"
Expand Down Expand Up @@ -118,6 +119,20 @@ class V8_EXPORT CppHeap {
cppgc::HeapStatistics CollectStatistics(
cppgc::HeapStatistics::DetailLevel detail_level);

/**
* Enables a detached mode that allows testing garbage collection using
* `cppgc::testing` APIs. Once used, the heap cannot be attached to an
* `Isolate` anymore.
*/
void EnableDetachedGarbageCollectionsForTesting();

/**
* Performs a stop-the-world garbage collection for testing purposes.
*
* \param stack_state The stack state to assume for the garbage collection.
*/
void CollectGarbageForTesting(cppgc::EmbedderStackState stack_state);

private:
CppHeap() = default;

Expand Down
2 changes: 1 addition & 1 deletion include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// NOTE these macros are used by some of the tool scripts and the build
// system so their names cannot be changed without changing the scripts.
#define V8_MAJOR_VERSION 9
#define V8_MINOR_VERSION 0
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 0
#define V8_PATCH_LEVEL 0

Expand Down
1 change: 0 additions & 1 deletion src/asmjs/OWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ahaas@chromium.org
clemensb@chromium.org
titzer@chromium.org
3 changes: 0 additions & 3 deletions src/ast/OWNERS
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
adamk@chromium.org
bmeurer@chromium.org
gsathya@chromium.org
leszeks@chromium.org
littledan@chromium.org
marja@chromium.org
neis@chromium.org
verwaest@chromium.org
1 change: 1 addition & 0 deletions src/base/platform/OWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
hpayer@chromium.org
mlippautz@chromium.org
ulan@chromium.org
victorgomes@chromium.org

per-file platform-fuchsia.cc=wez@chromium.org
85 changes: 85 additions & 0 deletions src/base/vlq.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Copyright 2021 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_BASE_VLQ_H_
#define V8_BASE_VLQ_H_

#include <limits>
#include <vector>

#include "src/base/memory.h"

namespace v8 {
namespace base {

static constexpr uint32_t kContinueShift = 7;
static constexpr uint32_t kContinueMask = 1 << kContinueShift;
static constexpr uint32_t kDataMask = kContinueMask - 1;

// Encodes an unsigned value using variable-length encoding and stores it using
// the passed process_byte function.
inline void VLQEncodeUnsigned(const std::function<void(byte)>& process_byte,
uint32_t value) {
bool has_next;
do {
byte cur_byte = value & kDataMask;
value >>= kContinueShift;
has_next = value != 0;
// The most significant bit is set when we are not done with the value yet.
cur_byte |= static_cast<uint32_t>(has_next) << kContinueShift;
process_byte(cur_byte);
} while (has_next);
}

// Encodes value using variable-length encoding and stores it using the passed
// process_byte function.
inline void VLQEncode(const std::function<void(byte)>& process_byte,
int32_t value) {
// This wouldn't handle kMinInt correctly if it ever encountered it.
DCHECK_NE(value, std::numeric_limits<int32_t>::min());
bool is_negative = value < 0;
// Encode sign in least significant bit.
uint32_t bits = static_cast<uint32_t>((is_negative ? -value : value) << 1) |
static_cast<uint32_t>(is_negative);
VLQEncodeUnsigned(process_byte, bits);
}

// Wrapper of VLQEncode for std::vector backed storage containers.
template <typename A>
inline void VLQEncode(std::vector<byte, A>* data, int32_t value) {
VLQEncode([data](byte value) { data->push_back(value); }, value);
}

// Wrapper of VLQEncodeUnsigned for std::vector backed storage containers.
template <typename A>
inline void VLQEncodeUnsigned(std::vector<byte, A>* data, uint32_t value) {
VLQEncodeUnsigned([data](byte value) { data->push_back(value); }, value);
}

// Decodes a variable-length encoded unsigned value stored in contiguous memory
// starting at data_start + index, updating index to where the next encoded
// value starts.
inline uint32_t VLQDecodeUnsigned(byte* data_start, int* index) {
uint32_t bits = 0;
for (int shift = 0; true; shift += kContinueShift) {
byte cur_byte = data_start[(*index)++];
bits += (cur_byte & kDataMask) << shift;
if ((cur_byte & kContinueMask) == 0) break;
}
return bits;
}

// Decodes a variable-length encoded value stored in contiguous memory starting
// at data_start + index, updating index to where the next encoded value starts.
inline int32_t VLQDecode(byte* data_start, int* index) {
uint32_t bits = VLQDecodeUnsigned(data_start, index);
bool is_negative = (bits & 1) == 1;
int32_t result = bits >> 1;
return is_negative ? -result : result;
}

} // namespace base
} // namespace v8

#endif // V8_BASE_VLQ_H_
2 changes: 1 addition & 1 deletion src/baseline/baseline-assembler-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void BaselineAssembler::LoadRoot(Register output, RootIndex index) {
__ LoadRoot(output, index);
}
void BaselineAssembler::LoadNativeContextSlot(Register output, uint32_t index) {
__ LoadNativeContextSlot(index, output);
__ LoadNativeContextSlot(output, index);
}

void BaselineAssembler::Move(Register output, interpreter::Register source) {
Expand Down
22 changes: 9 additions & 13 deletions src/baseline/baseline-compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "src/base/logging.h"
#include "src/base/threaded-list.h"
#include "src/base/vlq.h"
#include "src/baseline/baseline-assembler.h"
#include "src/handles/handles.h"
#include "src/interpreter/bytecode-array-iterator.h"
Expand All @@ -33,8 +34,14 @@ namespace baseline {
class BytecodeOffsetTableBuilder {
public:
void AddPosition(size_t pc_offset, size_t bytecode_offset) {
WriteUint(pc_offset - previous_pc_);
WriteUint(bytecode_offset - previous_bytecode_);
size_t pc_diff = pc_offset - previous_pc_;
size_t bytecode_diff = bytecode_offset - previous_bytecode_;
DCHECK_GE(pc_diff, 0);
DCHECK_LE(pc_diff, std::numeric_limits<uint32_t>::max());
DCHECK_GE(bytecode_diff, 0);
DCHECK_LE(bytecode_diff, std::numeric_limits<uint32_t>::max());
base::VLQEncodeUnsigned(&bytes_, static_cast<uint32_t>(pc_diff));
base::VLQEncodeUnsigned(&bytes_, static_cast<uint32_t>(bytecode_diff));
previous_pc_ = pc_offset;
previous_bytecode_ = bytecode_offset;
}
Expand All @@ -43,17 +50,6 @@ class BytecodeOffsetTableBuilder {
Handle<ByteArray> ToBytecodeOffsetTable(LocalIsolate* isolate);

private:
void WriteUint(size_t value) {
bool has_next;
do {
uint8_t byte = value & ((1 << 7) - 1);
value >>= 7;
has_next = value != 0;
byte |= (has_next << 7);
bytes_.push_back(byte);
} while (has_next);
}

size_t previous_pc_ = 0;
size_t previous_bytecode_ = 0;
std::vector<byte> bytes_;
Expand Down
Loading