Skip to content

Commit

Permalink
deps: patch V8 to 6.2.414.44
Browse files Browse the repository at this point in the history
Refs: v8/v8@6.2.414.32...6.2.414.44
PR-URL: #16848
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
MylesBorins authored and evanlucas committed Nov 13, 2017
1 parent ad02676 commit 6ddba2e
Show file tree
Hide file tree
Showing 38 changed files with 486 additions and 187 deletions.
2 changes: 0 additions & 2 deletions deps/v8/BUILD.gn
Expand Up @@ -827,7 +827,6 @@ action("v8_dump_build_config") {
is_gcov_coverage = v8_code_coverage && !is_clang
args = [
rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
"current_cpu=\"$current_cpu\"",
"dcheck_always_on=$dcheck_always_on",
"is_asan=$is_asan",
"is_cfi=$is_cfi",
Expand All @@ -838,7 +837,6 @@ action("v8_dump_build_config") {
"is_tsan=$is_tsan",
"is_ubsan_vptr=$is_ubsan_vptr",
"target_cpu=\"$target_cpu\"",
"v8_current_cpu=\"$v8_current_cpu\"",
"v8_enable_i18n_support=$v8_enable_i18n_support",
"v8_target_cpu=\"$v8_target_cpu\"",
"v8_use_snapshot=$v8_use_snapshot",
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/DEPS
Expand Up @@ -12,7 +12,7 @@ deps = {
"v8/tools/gyp":
Var("chromium_url") + "/external/gyp.git" + "@" + "d61a9397e668fa9843c4aa7da9e79460fe590bfb",
"v8/third_party/icu":
Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "08cb956852a5ccdba7f9c941728bb833529ba3c6",
Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "21d33b1a09a77f033478ea4ffffb61e6970f83bd",
"v8/third_party/instrumented_libraries":
Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "644afd349826cb68204226a16c38bde13abe9c3c",
"v8/buildtools":
Expand Down
26 changes: 13 additions & 13 deletions deps/v8/Makefile
Expand Up @@ -338,40 +338,40 @@ $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) Makefile.android

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

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

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

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

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

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

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

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

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

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

SUPERFASTTESTMODES = ia32.release
Expand All @@ -391,18 +391,18 @@ COMMA = ,
EMPTY =
SPACE = $(EMPTY) $(EMPTY)
quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \
--download-data mozilla webkit
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
qc: quickcheck

turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \
--quickcheck --variants=turbofan --download-data mozilla webkit
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
gypfiles/run-tests-legacy.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \
--quickcheck --variants=turbofan
tc: turbocheck
Expand Down
2 changes: 0 additions & 2 deletions deps/v8/gni/isolate.gni
Expand Up @@ -156,8 +156,6 @@ template("v8_isolate_run") {
"--config-variable",
"icu_use_data_file_flag=$icu_use_data_file_flag",
"--config-variable",
"is_gn=1",
"--config-variable",
"msan=$msan",
"--config-variable",
"tsan=$tsan",
Expand Down
1 change: 0 additions & 1 deletion deps/v8/gypfiles/isolate.gypi
Expand Up @@ -74,7 +74,6 @@
'--config-variable', 'gcmole=<(gcmole)',
'--config-variable', 'has_valgrind=<(has_valgrind)',
'--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
'--config-variable', 'is_gn=0',
'--config-variable', 'msan=<(msan)',
'--config-variable', 'tsan=<(tsan)',
'--config-variable', 'coverage=<(coverage)',
Expand Down
50 changes: 50 additions & 0 deletions deps/v8/gypfiles/run-tests-legacy.py
@@ -0,0 +1,50 @@
#!/usr/bin/env python
# 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.

"""
Legacy test-runner wrapper supporting a product of multiple architectures and
modes.
"""

import argparse
import itertools
from os.path import abspath, dirname, join
import subprocess
import sys

BASE_DIR = dirname(dirname(abspath(__file__)))
RUN_TESTS = join(BASE_DIR, 'tools', 'run-tests.py')

def main():
parser = argparse.ArgumentParser(description='Legacy test-runner wrapper')
parser.add_argument(
'--arch', help='Comma-separated architectures to run tests on')
parser.add_argument(
'--mode', help='Comma-separated modes to run tests on')
parser.add_argument(
'--arch-and-mode',
help='Architecture and mode in the format \'arch.mode\'',
)

args, remaining_args = parser.parse_known_args(sys.argv)
if (args.arch or args.mode) and args.arch_and_mode:
parser.error('The flags --arch-and-mode and --arch/--mode are exclusive.')
arch = (args.arch or 'ia32,x64,arm').split(',')
mode = (args.mode or 'release,debug').split(',')
if args.arch_and_mode:
arch_and_mode = map(
lambda am: am.split('.'),
args.arch_and_mode.split(','))
arch = map(lambda am: am[0], arch_and_mode)
mode = map(lambda am: am[1], arch_and_mode)

ret_code = 0
for a, m in itertools.product(arch, mode):
ret_code |= subprocess.check_call(
[RUN_TESTS] + remaining_args[1:] + ['--arch', a, '--mode', m])
return ret_code

if __name__ == '__main__':
sys.exit(main())
1 change: 1 addition & 0 deletions deps/v8/gypfiles/toolchain.gypi
Expand Up @@ -32,6 +32,7 @@
'msvs_use_common_release': 0,
'clang%': 0,
'asan%': 0,
'cfi_vptr%': 0,
'lsan%': 0,
'msan%': 0,
'tsan%': 0,
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 2
#define V8_BUILD_NUMBER 414
#define V8_PATCH_LEVEL 32
#define V8_PATCH_LEVEL 44

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/asmjs/asm-js.cc
Expand Up @@ -357,6 +357,7 @@ MaybeHandle<Object> AsmJs::InstantiateAsmWasm(Isolate* isolate,
ReportInstantiationFailure(script, position, "Requires heap buffer");
return MaybeHandle<Object>();
}
memory->set_is_growable(false);
size_t size = NumberToSize(memory->byte_length());
// TODO(mstarzinger): We currently only limit byte length of the buffer to
// be a multiple of 8, we should enforce the stricter spec limits here.
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/builtins/builtins-proxy-gen.cc
Expand Up @@ -339,7 +339,7 @@ void ProxiesCodeStubAssembler::CheckHasTrapResult(Node* context, Node* target,
Node* instance_type = LoadInstanceType(target);
TryGetOwnProperty(context, target, target, target_map, instance_type, name,
&if_found_value, &var_value, &var_details, &var_raw_value,
check_passed, if_bailout);
check_passed, if_bailout, kReturnAccessorPair);

// 9.b. If targetDesc is not undefined, then (see 9.b.i. below).
BIND(&if_found_value);
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/builtins/builtins-proxy-helpers-gen.cc
Expand Up @@ -95,7 +95,7 @@ void ProxyAssembler::CheckGetTrapResult(Node* context, Node* target,
Node* instance_type = LoadInstanceType(target);
TryGetOwnProperty(context, proxy, target, map, instance_type, name,
&if_found_value, &var_value, &var_details, &var_raw_value,
check_passed, if_bailout);
check_passed, if_bailout, kReturnAccessorPair);

BIND(&if_found_value);
{
Expand Down
29 changes: 16 additions & 13 deletions deps/v8/src/builtins/builtins-string-gen.cc
Expand Up @@ -1051,9 +1051,9 @@ void StringBuiltinsAssembler::RequireObjectCoercible(Node* const context,
}

void StringBuiltinsAssembler::MaybeCallFunctionAtSymbol(
Node* const context, Node* const object, Handle<Symbol> symbol,
const NodeFunction0& regexp_call, const NodeFunction1& generic_call,
CodeStubArguments* args) {
Node* const context, Node* const object, Node* const maybe_string,
Handle<Symbol> symbol, const NodeFunction0& regexp_call,
const NodeFunction1& generic_call, CodeStubArguments* args) {
Label out(this);

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

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

GotoIf(TaggedIsSmi(maybe_string), &slow_lookup);
GotoIfNot(IsString(maybe_string), &slow_lookup);

RegExpBuiltinsAssembler regexp_asm(state());
regexp_asm.BranchIfFastRegExp(context, object, object_map, &stub_call,
&slow_lookup);

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

MaybeCallFunctionAtSymbol(
context, search, isolate()->factory()->replace_symbol(),
context, search, receiver, isolate()->factory()->replace_symbol(),
[=]() {
Node* const subject_string = ToString_Inline(context, receiver);

return CallBuiltin(Builtins::kRegExpReplace, context, search,
subject_string, replace);
return CallBuiltin(Builtins::kRegExpReplace, context, search, receiver,
replace);
},
[=](Node* fn) {
Callable call_callable = CodeFactory::Call(isolate());
Expand Down Expand Up @@ -1439,12 +1444,10 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
// Redirect to splitter method if {separator[@@split]} is not undefined.

MaybeCallFunctionAtSymbol(
context, separator, isolate()->factory()->split_symbol(),
context, separator, receiver, isolate()->factory()->split_symbol(),
[=]() {
Node* const subject_string = ToString_Inline(context, receiver);

return CallBuiltin(Builtins::kRegExpSplit, context, separator,
subject_string, limit);
return CallBuiltin(Builtins::kRegExpSplit, context, separator, receiver,
limit);
},
[=](Node* fn) {
Callable call_callable = CodeFactory::Call(isolate());
Expand Down
2 changes: 2 additions & 0 deletions deps/v8/src/builtins/builtins-string-gen.h
Expand Up @@ -82,9 +82,11 @@ class StringBuiltinsAssembler : public CodeStubAssembler {
// }
//
// Contains fast paths for Smi and RegExp objects.
// Important: {regexp_call} may not contain any code that can call into JS.
typedef std::function<Node*()> NodeFunction0;
typedef std::function<Node*(Node* fn)> NodeFunction1;
void MaybeCallFunctionAtSymbol(Node* const context, Node* const object,
Node* const maybe_string,
Handle<Symbol> symbol,
const NodeFunction0& regexp_call,
const NodeFunction1& generic_call,
Expand Down
46 changes: 25 additions & 21 deletions deps/v8/src/code-stub-assembler.cc
Expand Up @@ -5969,7 +5969,8 @@ void CodeStubAssembler::LoadPropertyFromGlobalDictionary(Node* dictionary,
// Returns either the original value, or the result of the getter call.
Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
Node* context, Node* receiver,
Label* if_bailout) {
Label* if_bailout,
GetOwnPropertyMode mode) {
VARIABLE(var_value, MachineRepresentation::kTagged, value);
Label done(this), if_accessor_info(this, Label::kDeferred);

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

// AccessorPair case.
{
Node* accessor_pair = value;
Node* getter = LoadObjectField(accessor_pair, AccessorPair::kGetterOffset);
Node* getter_map = LoadMap(getter);
Node* instance_type = LoadMapInstanceType(getter_map);
// FunctionTemplateInfo getters are not supported yet.
GotoIf(
Word32Equal(instance_type, Int32Constant(FUNCTION_TEMPLATE_INFO_TYPE)),
if_bailout);

// Return undefined if the {getter} is not callable.
var_value.Bind(UndefinedConstant());
GotoIfNot(IsCallableMap(getter_map), &done);

// Call the accessor.
Callable callable = CodeFactory::Call(isolate());
Node* result = CallJS(callable, context, getter, receiver);
var_value.Bind(result);
if (mode == kCallJSGetter) {
Node* accessor_pair = value;
Node* getter =
LoadObjectField(accessor_pair, AccessorPair::kGetterOffset);
Node* getter_map = LoadMap(getter);
Node* instance_type = LoadMapInstanceType(getter_map);
// FunctionTemplateInfo getters are not supported yet.
GotoIf(Word32Equal(instance_type,
Int32Constant(FUNCTION_TEMPLATE_INFO_TYPE)),
if_bailout);

// Return undefined if the {getter} is not callable.
var_value.Bind(UndefinedConstant());
GotoIfNot(IsCallableMap(getter_map), &done);

// Call the accessor.
Callable callable = CodeFactory::Call(isolate());
Node* result = CallJS(callable, context, getter, receiver);
var_value.Bind(result);
}
Goto(&done);
}

Expand Down Expand Up @@ -6067,14 +6071,14 @@ void CodeStubAssembler::TryGetOwnProperty(
Label* if_not_found, Label* if_bailout) {
TryGetOwnProperty(context, receiver, object, map, instance_type, unique_name,
if_found_value, var_value, nullptr, nullptr, if_not_found,
if_bailout);
if_bailout, kCallJSGetter);
}

void CodeStubAssembler::TryGetOwnProperty(
Node* context, Node* receiver, Node* object, Node* map, Node* instance_type,
Node* unique_name, Label* if_found_value, Variable* var_value,
Variable* var_details, Variable* var_raw_value, Label* if_not_found,
Label* if_bailout) {
Label* if_bailout, GetOwnPropertyMode mode) {
DCHECK_EQ(MachineRepresentation::kTagged, var_value->rep());
Comment("TryGetOwnProperty");

Expand Down Expand Up @@ -6125,7 +6129,7 @@ void CodeStubAssembler::TryGetOwnProperty(
var_raw_value->Bind(var_value->value());
}
Node* value = CallGetterIfAccessor(var_value->value(), var_details->value(),
context, receiver, if_bailout);
context, receiver, if_bailout, mode);
var_value->Bind(value);
Goto(if_found_value);
}
Expand Down

0 comments on commit 6ddba2e

Please sign in to comment.