Skip to content

Commit

Permalink
Update V8 to f52a483305b2c524b6f2fa9066c8fb097fc11a47
Browse files Browse the repository at this point in the history
  • Loading branch information
hashseed authored and fhinkel committed Mar 14, 2017
1 parent ac61d0c commit f4ec76a
Show file tree
Hide file tree
Showing 133 changed files with 2,447 additions and 3,908 deletions.
6 changes: 4 additions & 2 deletions deps/v8/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ check_targets = []
# These are the list of GN files that run exec_script. This whitelist exists
# to force additional review for new uses of exec_script, which is strongly
# discouraged except for gypi_to_gn calls.
exec_script_whitelist =
build_dotfile_settings.exec_script_whitelist + [ "//test/test262/BUILD.gn" ]
exec_script_whitelist = build_dotfile_settings.exec_script_whitelist + [
"//test/test262/BUILD.gn",
"//BUILD.gn",
]
93 changes: 43 additions & 50 deletions deps/v8/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ declare_args() {
v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
v8_current_cpu == "x87") && (is_linux || is_mac)) ||
(v8_current_cpu == "ppc64" && is_linux)

# Set v8_host_byteorder
v8_host_byteorder = "little"

# ppc64 can be either BE or LE
if (host_cpu == "ppc64") {
v8_host_byteorder =
exec_script("//tools/get_byteorder.py", [], "trim string")
}
if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" ||
host_cpu == "mips" || host_cpu == "mips64") {
v8_host_byteorder = "big"
}
}

# Derived defaults.
Expand Down Expand Up @@ -361,8 +374,31 @@ config("toolchain") {
if (v8_current_cpu == "s390x") {
defines += [ "V8_TARGET_ARCH_S390X" ]
}
if (host_cpu == "x64" || host_cpu == "x86") {
if (v8_host_byteorder == "little") {
defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
} else {
cflags += [ "-march=z196" ]
}
}
if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
defines += [ "V8_TARGET_ARCH_PPC" ]
if (v8_current_cpu == "ppc64") {
defines += [ "V8_TARGET_ARCH_PPC64" ]
}
if (v8_host_byteorder == "little") {
defines += [ "V8_TARGET_ARCH_PPC_LE" ]
} else if (v8_host_byteorder == "big") {
defines += [ "V8_TARGET_ARCH_PPC_BE" ]
if (current_os == "aix") {
cflags += [
# Work around AIX ceil, trunc and round oddities.
"-mcpu=power5+",
"-mfprnd",

# Work around AIX assembler popcntb bug.
"-mno-popcntb",
]
}
}
}
if (v8_current_cpu == "x86") {
Expand Down Expand Up @@ -487,43 +523,6 @@ action("js2c") {
}
}

action("js2c_experimental") {
visibility = [ ":*" ] # Only targets in this file can depend on this.

script = "tools/js2c.py"

# The script depends on this other script, this rule causes a rebuild if it
# changes.
inputs = [
"tools/jsmin.py",
]

# NOSORT
sources = [
"src/js/macros.py",
"src/messages.h",
"src/js/harmony-atomics.js",
]

outputs = [
"$target_gen_dir/experimental-libraries.cc",
]

args = [
rebase_path("$target_gen_dir/experimental-libraries.cc",
root_build_dir),
"EXPERIMENTAL",
] + rebase_path(sources, root_build_dir)

if (v8_use_external_startup_data) {
outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
args += [
"--startup_blob",
rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
]
}
}

action("js2c_extras") {
visibility = [ ":*" ] # Only targets in this file can depend on this.

Expand Down Expand Up @@ -634,15 +633,13 @@ if (v8_use_external_startup_data) {

deps = [
":js2c",
":js2c_experimental",
":js2c_experimental_extras",
":js2c_extras",
]

# NOSORT
sources = [
"$target_gen_dir/libraries.bin",
"$target_gen_dir/libraries_experimental.bin",
"$target_gen_dir/libraries_extras.bin",
"$target_gen_dir/libraries_experimental_extras.bin",
]
Expand Down Expand Up @@ -805,15 +802,13 @@ v8_source_set("v8_nosnapshot") {

deps = [
":js2c",
":js2c_experimental",
":js2c_experimental_extras",
":js2c_extras",
":v8_base",
]

sources = [
"$target_gen_dir/experimental-extras-libraries.cc",
"$target_gen_dir/experimental-libraries.cc",
"$target_gen_dir/extras-libraries.cc",
"$target_gen_dir/libraries.cc",
"src/snapshot/snapshot-empty.cc",
Expand All @@ -832,7 +827,6 @@ v8_source_set("v8_snapshot") {

deps = [
":js2c",
":js2c_experimental",
":js2c_experimental_extras",
":js2c_extras",
":v8_base",
Expand All @@ -845,7 +839,6 @@ v8_source_set("v8_snapshot") {

sources = [
"$target_gen_dir/experimental-extras-libraries.cc",
"$target_gen_dir/experimental-libraries.cc",
"$target_gen_dir/extras-libraries.cc",
"$target_gen_dir/libraries.cc",
"$target_gen_dir/snapshot.cc",
Expand All @@ -860,7 +853,6 @@ if (v8_use_external_startup_data) {

deps = [
":js2c",
":js2c_experimental",
":js2c_experimental_extras",
":js2c_extras",
":v8_base",
Expand Down Expand Up @@ -898,7 +890,6 @@ v8_source_set("v8_base") {

### gcmole(all) ###
"include/v8-debug.h",
"include/v8-experimental.h",
"include/v8-platform.h",
"include/v8-profiler.h",
"include/v8-testing.h",
Expand All @@ -916,8 +907,6 @@ v8_source_set("v8_base") {
"src/api-arguments-inl.h",
"src/api-arguments.cc",
"src/api-arguments.h",
"src/api-experimental.cc",
"src/api-experimental.h",
"src/api-natives.cc",
"src/api-natives.h",
"src/api.cc",
Expand Down Expand Up @@ -1398,8 +1387,6 @@ v8_source_set("v8_base") {
"src/external-reference-table.h",
"src/factory.cc",
"src/factory.h",
"src/fast-accessor-assembler.cc",
"src/fast-accessor-assembler.h",
"src/fast-dtoa.cc",
"src/fast-dtoa.h",
"src/feedback-vector-inl.h",
Expand Down Expand Up @@ -1783,6 +1770,9 @@ v8_source_set("v8_base") {
"src/transitions-inl.h",
"src/transitions.cc",
"src/transitions.h",
"src/trap-handler/handler-outside.cc",
"src/trap-handler/handler-shared.cc",
"src/trap-handler/trap-handler-internal.h",
"src/trap-handler/trap-handler.h",
"src/type-hints.cc",
"src/type-hints.h",
Expand Down Expand Up @@ -1939,6 +1929,9 @@ v8_source_set("v8_base") {
"src/x64/simulator-x64.h",
"src/x64/sse-instr.h",
]
if (is_linux) {
sources += [ "src/trap-handler/handler-inside.cc" ]
}
} else if (v8_current_cpu == "arm") {
sources += [ ### gcmole(arch:arm) ###
"src/arm/assembler-arm-inl.h",
Expand Down
10 changes: 5 additions & 5 deletions deps/v8/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ vars = {

deps = {
"v8/build":
Var("chromium_url") + "/chromium/src/build.git" + "@" + "1748b434c77f774e6046d6cd721e7534a9643163",
Var("chromium_url") + "/chromium/src/build.git" + "@" + "7de5863ecae56a4c730bf6e204844809c8a5c9a1",
"v8/tools/gyp":
Var("chromium_url") + "/external/gyp.git" + "@" + "e7079f0e0e14108ab0dba58728ff219637458563",
"v8/third_party/icu":
Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "450be73c9ee8ae29d43d4fdc82febb2a5f62bfb5",
"v8/third_party/instrumented_libraries":
Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "62275386c19e927797e8ae6b0c6e57a76c9c6f3c",
"v8/buildtools":
Var("chromium_url") + "/chromium/buildtools.git" + "@" + "b3771b1935ea74c388b6fb1750e83f5d83b39dec",
Var("chromium_url") + "/chromium/buildtools.git" + "@" + "e6b510a9daf822bbe9f922c200c58150803d2fd8",
"v8/base/trace_event/common":
Var("chromium_url") + "/chromium/src/base/trace_event/common.git" + "@" + "06294c8a4a6f744ef284cd63cfe54dbf61eea290",
"v8/third_party/jinja2":
Expand All @@ -34,11 +34,11 @@ deps = {
"v8/test/mozilla/data":
Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be",
"v8/test/test262/data":
Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "a72ee6d91275aa6524e84a9b7070103411ef2689",
Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "975e54de17ede3d8802dd7411181dbbc29147308",
"v8/test/test262/harness":
Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd",
"v8/tools/clang":
Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "49cece5b02431a848652c7f60dd7b06d94e8d625",
Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "f0916116c79ff2d9e16f1a7b5b538f7e059a22e4",
"v8/test/wasm-js":
Var("chromium_url") + "/external/github.com/WebAssembly/spec.git" + "@" + "002e57c86ccf5c80db0de6e40246665340350c43",
}
Expand All @@ -48,7 +48,7 @@ deps_os = {
"v8/third_party/android_tools":
Var("chromium_url") + "/android_tools.git" + "@" + "b43a6a289a7588b1769814f04dd6c7d7176974cc",
"v8/third_party/catapult":
Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "4550ebce30c0593fb85be7890b84b942e8b7af57",
Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "1ec68b3ec601050947ad07144cef43bf5545fb22",
},
"win": {
"v8/third_party/cygwin":
Expand Down
58 changes: 0 additions & 58 deletions deps/v8/include/v8-experimental.h

This file was deleted.

48 changes: 31 additions & 17 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ class CallHandlerHelper;
class EscapableHandleScope;
template<typename T> class ReturnValue;

namespace experimental {
class FastAccessorBuilder;
} // namespace experimental

namespace internal {
class Arguments;
class Heap;
Expand Down Expand Up @@ -5100,16 +5096,6 @@ class V8_EXPORT FunctionTemplate : public Template {
static MaybeLocal<FunctionTemplate> FromSnapshot(Isolate* isolate,
size_t index);

/**
* Creates a function template with a fast handler. If a fast handler is set,
* the callback cannot be null.
*/
static Local<FunctionTemplate> NewWithFastHandler(
Isolate* isolate, FunctionCallback callback,
experimental::FastAccessorBuilder* fast_handler = nullptr,
Local<Value> data = Local<Value>(),
Local<Signature> signature = Local<Signature>(), int length = 0);

/**
* Creates a function template backed/cached by a private property.
*/
Expand Down Expand Up @@ -5137,9 +5123,8 @@ class V8_EXPORT FunctionTemplate : public Template {
* callback is called whenever the function created from this
* FunctionTemplate is called.
*/
void SetCallHandler(
FunctionCallback callback, Local<Value> data = Local<Value>(),
experimental::FastAccessorBuilder* fast_handler = nullptr);
void SetCallHandler(FunctionCallback callback,
Local<Value> data = Local<Value>());

/** Set the predefined length property for the FunctionTemplate. */
void SetLength(int length);
Expand Down Expand Up @@ -7633,6 +7618,35 @@ class V8_EXPORT V8 {
*/
static void ShutdownPlatform();

#if V8_OS_LINUX && V8_TARGET_ARCH_X64
/**
* Give the V8 signal handler a chance to handle a fault.
*
* This function determines whether a memory access violation can be recovered
* by V8. If so, it will return true and modify context to return to a code
* fragment that can recover from the fault. Otherwise, TryHandleSignal will
* return false.
*
* The parameters to this function correspond to those passed to a Linux
* signal handler.
*
* \param signal_number The signal number.
*
* \param info A pointer to the siginfo_t structure provided to the signal
* handler.
*
* \param context The third argument passed to the Linux signal handler, which
* points to a ucontext_t structure.
*/
static bool TryHandleSignal(int signal_number, void* info, void* context);
#endif // V8_OS_LINUX

/**
* Enable the default signal handler rather than using one provided by the
* embedder.
*/
static bool RegisterDefaultSignalHandler();

private:
V8();

Expand Down
Loading

0 comments on commit f4ec76a

Please sign in to comment.