| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dd3f341 commit 5424d6f
25 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1077,6 +1077,8 @@ source_set("v8_base") { | |||
| 1077 | 1077 | "src/splay-tree.h", | |
| 1078 | 1078 | "src/splay-tree-inl.h", | |
| 1079 | 1079 | "src/snapshot/snapshot.h", | |
| 1080 | + "src/startup-data-util.h", | ||
| 1081 | + "src/startup-data-util.cc", | ||
| 1080 | 1082 | "src/string-builder.cc", | |
| 1081 | 1083 | "src/string-builder.h", | |
| 1082 | 1084 | "src/string-search.cc", | |
@@ -1678,8 +1680,6 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || | |||
| 1678 | 1680 | sources = [ | |
| 1679 | 1681 | "src/d8.cc", | |
| 1680 | 1682 | "src/d8.h", | |
| 1681 | - "src/startup-data-util.h", | ||
| 1682 | - "src/startup-data-util.cc", | ||
| 1683 | 1683 | ] | |
| 1684 | 1684 | ||
| 1685 | 1685 | configs -= [ "//build/config/compiler:chromium_code" ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ | |||
| 11 | 11 | #define V8_MAJOR_VERSION 4 | |
| 12 | 12 | #define V8_MINOR_VERSION 5 | |
| 13 | 13 | #define V8_BUILD_NUMBER 103 | |
| 14 | - #define V8_PATCH_LEVEL 24 | ||
| 14 | + #define V8_PATCH_LEVEL 30 | ||
| 15 | 15 | ||
| 16 | 16 | // Use 1 for candidates and 0 otherwise. | |
| 17 | 17 | // (Boolean macro values are not supported by all preprocessors.) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6247,6 +6247,25 @@ class V8_EXPORT V8 { | |||
| 6247 | 6247 | */ | |
| 6248 | 6248 | static bool InitializeICU(const char* icu_data_file = NULL); | |
| 6249 | 6249 | ||
| 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); | ||
| 6250 | 6269 | /** | |
| 6251 | 6270 | * Sets the v8::Platform to use. This should be invoked before V8 is | |
| 6252 | 6271 | * initialized. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | |||
| 25 | 25 | int main(int argc, char* argv[]) { | |
| 26 | 26 | // Initialize V8. | |
| 27 | 27 | V8::InitializeICU(); | |
| 28 | + V8::InitializeExternalStartupData(argv[0]); | ||
| 28 | 29 | Platform* platform = platform::CreateDefaultPlatform(); | |
| 29 | 30 | V8::InitializePlatform(platform); | |
| 30 | 31 | V8::Initialize(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -686,6 +686,7 @@ void PrintMap(map<string, string>* m) { | |||
| 686 | 686 | ||
| 687 | 687 | int main(int argc, char* argv[]) { | |
| 688 | 688 | v8::V8::InitializeICU(); | |
| 689 | + v8::V8::InitializeExternalStartupData(argv[0]); | ||
| 689 | 690 | v8::Platform* platform = v8::platform::CreateDefaultPlatform(); | |
| 690 | 691 | v8::V8::InitializePlatform(platform); | |
| 691 | 692 | v8::V8::Initialize(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,6 +75,7 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | |||
| 75 | 75 | ||
| 76 | 76 | int main(int argc, char* argv[]) { | |
| 77 | 77 | v8::V8::InitializeICU(); | |
| 78 | + v8::V8::InitializeExternalStartupData(argv[0]); | ||
| 78 | 79 | v8::Platform* platform = v8::platform::CreateDefaultPlatform(); | |
| 79 | 80 | v8::V8::InitializePlatform(platform); | |
| 80 | 81 | v8::V8::Initialize(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,6 +49,7 @@ | |||
| 49 | 49 | #include "src/simulator.h" | |
| 50 | 50 | #include "src/snapshot/natives.h" | |
| 51 | 51 | #include "src/snapshot/snapshot.h" | |
| 52 | + #include "src/startup-data-util.h" | ||
| 52 | 53 | #include "src/unicode-inl.h" | |
| 53 | 54 | #include "src/v8threads.h" | |
| 54 | 55 | #include "src/version.h" | |
@@ -5398,11 +5399,23 @@ HeapObjectStatistics::HeapObjectStatistics() | |||
| 5398 | 5399 | object_count_(0), | |
| 5399 | 5400 | object_size_(0) {} | |
| 5400 | 5401 | ||
| 5402 | + | ||
| 5401 | 5403 | bool v8::V8::InitializeICU(const char* icu_data_file) { | |
| 5402 | 5404 | return i::InitializeICU(icu_data_file); | |
| 5403 | 5405 | } | |
| 5404 | 5406 | ||
| 5405 | 5407 | ||
| 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 | + | ||
| 5406 | 5419 | const char* v8::V8::GetVersion() { | |
| 5407 | 5420 | return i::Version::GetVersion(); | |
| 5408 | 5421 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -128,7 +128,8 @@ void CpuFeatures::ProbeImpl(bool cross_compile) { | |||
| 128 | 128 | if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS; | |
| 129 | 129 | ||
| 130 | 130 | 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) { | ||
| 132 | 133 | supported_ |= 1u << COHERENT_CACHE; | |
| 133 | 134 | } | |
| 134 | 135 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,7 +53,8 @@ void CpuFeatures::ProbeImpl(bool cross_compile) { | |||
| 53 | 53 | // Probe for runtime features | |
| 54 | 54 | base::CPU cpu; | |
| 55 | 55 | 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) { | ||
| 57 | 58 | supported_ |= 1u << COHERENT_CACHE; | |
| 58 | 59 | } | |
| 59 | 60 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,6 +59,9 @@ class CPU final { | |||
| 59 | 59 | static const int ARM_CORTEX_A12 = 0xc0c; | |
| 60 | 60 | static const int ARM_CORTEX_A15 = 0xc0f; | |
| 61 | 61 | ||
| 62 | + // Denver-specific part code | ||
| 63 | + static const int NVIDIA_DENVER_V10 = 0x002; | ||
| 64 | + | ||
| 62 | 65 | // PPC-specific part codes | |
| 63 | 66 | enum { | |
| 64 | 67 | PPC_POWER5, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments