Skip to content

Commit 6ddba2e

Browse files
MylesBorinsevanlucas
authored andcommitted
deps: patch V8 to 6.2.414.44
Refs: v8/v8@6.2.414.32...6.2.414.44 PR-URL: #16848 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent ad02676 commit 6ddba2e

38 files changed

+486
-187
lines changed

deps/v8/BUILD.gn

-2
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ action("v8_dump_build_config") {
827827
is_gcov_coverage = v8_code_coverage && !is_clang
828828
args = [
829829
rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
830-
"current_cpu=\"$current_cpu\"",
831830
"dcheck_always_on=$dcheck_always_on",
832831
"is_asan=$is_asan",
833832
"is_cfi=$is_cfi",
@@ -838,7 +837,6 @@ action("v8_dump_build_config") {
838837
"is_tsan=$is_tsan",
839838
"is_ubsan_vptr=$is_ubsan_vptr",
840839
"target_cpu=\"$target_cpu\"",
841-
"v8_current_cpu=\"$v8_current_cpu\"",
842840
"v8_enable_i18n_support=$v8_enable_i18n_support",
843841
"v8_target_cpu=\"$v8_target_cpu\"",
844842
"v8_use_snapshot=$v8_use_snapshot",

deps/v8/DEPS

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ deps = {
1212
"v8/tools/gyp":
1313
Var("chromium_url") + "/external/gyp.git" + "@" + "d61a9397e668fa9843c4aa7da9e79460fe590bfb",
1414
"v8/third_party/icu":
15-
Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "08cb956852a5ccdba7f9c941728bb833529ba3c6",
15+
Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "21d33b1a09a77f033478ea4ffffb61e6970f83bd",
1616
"v8/third_party/instrumented_libraries":
1717
Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "644afd349826cb68204226a16c38bde13abe9c3c",
1818
"v8/buildtools":

deps/v8/Makefile

+13-13
Original file line numberDiff line numberDiff line change
@@ -338,40 +338,40 @@ $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) Makefile.android
338338

339339
# Test targets.
340340
check: all
341-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
341+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
342342
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
343343
$(TESTFLAGS)
344344

345345
$(addsuffix .check,$(MODES)): $$(basename $$@)
346-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
346+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
347347
--mode=$(basename $@) $(TESTFLAGS)
348348

349349
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
350-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
350+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
351351
--arch=$(basename $@) $(TESTFLAGS)
352352

353353
$(CHECKS): $$(basename $$@)
354-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
354+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
355355
--arch-and-mode=$(basename $@) $(TESTFLAGS)
356356

357357
$(addsuffix .quickcheck,$(MODES)): $$(basename $$@)
358-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
358+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
359359
--mode=$(basename $@) $(TESTFLAGS) --quickcheck
360360

361361
$(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@)
362-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
362+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
363363
--arch=$(basename $@) $(TESTFLAGS) --quickcheck
364364

365365
$(QUICKCHECKS): $$(basename $$@)
366-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
366+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
367367
--arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck
368368

369369
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
370370
@tools/android-sync.sh $(basename $@) $(OUTDIR) \
371371
$(shell pwd) $(ANDROID_V8)
372372

373373
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
374-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
374+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
375375
--arch-and-mode=$(basename $@) \
376376
--timeout=600 \
377377
--command-prefix="tools/android-run.py" $(TESTFLAGS)
@@ -380,7 +380,7 @@ $(addsuffix .check, $(ANDROID_ARCHES)): \
380380
$(addprefix $$(basename $$@).,$(MODES)).check
381381

382382
native.check: native
383-
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
383+
@gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
384384
--arch-and-mode=. $(TESTFLAGS)
385385

386386
SUPERFASTTESTMODES = ia32.release
@@ -391,18 +391,18 @@ COMMA = ,
391391
EMPTY =
392392
SPACE = $(EMPTY) $(EMPTY)
393393
quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
394-
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
394+
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
395395
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \
396396
--download-data mozilla webkit
397-
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
397+
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
398398
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
399399
qc: quickcheck
400400

401401
turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
402-
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
402+
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
403403
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \
404404
--quickcheck --variants=turbofan --download-data mozilla webkit
405-
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
405+
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
406406
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \
407407
--quickcheck --variants=turbofan
408408
tc: turbocheck

deps/v8/gni/isolate.gni

-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ template("v8_isolate_run") {
156156
"--config-variable",
157157
"icu_use_data_file_flag=$icu_use_data_file_flag",
158158
"--config-variable",
159-
"is_gn=1",
160-
"--config-variable",
161159
"msan=$msan",
162160
"--config-variable",
163161
"tsan=$tsan",

deps/v8/gypfiles/isolate.gypi

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
'--config-variable', 'gcmole=<(gcmole)',
7575
'--config-variable', 'has_valgrind=<(has_valgrind)',
7676
'--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
77-
'--config-variable', 'is_gn=0',
7877
'--config-variable', 'msan=<(msan)',
7978
'--config-variable', 'tsan=<(tsan)',
8079
'--config-variable', 'coverage=<(coverage)',

deps/v8/gypfiles/run-tests-legacy.py

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env python
2+
# Copyright 2017 the V8 project authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
6+
"""
7+
Legacy test-runner wrapper supporting a product of multiple architectures and
8+
modes.
9+
"""
10+
11+
import argparse
12+
import itertools
13+
from os.path import abspath, dirname, join
14+
import subprocess
15+
import sys
16+
17+
BASE_DIR = dirname(dirname(abspath(__file__)))
18+
RUN_TESTS = join(BASE_DIR, 'tools', 'run-tests.py')
19+
20+
def main():
21+
parser = argparse.ArgumentParser(description='Legacy test-runner wrapper')
22+
parser.add_argument(
23+
'--arch', help='Comma-separated architectures to run tests on')
24+
parser.add_argument(
25+
'--mode', help='Comma-separated modes to run tests on')
26+
parser.add_argument(
27+
'--arch-and-mode',
28+
help='Architecture and mode in the format \'arch.mode\'',
29+
)
30+
31+
args, remaining_args = parser.parse_known_args(sys.argv)
32+
if (args.arch or args.mode) and args.arch_and_mode:
33+
parser.error('The flags --arch-and-mode and --arch/--mode are exclusive.')
34+
arch = (args.arch or 'ia32,x64,arm').split(',')
35+
mode = (args.mode or 'release,debug').split(',')
36+
if args.arch_and_mode:
37+
arch_and_mode = map(
38+
lambda am: am.split('.'),
39+
args.arch_and_mode.split(','))
40+
arch = map(lambda am: am[0], arch_and_mode)
41+
mode = map(lambda am: am[1], arch_and_mode)
42+
43+
ret_code = 0
44+
for a, m in itertools.product(arch, mode):
45+
ret_code |= subprocess.check_call(
46+
[RUN_TESTS] + remaining_args[1:] + ['--arch', a, '--mode', m])
47+
return ret_code
48+
49+
if __name__ == '__main__':
50+
sys.exit(main())

deps/v8/gypfiles/toolchain.gypi

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
'msvs_use_common_release': 0,
3333
'clang%': 0,
3434
'asan%': 0,
35+
'cfi_vptr%': 0,
3536
'lsan%': 0,
3637
'msan%': 0,
3738
'tsan%': 0,

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 6
1212
#define V8_MINOR_VERSION 2
1313
#define V8_BUILD_NUMBER 414
14-
#define V8_PATCH_LEVEL 32
14+
#define V8_PATCH_LEVEL 44
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/asmjs/asm-js.cc

+1
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ MaybeHandle<Object> AsmJs::InstantiateAsmWasm(Isolate* isolate,
357357
ReportInstantiationFailure(script, position, "Requires heap buffer");
358358
return MaybeHandle<Object>();
359359
}
360+
memory->set_is_growable(false);
360361
size_t size = NumberToSize(memory->byte_length());
361362
// TODO(mstarzinger): We currently only limit byte length of the buffer to
362363
// be a multiple of 8, we should enforce the stricter spec limits here.

deps/v8/src/builtins/builtins-proxy-gen.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void ProxiesCodeStubAssembler::CheckHasTrapResult(Node* context, Node* target,
339339
Node* instance_type = LoadInstanceType(target);
340340
TryGetOwnProperty(context, target, target, target_map, instance_type, name,
341341
&if_found_value, &var_value, &var_details, &var_raw_value,
342-
check_passed, if_bailout);
342+
check_passed, if_bailout, kReturnAccessorPair);
343343

344344
// 9.b. If targetDesc is not undefined, then (see 9.b.i. below).
345345
BIND(&if_found_value);

deps/v8/src/builtins/builtins-proxy-helpers-gen.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void ProxyAssembler::CheckGetTrapResult(Node* context, Node* target,
9595
Node* instance_type = LoadInstanceType(target);
9696
TryGetOwnProperty(context, proxy, target, map, instance_type, name,
9797
&if_found_value, &var_value, &var_details, &var_raw_value,
98-
check_passed, if_bailout);
98+
check_passed, if_bailout, kReturnAccessorPair);
9999

100100
BIND(&if_found_value);
101101
{

deps/v8/src/builtins/builtins-string-gen.cc

+16-13
Original file line numberDiff line numberDiff line change
@@ -1051,9 +1051,9 @@ void StringBuiltinsAssembler::RequireObjectCoercible(Node* const context,
10511051
}
10521052

10531053
void StringBuiltinsAssembler::MaybeCallFunctionAtSymbol(
1054-
Node* const context, Node* const object, Handle<Symbol> symbol,
1055-
const NodeFunction0& regexp_call, const NodeFunction1& generic_call,
1056-
CodeStubArguments* args) {
1054+
Node* const context, Node* const object, Node* const maybe_string,
1055+
Handle<Symbol> symbol, const NodeFunction0& regexp_call,
1056+
const NodeFunction1& generic_call, CodeStubArguments* args) {
10571057
Label out(this);
10581058

10591059
// Smis definitely don't have an attached symbol.
@@ -1083,14 +1083,21 @@ void StringBuiltinsAssembler::MaybeCallFunctionAtSymbol(
10831083
}
10841084

10851085
// Take the fast path for RegExps.
1086+
// There's two conditions: {object} needs to be a fast regexp, and
1087+
// {maybe_string} must be a string (we can't call ToString on the fast path
1088+
// since it may mutate {object}).
10861089
{
10871090
Label stub_call(this), slow_lookup(this);
10881091

1092+
GotoIf(TaggedIsSmi(maybe_string), &slow_lookup);
1093+
GotoIfNot(IsString(maybe_string), &slow_lookup);
1094+
10891095
RegExpBuiltinsAssembler regexp_asm(state());
10901096
regexp_asm.BranchIfFastRegExp(context, object, object_map, &stub_call,
10911097
&slow_lookup);
10921098

10931099
BIND(&stub_call);
1100+
// TODO(jgruber): Add a no-JS scope once it exists.
10941101
Node* const result = regexp_call();
10951102
if (args == nullptr) {
10961103
Return(result);
@@ -1196,12 +1203,10 @@ TF_BUILTIN(StringPrototypeReplace, StringBuiltinsAssembler) {
11961203
// Redirect to replacer method if {search[@@replace]} is not undefined.
11971204

11981205
MaybeCallFunctionAtSymbol(
1199-
context, search, isolate()->factory()->replace_symbol(),
1206+
context, search, receiver, isolate()->factory()->replace_symbol(),
12001207
[=]() {
1201-
Node* const subject_string = ToString_Inline(context, receiver);
1202-
1203-
return CallBuiltin(Builtins::kRegExpReplace, context, search,
1204-
subject_string, replace);
1208+
return CallBuiltin(Builtins::kRegExpReplace, context, search, receiver,
1209+
replace);
12051210
},
12061211
[=](Node* fn) {
12071212
Callable call_callable = CodeFactory::Call(isolate());
@@ -1439,12 +1444,10 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
14391444
// Redirect to splitter method if {separator[@@split]} is not undefined.
14401445

14411446
MaybeCallFunctionAtSymbol(
1442-
context, separator, isolate()->factory()->split_symbol(),
1447+
context, separator, receiver, isolate()->factory()->split_symbol(),
14431448
[=]() {
1444-
Node* const subject_string = ToString_Inline(context, receiver);
1445-
1446-
return CallBuiltin(Builtins::kRegExpSplit, context, separator,
1447-
subject_string, limit);
1449+
return CallBuiltin(Builtins::kRegExpSplit, context, separator, receiver,
1450+
limit);
14481451
},
14491452
[=](Node* fn) {
14501453
Callable call_callable = CodeFactory::Call(isolate());

deps/v8/src/builtins/builtins-string-gen.h

+2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ class StringBuiltinsAssembler : public CodeStubAssembler {
8282
// }
8383
//
8484
// Contains fast paths for Smi and RegExp objects.
85+
// Important: {regexp_call} may not contain any code that can call into JS.
8586
typedef std::function<Node*()> NodeFunction0;
8687
typedef std::function<Node*(Node* fn)> NodeFunction1;
8788
void MaybeCallFunctionAtSymbol(Node* const context, Node* const object,
89+
Node* const maybe_string,
8890
Handle<Symbol> symbol,
8991
const NodeFunction0& regexp_call,
9092
const NodeFunction1& generic_call,

deps/v8/src/code-stub-assembler.cc

+25-21
Original file line numberDiff line numberDiff line change
@@ -5969,7 +5969,8 @@ void CodeStubAssembler::LoadPropertyFromGlobalDictionary(Node* dictionary,
59695969
// Returns either the original value, or the result of the getter call.
59705970
Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
59715971
Node* context, Node* receiver,
5972-
Label* if_bailout) {
5972+
Label* if_bailout,
5973+
GetOwnPropertyMode mode) {
59735974
VARIABLE(var_value, MachineRepresentation::kTagged, value);
59745975
Label done(this), if_accessor_info(this, Label::kDeferred);
59755976

@@ -5981,23 +5982,26 @@ Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
59815982

59825983
// AccessorPair case.
59835984
{
5984-
Node* accessor_pair = value;
5985-
Node* getter = LoadObjectField(accessor_pair, AccessorPair::kGetterOffset);
5986-
Node* getter_map = LoadMap(getter);
5987-
Node* instance_type = LoadMapInstanceType(getter_map);
5988-
// FunctionTemplateInfo getters are not supported yet.
5989-
GotoIf(
5990-
Word32Equal(instance_type, Int32Constant(FUNCTION_TEMPLATE_INFO_TYPE)),
5991-
if_bailout);
5992-
5993-
// Return undefined if the {getter} is not callable.
5994-
var_value.Bind(UndefinedConstant());
5995-
GotoIfNot(IsCallableMap(getter_map), &done);
5996-
5997-
// Call the accessor.
5998-
Callable callable = CodeFactory::Call(isolate());
5999-
Node* result = CallJS(callable, context, getter, receiver);
6000-
var_value.Bind(result);
5985+
if (mode == kCallJSGetter) {
5986+
Node* accessor_pair = value;
5987+
Node* getter =
5988+
LoadObjectField(accessor_pair, AccessorPair::kGetterOffset);
5989+
Node* getter_map = LoadMap(getter);
5990+
Node* instance_type = LoadMapInstanceType(getter_map);
5991+
// FunctionTemplateInfo getters are not supported yet.
5992+
GotoIf(Word32Equal(instance_type,
5993+
Int32Constant(FUNCTION_TEMPLATE_INFO_TYPE)),
5994+
if_bailout);
5995+
5996+
// Return undefined if the {getter} is not callable.
5997+
var_value.Bind(UndefinedConstant());
5998+
GotoIfNot(IsCallableMap(getter_map), &done);
5999+
6000+
// Call the accessor.
6001+
Callable callable = CodeFactory::Call(isolate());
6002+
Node* result = CallJS(callable, context, getter, receiver);
6003+
var_value.Bind(result);
6004+
}
60016005
Goto(&done);
60026006
}
60036007

@@ -6067,14 +6071,14 @@ void CodeStubAssembler::TryGetOwnProperty(
60676071
Label* if_not_found, Label* if_bailout) {
60686072
TryGetOwnProperty(context, receiver, object, map, instance_type, unique_name,
60696073
if_found_value, var_value, nullptr, nullptr, if_not_found,
6070-
if_bailout);
6074+
if_bailout, kCallJSGetter);
60716075
}
60726076

60736077
void CodeStubAssembler::TryGetOwnProperty(
60746078
Node* context, Node* receiver, Node* object, Node* map, Node* instance_type,
60756079
Node* unique_name, Label* if_found_value, Variable* var_value,
60766080
Variable* var_details, Variable* var_raw_value, Label* if_not_found,
6077-
Label* if_bailout) {
6081+
Label* if_bailout, GetOwnPropertyMode mode) {
60786082
DCHECK_EQ(MachineRepresentation::kTagged, var_value->rep());
60796083
Comment("TryGetOwnProperty");
60806084

@@ -6125,7 +6129,7 @@ void CodeStubAssembler::TryGetOwnProperty(
61256129
var_raw_value->Bind(var_value->value());
61266130
}
61276131
Node* value = CallGetterIfAccessor(var_value->value(), var_details->value(),
6128-
context, receiver, if_bailout);
6132+
context, receiver, if_bailout, mode);
61296133
var_value->Bind(value);
61306134
Goto(if_found_value);
61316135
}

0 commit comments

Comments
 (0)