Skip to content

Commit 5424d6f

Browse files
ofrobotsrvagg
authored andcommitted
deps: upgrade V8 to 4.5.103.30
Pick up v8/v8@f9a0a16 Commit log at https://chromium.googlesource.com/v8/v8.git/+log/branch-heads/4.5 PR-URL: #2632 Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
1 parent dd3f341 commit 5424d6f

25 files changed

+210
-147
lines changed

deps/v8/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,8 @@ source_set("v8_base") {
10771077
"src/splay-tree.h",
10781078
"src/splay-tree-inl.h",
10791079
"src/snapshot/snapshot.h",
1080+
"src/startup-data-util.h",
1081+
"src/startup-data-util.cc",
10801082
"src/string-builder.cc",
10811083
"src/string-builder.h",
10821084
"src/string-search.cc",
@@ -1678,8 +1680,6 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
16781680
sources = [
16791681
"src/d8.cc",
16801682
"src/d8.h",
1681-
"src/startup-data-util.h",
1682-
"src/startup-data-util.cc",
16831683
]
16841684

16851685
configs -= [ "//build/config/compiler:chromium_code" ]

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 4
1212
#define V8_MINOR_VERSION 5
1313
#define V8_BUILD_NUMBER 103
14-
#define V8_PATCH_LEVEL 24
14+
#define V8_PATCH_LEVEL 30
1515

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

deps/v8/include/v8.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6247,6 +6247,25 @@ class V8_EXPORT V8 {
62476247
*/
62486248
static bool InitializeICU(const char* icu_data_file = NULL);
62496249

6250+
/**
6251+
* Initialize the external startup data. The embedder only needs to
6252+
* invoke this method when external startup data was enabled in a build.
6253+
*
6254+
* If V8 was compiled with the startup data in an external file, then
6255+
* V8 needs to be given those external files during startup. There are
6256+
* three ways to do this:
6257+
* - InitializeExternalStartupData(const char*)
6258+
* This will look in the given directory for files "natives_blob.bin"
6259+
* and "snapshot_blob.bin" - which is what the default build calls them.
6260+
* - InitializeExternalStartupData(const char*, const char*)
6261+
* As above, but will directly use the two given file names.
6262+
* - Call SetNativesDataBlob, SetNativesDataBlob.
6263+
* This will read the blobs from the given data structures and will
6264+
* not perform any file IO.
6265+
*/
6266+
static void InitializeExternalStartupData(const char* directory_path);
6267+
static void InitializeExternalStartupData(const char* natives_blob,
6268+
const char* snapshot_blob);
62506269
/**
62516270
* Sets the v8::Platform to use. This should be invoked before V8 is
62526271
* initialized.

deps/v8/samples/hello-world.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
2525
int main(int argc, char* argv[]) {
2626
// Initialize V8.
2727
V8::InitializeICU();
28+
V8::InitializeExternalStartupData(argv[0]);
2829
Platform* platform = platform::CreateDefaultPlatform();
2930
V8::InitializePlatform(platform);
3031
V8::Initialize();

deps/v8/samples/process.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ void PrintMap(map<string, string>* m) {
686686

687687
int main(int argc, char* argv[]) {
688688
v8::V8::InitializeICU();
689+
v8::V8::InitializeExternalStartupData(argv[0]);
689690
v8::Platform* platform = v8::platform::CreateDefaultPlatform();
690691
v8::V8::InitializePlatform(platform);
691692
v8::V8::Initialize();

deps/v8/samples/shell.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
7575

7676
int main(int argc, char* argv[]) {
7777
v8::V8::InitializeICU();
78+
v8::V8::InitializeExternalStartupData(argv[0]);
7879
v8::Platform* platform = v8::platform::CreateDefaultPlatform();
7980
v8::V8::InitializePlatform(platform);
8081
v8::V8::Initialize();

deps/v8/src/api.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "src/simulator.h"
5050
#include "src/snapshot/natives.h"
5151
#include "src/snapshot/snapshot.h"
52+
#include "src/startup-data-util.h"
5253
#include "src/unicode-inl.h"
5354
#include "src/v8threads.h"
5455
#include "src/version.h"
@@ -5398,11 +5399,23 @@ HeapObjectStatistics::HeapObjectStatistics()
53985399
object_count_(0),
53995400
object_size_(0) {}
54005401

5402+
54015403
bool v8::V8::InitializeICU(const char* icu_data_file) {
54025404
return i::InitializeICU(icu_data_file);
54035405
}
54045406

54055407

5408+
void v8::V8::InitializeExternalStartupData(const char* directory_path) {
5409+
i::InitializeExternalStartupData(directory_path);
5410+
}
5411+
5412+
5413+
void v8::V8::InitializeExternalStartupData(const char* natives_blob,
5414+
const char* snapshot_blob) {
5415+
i::InitializeExternalStartupData(natives_blob, snapshot_blob);
5416+
}
5417+
5418+
54065419
const char* v8::V8::GetVersion() {
54075420
return i::Version::GetVersion();
54085421
}

deps/v8/src/arm/assembler-arm.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
128128
if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS;
129129

130130
if (cpu.implementer() == base::CPU::NVIDIA &&
131-
cpu.variant() == base::CPU::NVIDIA_DENVER) {
131+
cpu.variant() == base::CPU::NVIDIA_DENVER &&
132+
cpu.part() <= base::CPU::NVIDIA_DENVER_V10) {
132133
supported_ |= 1u << COHERENT_CACHE;
133134
}
134135
#endif

deps/v8/src/arm64/assembler-arm64.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
5353
// Probe for runtime features
5454
base::CPU cpu;
5555
if (cpu.implementer() == base::CPU::NVIDIA &&
56-
cpu.variant() == base::CPU::NVIDIA_DENVER) {
56+
cpu.variant() == base::CPU::NVIDIA_DENVER &&
57+
cpu.part() <= base::CPU::NVIDIA_DENVER_V10) {
5758
supported_ |= 1u << COHERENT_CACHE;
5859
}
5960
}

deps/v8/src/base/cpu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class CPU final {
5959
static const int ARM_CORTEX_A12 = 0xc0c;
6060
static const int ARM_CORTEX_A15 = 0xc0f;
6161

62+
// Denver-specific part code
63+
static const int NVIDIA_DENVER_V10 = 0x002;
64+
6265
// PPC-specific part codes
6366
enum {
6467
PPC_POWER5,

0 commit comments

Comments
 (0)