зеркало из https://github.com/microsoft/v8-jsi.git
Update to version 8.6 (#30)
* Fix JSI implementation to pass unit tests. Include windbg extension * Add support for Symbol * Don't try to run ARM unit tests * Don't build debug extension in uwp * pipeline syntax * You can't use parameters in conditions * yaml syntax * timeout * Add a debug line * Try a separate boolean parameter * Update to v8.6 * small build fix * Fix ARM64 build
This commit is contained in:
Родитель
ca521942e8
Коммит
de40eed5ee
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"version": "0.64.3",
|
||||
"v8ref": "refs/branch-heads/8.5"
|
||||
"version": "0.64.4",
|
||||
"v8ref": "refs/branch-heads/8.6"
|
||||
}
|
|
@ -9,6 +9,8 @@ param(
|
|||
|
||||
$workpath = Join-Path $SourcesPath "build"
|
||||
|
||||
$env:GIT_REDIRECT_STDERR = '2>&1'
|
||||
|
||||
Push-Location (Join-Path $workpath "v8build")
|
||||
& fetch v8
|
||||
|
||||
|
@ -24,8 +26,6 @@ target_os= ['android']
|
|||
|
||||
Push-Location (Join-Path $workpath "v8build\v8")
|
||||
|
||||
$env:GIT_REDIRECT_STDERR = '2>&1'
|
||||
|
||||
$config = Get-Content (Join-Path $SourcesPath "config.json") | Out-String | ConvertFrom-Json
|
||||
|
||||
& git fetch origin $config.v8ref
|
||||
|
@ -34,6 +34,7 @@ $CheckOutVersion = (git checkout FETCH_HEAD) | Out-String
|
|||
# Apply patches
|
||||
& git apply --ignore-whitespace (Join-Path $SourcesPath "scripts\patch\src.diff")
|
||||
|
||||
& gclient runhooks
|
||||
& gclient sync
|
||||
|
||||
Push-Location (Join-Path $workpath "v8build\v8\build")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
|
||||
index 01d97a360..6ee2813ef 100644
|
||||
index 06c166f71..e047333af 100644
|
||||
--- a/config/compiler/BUILD.gn
|
||||
+++ b/config/compiler/BUILD.gn
|
||||
@@ -1312,8 +1312,6 @@ config("default_warnings") {
|
||||
@@ -1354,8 +1354,6 @@ config("default_warnings") {
|
||||
"/wd4512", # Assignment operator could not be generated.
|
||||
"/wd4610", # Class can never be instantiated, constructor required.
|
||||
"/wd4838", # Narrowing conversion. Doesn't seem to be very useful.
|
||||
|
@ -11,7 +11,7 @@ index 01d97a360..6ee2813ef 100644
|
|||
|
||||
# These are variable shadowing warnings that are new in VS2015. We
|
||||
# should work through these at some point -- they may be removed from
|
||||
@@ -1612,7 +1610,6 @@ config("no_chromium_code") {
|
||||
@@ -1664,7 +1662,6 @@ config("no_chromium_code") {
|
||||
"/W3", # Warning level 3.
|
||||
"/wd4800", # Disable warning when forcing value to bool.
|
||||
"/wd4267", # TODO(jschuh): size_t to int.
|
||||
|
@ -20,10 +20,10 @@ index 01d97a360..6ee2813ef 100644
|
|||
defines += [
|
||||
"_CRT_NONSTDC_NO_WARNINGS",
|
||||
diff --git a/config/win/BUILD.gn b/config/win/BUILD.gn
|
||||
index 7b44f0e43..3104dbd83 100644
|
||||
index 6cc4b1b9f..befe15776 100644
|
||||
--- a/config/win/BUILD.gn
|
||||
+++ b/config/win/BUILD.gn
|
||||
@@ -455,7 +460,7 @@ config("default_crt") {
|
||||
@@ -458,7 +458,7 @@ config("default_crt") {
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
# Desktop Windows: static CRT.
|
||||
|
@ -32,7 +32,7 @@ index 7b44f0e43..3104dbd83 100644
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -581,3 +586,11 @@ config("cygprofile_instrumentation") {
|
||||
@@ -584,3 +584,11 @@ config("cygprofile_instrumentation") {
|
||||
"-finstrument-functions-after-inlining",
|
||||
]
|
||||
}
|
||||
|
@ -44,3 +44,4 @@ index 7b44f0e43..3104dbd83 100644
|
|||
+ ldflags = [ "/guard:cf" ]
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 65d137cbed..56b1bd6779 100644
|
||||
index bda33c185f..dc2354535d 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -3985,11 +3985,18 @@ v8_component("v8_libbase") {
|
||||
@@ -4077,11 +4077,18 @@ v8_component("v8_libbase") {
|
||||
|
||||
defines += [ "_CRT_RAND_S" ] # for rand_s()
|
||||
|
||||
|
@ -26,7 +26,7 @@ index 65d137cbed..56b1bd6779 100644
|
|||
|
||||
data_deps += [ "//build/win:runtime_libs" ]
|
||||
}
|
||||
@@ -5208,3 +5215,9 @@ if (!build_with_chromium && v8_use_perfetto) {
|
||||
@@ -5323,3 +5330,9 @@ if (!build_with_chromium && v8_use_perfetto) {
|
||||
]
|
||||
}
|
||||
} # if (!build_with_chromium && v8_use_perfetto)
|
||||
|
@ -38,11 +38,20 @@ index 65d137cbed..56b1bd6779 100644
|
|||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/DEPS b/DEPS
|
||||
index 4c02904d70..87ac0c20e0 100644
|
||||
index 7726a6973e..9516602b5b 100644
|
||||
--- a/DEPS
|
||||
+++ b/DEPS
|
||||
@@ -549,4 +549,15 @@ hooks = [
|
||||
'v8/tools/generate-header-include-checks.py',
|
||||
@@ -206,7 +206,7 @@ deps = {
|
||||
'test/mozilla/data':
|
||||
Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be',
|
||||
'test/test262/data':
|
||||
- Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'e73054f75e08e329e73e0f77bf92503ad5b83d0f',
|
||||
+ Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '323905b70e644d90faa957235f8ac59eac4ba8ba',
|
||||
'test/test262/harness':
|
||||
Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '4555345a943d0c99a9461182705543fb171dda4b',
|
||||
'third_party/qemu-linux-x64': {
|
||||
@@ -562,4 +562,15 @@ hooks = [
|
||||
'tools/generate-header-include-checks.py',
|
||||
],
|
||||
},
|
||||
+ {
|
||||
|
@ -53,7 +62,7 @@ index 4c02904d70..87ac0c20e0 100644
|
|||
+ '--no_resume',
|
||||
+ '--no_auth',
|
||||
+ '--bucket', 'chromium-browser-clang/rc',
|
||||
+ '-s', 'v8/build/toolchain/win/rc/win/rc.exe.sha1',
|
||||
+ '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
|
||||
+ ],
|
||||
+ }
|
||||
]
|
||||
|
@ -72,10 +81,10 @@ index b5fb1823b3..b5ddc1aba2 100644
|
|||
# This is a cross-compile from an x64 host to either a non-Intel target
|
||||
# cpu or a different target OS. Clang will always be used by default on the
|
||||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 13b40db28e..65335f4047 100644
|
||||
index a839165324..75b5f4b664 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -9089,6 +9089,11 @@ class V8_EXPORT Isolate {
|
||||
@@ -9124,6 +9124,11 @@ class V8_EXPORT Isolate {
|
||||
*/
|
||||
MicrotasksPolicy GetMicrotasksPolicy() const;
|
||||
|
||||
|
@ -87,7 +96,7 @@ index 13b40db28e..65335f4047 100644
|
|||
/**
|
||||
* Adds a callback to notify the host application after
|
||||
* microtasks were run on the default MicrotaskQueue. The callback is
|
||||
@@ -9115,6 +9120,10 @@ class V8_EXPORT Isolate {
|
||||
@@ -9150,6 +9155,10 @@ class V8_EXPORT Isolate {
|
||||
void RemoveMicrotasksCompletedCallback(
|
||||
MicrotasksCompletedCallbackWithData callback, void* data = nullptr);
|
||||
|
||||
|
@ -160,6 +169,20 @@ index 5db3e34310..bc3522a1de 100644
|
|||
// DbgHelp.h functions.
|
||||
using DLL_FUNC_TYPE(SymInitialize) = BOOL(__stdcall*)(IN HANDLE hProcess,
|
||||
IN PSTR UserSearchPath,
|
||||
diff --git a/src/compiler/machine-operator.h b/src/compiler/machine-operator.h
|
||||
index d5c03e63ca..d90c2bfe0d 100644
|
||||
--- a/src/compiler/machine-operator.h
|
||||
+++ b/src/compiler/machine-operator.h
|
||||
@@ -198,6 +198,9 @@ ShiftKind ShiftKindOf(Operator const*) V8_WARN_UNUSED_RESULT;
|
||||
// like x64 and ia32 where a range overflow does not result in INT_MAX.
|
||||
enum class TruncateKind { kArchitectureDefault, kSetOverflowToMin };
|
||||
|
||||
+size_t hash_value(TruncateKind);
|
||||
+V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, TruncateKind);
|
||||
+
|
||||
// Interface for building machine-level operators. These operators are
|
||||
// machine-level but machine-independent and thus define a language suitable
|
||||
// for generating code to run on architectures such as ia32, x64, arm, etc.
|
||||
diff --git a/src/diagnostics/unwinding-info-win64.cc b/src/diagnostics/unwinding-info-win64.cc
|
||||
index f3b9a753af..ed9c79a5b3 100644
|
||||
--- a/src/diagnostics/unwinding-info-win64.cc
|
||||
|
@ -195,23 +218,21 @@ index 1cd402d8ba..c3c9df8fa1 100644
|
|||
return EmbeddedTargetOs::kWin;
|
||||
} else {
|
||||
return EmbeddedTargetOs::kGeneric;
|
||||
diff --git a/src/torque/declaration-visitor.cc b/src/torque/declaration-visitor.cc
|
||||
index 99b7bdddcd..8a227a614a 100644
|
||||
--- a/src/torque/declaration-visitor.cc
|
||||
+++ b/src/torque/declaration-visitor.cc
|
||||
@@ -372,7 +372,9 @@ Callable* DeclarationVisitor::Specialize(
|
||||
}
|
||||
diff --git a/src/snapshot/embedded/platform-embedded-file-writer-win.cc b/src/snapshot/embedded/platform-embedded-file-writer-win.cc
|
||||
index 1aed75eccc..3811ced3df 100644
|
||||
--- a/src/snapshot/embedded/platform-embedded-file-writer-win.cc
|
||||
+++ b/src/snapshot/embedded/platform-embedded-file-writer-win.cc
|
||||
@@ -503,7 +503,7 @@ void PlatformEmbeddedFileWriterWin::SourceInfo(int fileid, const char* filename,
|
||||
void PlatformEmbeddedFileWriterWin::DeclareFunctionBegin(const char* name,
|
||||
uint32_t size) {
|
||||
if (target_arch_ == EmbeddedTargetArch::kArm64) {
|
||||
- fprintf(fp_, "%s%s FUNCTION\n", SYMBOL_PREFIX, name);
|
||||
+ fprintf(fp_, "\n%s%s FUNCTION\n", SYMBOL_PREFIX, name);
|
||||
|
||||
void PredeclarationVisitor::ResolvePredeclarations() {
|
||||
- for (auto& p : GlobalContext::AllDeclarables()) {
|
||||
+ const std::vector<std::unique_ptr<Declarable>>& all_declarables = GlobalContext::AllDeclarables();
|
||||
+ for (size_t i = 0; i < all_declarables.size(); ++i) {
|
||||
+ auto& p = all_declarables[i];
|
||||
if (const TypeAlias* alias = TypeAlias::DynamicCast(p.get())) {
|
||||
CurrentScope::Scope scope_activator(alias->ParentScope());
|
||||
CurrentSourcePosition::Scope position_activator(alias->Position());
|
||||
} else {
|
||||
fprintf(fp_, "%s%s PROC\n", SYMBOL_PREFIX, name);
|
||||
diff --git a/src/utils/allocation.cc b/src/utils/allocation.cc
|
||||
index 12dfaf9572..b16b0b0020 100644
|
||||
index 6169acbfd6..3f390778e7 100644
|
||||
--- a/src/utils/allocation.cc
|
||||
+++ b/src/utils/allocation.cc
|
||||
@@ -74,8 +74,10 @@ const int kAllocationTries = 2;
|
||||
|
|
|
@ -162,6 +162,11 @@ class V8Platform : public v8::Platform {
|
|||
double CurrentClockTimeMillis() override;
|
||||
v8::TracingController *GetTracingController() override;
|
||||
|
||||
// TODO: validate this implementation
|
||||
std::unique_ptr<v8::JobHandle> PostJob(v8::TaskPriority priority, std::unique_ptr<v8::JobTask> job_task) override {
|
||||
return v8::platform::NewDefaultJobHandle(this, priority, std::move(job_task), NumberOfWorkerThreads());
|
||||
}
|
||||
|
||||
private:
|
||||
V8Platform(const V8Platform &) = delete;
|
||||
void operator=(const V8Platform &) = delete;
|
||||
|
|
Загрузка…
Ссылка в новой задаче