Skip to content

Commit

Permalink
deps: patch V8 to 8.1.307.26
Browse files Browse the repository at this point in the history
Refs: v8/v8@8.1.307.20...8.1.307.26

PR-URL: #32521
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
mmarchini committed Apr 4, 2020
1 parent 0584133 commit 3052769
Show file tree
Hide file tree
Showing 23 changed files with 358 additions and 98 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 8
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 307
#define V8_PATCH_LEVEL 20
#define V8_PATCH_LEVEL 26

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
10 changes: 10 additions & 0 deletions deps/v8/infra/mb/mb_config.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,34 @@
'V8 Linux - s390x - sim': 'release_simulate_s390x',
},
'client.v8.branches': {
'V8 Linux - previous branch': 'release_x86',
'V8 Linux - previous branch - debug': 'debug_x86',
'V8 Linux - beta branch': 'release_x86',
'V8 Linux - beta branch - debug': 'debug_x86',
'V8 Linux - stable branch': 'release_x86',
'V8 Linux - stable branch - debug': 'debug_x86',
'V8 Linux64 - previous branch': 'release_x64',
'V8 Linux64 - previous branch - debug': 'debug_x64',
'V8 Linux64 - beta branch': 'release_x64',
'V8 Linux64 - beta branch - debug': 'debug_x64',
'V8 Linux64 - stable branch': 'release_x64',
'V8 Linux64 - stable branch - debug': 'debug_x64',
'V8 arm - sim - previous branch': 'release_simulate_arm',
'V8 arm - sim - previous branch - debug': 'debug_simulate_arm',
'V8 arm - sim - beta branch': 'release_simulate_arm',
'V8 arm - sim - beta branch - debug': 'debug_simulate_arm',
'V8 arm - sim - stable branch': 'release_simulate_arm',
'V8 arm - sim - stable branch - debug': 'debug_simulate_arm',
'V8 mips64el - sim - previous branch': 'release_simulate_mips64el',
'V8 mips64el - sim - beta branch': 'release_simulate_mips64el',
'V8 mips64el - sim - stable branch': 'release_simulate_mips64el',
'V8 mipsel - sim - previous branch': 'release_simulate_mipsel',
'V8 mipsel - sim - beta branch': 'release_simulate_mipsel',
'V8 mipsel - sim - stable branch': 'release_simulate_mipsel',
'V8 ppc64 - sim - previous branch': 'release_simulate_ppc64',
'V8 ppc64 - sim - beta branch': 'release_simulate_ppc64',
'V8 ppc64 - sim - stable branch': 'release_simulate_ppc64',
'V8 s390x - sim - previous branch': 'release_simulate_s390x',
'V8 s390x - sim - beta branch': 'release_simulate_s390x',
'V8 s390x - sim - stable branch': 'release_simulate_s390x',
},
Expand Down
92 changes: 92 additions & 0 deletions deps/v8/infra/testing/builders.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,26 @@
{'name': 'v8testing', 'shards': 3},
],
},
'V8 Linux - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'mozilla'},
{'name': 'test262', 'variant': 'default'},
{'name': 'v8testing'},
],
},
'V8 Linux - previous branch - debug': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'mozilla'},
{'name': 'test262', 'variant': 'default'},
{'name': 'v8testing', 'shards': 3},
],
},
'V8 Linux64 - beta branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
Expand Down Expand Up @@ -1726,6 +1746,26 @@
{'name': 'v8testing', 'shards': 3},
],
},
'V8 Linux64 - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'mozilla'},
{'name': 'test262', 'variant': 'default'},
{'name': 'v8testing'},
],
},
'V8 Linux64 - previous branch - debug': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'mozilla'},
{'name': 'test262', 'variant': 'default'},
{'name': 'v8testing', 'shards': 3},
],
},
'V8 arm - sim - beta branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
Expand Down Expand Up @@ -1766,6 +1806,26 @@
{'name': 'v8testing', 'shards': 10},
],
},
'V8 arm - sim - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'mozilla'},
{'name': 'test262', 'variant': 'default'},
{'name': 'v8testing', 'shards': 4},
],
},
'V8 arm - sim - previous branch - debug': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'mozilla', 'shards': 2},
{'name': 'test262', 'variant': 'default', 'shards': 2},
{'name': 'v8testing', 'shards': 10},
],
},
'V8 mips64el - sim - beta branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
Expand All @@ -1782,6 +1842,14 @@
{'name': 'unittests'},
],
},
'V8 mips64el - sim - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'unittests'},
],
},
'V8 mipsel - sim - beta branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
Expand All @@ -1798,6 +1866,14 @@
{'name': 'v8testing', 'shards': 4},
],
},
'V8 mipsel - sim - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'v8testing', 'shards': 4},
],
},
'V8 ppc64 - sim - beta branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
Expand All @@ -1814,6 +1890,14 @@
{'name': 'unittests'},
],
},
'V8 ppc64 - sim - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'unittests'},
],
},
'V8 s390x - sim - beta branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
Expand All @@ -1830,4 +1914,12 @@
{'name': 'unittests'},
],
},
'V8 s390x - sim - previous branch': {
'swarming_dimensions': {
'os': 'Ubuntu-16.04',
},
'tests': [
{'name': 'unittests'},
],
},
}
75 changes: 35 additions & 40 deletions deps/v8/src/builtins/builtins-intl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,11 @@ Object LegacyFormatConstructor(BuiltinArguments args, Isolate* isolate,

// [[Construct]]
Handle<JSFunction> target = args.target();

Handle<Object> locales = args.atOrUndefined(isolate, 1);
Handle<Object> options = args.atOrUndefined(isolate, 2);

// 2. Let format be ? OrdinaryCreateFromConstructor(newTarget,
// "%<T>Prototype%", ...).

Handle<Map> map;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, map, JSFunction::GetDerivedMap(isolate, target, new_target));
Expand All @@ -281,45 +279,42 @@ Object LegacyFormatConstructor(BuiltinArguments args, Isolate* isolate,
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, format, T::New(isolate, map, locales, options, method));
// 4. Let this be the this value.
Handle<Object> receiver = args.receiver();

// 5. If NewTarget is undefined and ? InstanceofOperator(this, %<T>%)
// is true, then
//
// Look up the intrinsic value that has been stored on the context.
// Call the instanceof function
Handle<Object> is_instance_of_obj;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, is_instance_of_obj,
Object::InstanceOf(isolate, receiver, constructor));

// Get the boolean value of the result
bool is_instance_of = is_instance_of_obj->BooleanValue(isolate);

if (args.new_target()->IsUndefined(isolate) && is_instance_of) {
if (!receiver->IsJSReceiver()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewTypeError(MessageTemplate::kIncompatibleMethodReceiver,
isolate->factory()->NewStringFromAsciiChecked(method),
receiver));
if (args.new_target()->IsUndefined(isolate)) {
Handle<Object> receiver = args.receiver();

// 5. If NewTarget is undefined and ? InstanceofOperator(this, %<T>%)
// is true, then Look up the intrinsic value that has been stored on
// the context.
Handle<Object> is_instance_of_obj;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, is_instance_of_obj,
Object::InstanceOf(isolate, receiver, constructor));

if (is_instance_of_obj->BooleanValue(isolate)) {
if (!receiver->IsJSReceiver()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewTypeError(MessageTemplate::kIncompatibleMethodReceiver,
isolate->factory()->NewStringFromAsciiChecked(method),
receiver));
}
Handle<JSReceiver> rec = Handle<JSReceiver>::cast(receiver);
// a. Perform ? DefinePropertyOrThrow(this,
// %Intl%.[[FallbackSymbol]], PropertyDescriptor{ [[Value]]: format,
// [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }).
PropertyDescriptor desc;
desc.set_value(format);
desc.set_writable(false);
desc.set_enumerable(false);
desc.set_configurable(false);
Maybe<bool> success = JSReceiver::DefineOwnProperty(
isolate, rec, isolate->factory()->intl_fallback_symbol(), &desc,
Just(kThrowOnError));
MAYBE_RETURN(success, ReadOnlyRoots(isolate).exception());
CHECK(success.FromJust());
// b. b. Return this.
return *receiver;
}
Handle<JSReceiver> rec = Handle<JSReceiver>::cast(receiver);
// a. Perform ? DefinePropertyOrThrow(this,
// %Intl%.[[FallbackSymbol]], PropertyDescriptor{ [[Value]]: format,
// [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }).
PropertyDescriptor desc;
desc.set_value(format);
desc.set_writable(false);
desc.set_enumerable(false);
desc.set_configurable(false);
Maybe<bool> success = JSReceiver::DefineOwnProperty(
isolate, rec, isolate->factory()->intl_fallback_symbol(), &desc,
Just(kThrowOnError));
MAYBE_RETURN(success, ReadOnlyRoots(isolate).exception());
CHECK(success.FromJust());
// b. b. Return this.
return *receiver;
}
// 6. Return format.
return *format;
Expand Down
35 changes: 21 additions & 14 deletions deps/v8/src/compiler/simd-scalar-lowering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -909,29 +909,36 @@ void SimdScalarLowering::LowerNode(Node* node) {
}
case IrOpcode::kParameter: {
DCHECK_EQ(1, node->InputCount());
int param_count = static_cast<int>(signature()->parameter_count());
// Only exchange the node if the parameter count actually changed. We do
// not even have to do the default lowering because the the start node,
// not even have to do the default lowering because the start node,
// the only input of a parameter node, only changes if the parameter count
// changes.
if (GetParameterCountAfterLowering() !=
static_cast<int>(signature()->parameter_count())) {
if (GetParameterCountAfterLowering() != param_count) {
int old_index = ParameterIndexOf(node->op());
// Parameter index 0 is the instance parameter, we will use old_index to
// index into the function signature, so we need to decrease it by 1.
--old_index;
int new_index =
GetParameterIndexAfterLoweringSimd128(signature(), old_index);
if (old_index == new_index) {
NodeProperties::ChangeOp(node, common()->Parameter(new_index));
// Similarly, the index into function signature needs to account for the
// instance parameter, so increase it by 1.
++new_index;
NodeProperties::ChangeOp(node, common()->Parameter(new_index));

if (old_index < 0) {
break;
}

DCHECK(old_index < param_count);

if (signature()->GetParam(old_index) ==
MachineRepresentation::kSimd128) {
Node* new_node[kNumLanes32];
for (int i = 0; i < kNumLanes32; ++i) {
new_node[i] = nullptr;
}
new_node[0] = node;
if (signature()->GetParam(old_index) ==
MachineRepresentation::kSimd128) {
for (int i = 1; i < kNumLanes32; ++i) {
new_node[i] = graph()->NewNode(common()->Parameter(new_index + i),
graph()->start());
}
for (int i = 1; i < kNumLanes32; ++i) {
new_node[i] = graph()->NewNode(common()->Parameter(new_index + i),
graph()->start());
}
ReplaceNode(node, new_node, kNumLanes32);
}
Expand Down
5 changes: 5 additions & 0 deletions deps/v8/src/compiler/wasm-compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6932,6 +6932,11 @@ wasm::WasmCompilationResult ExecuteTurbofanWasmCompilation(
call_descriptor = GetI32WasmCallDescriptor(&zone, call_descriptor);
}

if (ContainsSimd(func_body.sig) &&
(!CpuFeatures::SupportsWasmSimd128() || env->lower_simd)) {
call_descriptor = GetI32WasmCallDescriptorForSimd(&zone, call_descriptor);
}

Pipeline::GenerateCodeForWasmFunction(
&info, wasm_engine, mcgraph, call_descriptor, source_positions,
node_origins, func_body, env->module, func_index);
Expand Down
17 changes: 11 additions & 6 deletions deps/v8/src/objects/objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7220,10 +7220,9 @@ int BaseNameDictionary<Derived, Shape>::NextEnumerationIndex(
// Check whether the next enumeration index is valid.
if (!PropertyDetails::IsValidIndex(index)) {
// If not, we generate new indices for the properties.
int length = dictionary->NumberOfElements();

Handle<FixedArray> iteration_order = IterationIndices(isolate, dictionary);
DCHECK_EQ(length, iteration_order->length());
int length = iteration_order->length();
DCHECK_LE(length, dictionary->NumberOfElements());

// Iterate over the dictionary using the enumeration order and update
// the dictionary with new enumeration indices.
Expand Down Expand Up @@ -7467,8 +7466,8 @@ void BaseNameDictionary<Derived, Shape>::CopyEnumKeysTo(
template <typename Derived, typename Shape>
Handle<FixedArray> BaseNameDictionary<Derived, Shape>::IterationIndices(
Isolate* isolate, Handle<Derived> dictionary) {
int length = dictionary->NumberOfElements();
Handle<FixedArray> array = isolate->factory()->NewFixedArray(length);
Handle<FixedArray> array =
isolate->factory()->NewFixedArray(dictionary->NumberOfElements());
ReadOnlyRoots roots(isolate);
int array_size = 0;
{
Expand All @@ -7480,7 +7479,13 @@ Handle<FixedArray> BaseNameDictionary<Derived, Shape>::IterationIndices(
array->set(array_size++, Smi::FromInt(i.as_int()));
}

DCHECK_EQ(array_size, length);
// The global dictionary doesn't track its deletion count, so we may iterate
// fewer entries than the count of elements claimed by the dictionary.
if (std::is_same<Derived, GlobalDictionary>::value) {
DCHECK_LE(array_size, dictionary->NumberOfElements());
} else {
DCHECK_EQ(array_size, dictionary->NumberOfElements());
}

EnumIndexComparator<Derived> cmp(raw_dictionary);
// Use AtomicSlot wrapper to ensure that std::sort uses atomic load and
Expand Down
1 change: 0 additions & 1 deletion deps/v8/src/parsing/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ FunctionLiteral* Parser::ParseProgram(Isolate* isolate, Handle<Script> script,
Scope::DeserializationMode::kIncludingVariables);

scanner_.Initialize();
scanner_.SkipHashBang();
FunctionLiteral* result = DoParseProgram(isolate, info);
MaybeResetCharacterStream(info, result);
MaybeProcessSourceRanges(info, result, stack_limit_);
Expand Down
4 changes: 0 additions & 4 deletions deps/v8/src/parsing/preparser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ PreParser::PreParseResult PreParser::PreParseProgram() {
scope->set_is_being_lazily_parsed(true);
#endif

// Note: We should only skip the hashbang in non-Eval scripts
// (currently, Eval is not handled by the PreParser).
scanner()->SkipHashBang();

// ModuleDeclarationInstantiation for Source Text Module Records creates a
// new Module Environment Record whose outer lexical environment record is
// the global scope.
Expand Down
Loading

0 comments on commit 3052769

Please sign in to comment.