rebase patches

This commit is contained in:
Jeremy Apthorp 2019-05-21 10:05:21 -07:00
parent c832533f5f
commit 446944c677
35 changed files with 180 additions and 180 deletions

View file

@ -29,11 +29,11 @@ index 8b23e02bf42ffdab5d8c6f36a4663ed0668531f7..742aaa1df005f28ba55b0c42a18d41e9
/**
* Free the memory block of size |length|, pointed to by |data|.
* That memory is guaranteed to be previously allocated by |Allocate|.
diff --git a/src/api.cc b/src/api.cc
index fac25e9713dcf27ce9aff545ba98468fa0545540..e1f16d9594458b5e3aec3b6929634abcce5ee59a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -520,6 +520,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
diff --git a/src/api/api.cc b/src/api/api.cc
index 62946e00db8cd844a1de7aa16ea8addaa42f6bc6..4a421e73cb45bf3eb3d6643011151743cf989fee 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -514,6 +514,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
i::V8::SetSnapshotBlob(snapshot_blob);
}

View file

@ -5,10 +5,10 @@ Subject: build_gn.patch
diff --git a/BUILD.gn b/BUILD.gn
index 384a94766b4ca7707c991d45a3b7152910c98feb..1f16b3f1ce7a476d4a1e20b6437a305bb867b01b 100644
index c1bbdbdf0d1b9968632e0158b02e80f3ddfe06ed..e25b4a427c96a6f66ea693f162a4806723026a91 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -266,7 +266,7 @@ config("internal_config") {
@@ -278,7 +278,7 @@ config("internal_config") {
":v8_header_features",
]
@ -17,7 +17,7 @@ index 384a94766b4ca7707c991d45a3b7152910c98feb..1f16b3f1ce7a476d4a1e20b6437a305b
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -3756,7 +3756,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -3780,7 +3780,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -26,7 +26,7 @@ index 384a94766b4ca7707c991d45a3b7152910c98feb..1f16b3f1ce7a476d4a1e20b6437a305b
deps = [
":v8_libbase",
@@ -3777,6 +3777,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
@@ -3801,6 +3801,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View file

@ -4,12 +4,12 @@ Date: Mon, 22 Oct 2018 10:47:12 -0700
Subject: dcheck.patch
diff --git a/src/api.cc b/src/api.cc
index c926d049ec4d04c40573b2e4d3608b59753a6050..1892ff80e75ca08f83ca26fd21126d8f6dbcc45b 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8572,7 +8572,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
diff --git a/src/api/api.cc b/src/api/api.cc
index 675d3df256143380594577b458d12c9705e7ecf1..fe4a82836995053d8c43a2ace2457eaa95aa8d38 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8248,7 +8248,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::RunMicrotasks() {
- DCHECK_NE(MicrotasksPolicy::kScoped, GetMicrotasksPolicy());
@ -18,10 +18,10 @@ index c926d049ec4d04c40573b2e4d3608b59753a6050..1892ff80e75ca08f83ca26fd21126d8f
isolate->default_microtask_queue()->RunMicrotasks(isolate);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 87ff3b12afec44cb9a7116892581edf8d1f633f9..e255691f013f80d5c2e84f43f48713353936683c 100644
index ee2a4ceed24d92fff94affad47b194576841dff0..3c220a31cf3f913d4161105cbff7347fa1e0df23 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4954,9 +4954,9 @@ void Heap::TearDown() {
@@ -4999,9 +4999,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);

View file

@ -173,11 +173,11 @@ index 742aaa1df005f28ba55b0c42a18d41e9a74a9b6a..382a9eae997fbc399ee196d2fc58951a
Boolean* Boolean::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
diff --git a/src/api.cc b/src/api.cc
index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59753a6050 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2230,6 +2230,10 @@ int PrimitiveArray::Length() const {
diff --git a/src/api/api.cc b/src/api/api.cc
index 4a421e73cb45bf3eb3d6643011151743cf989fee..675d3df256143380594577b458d12c9705e7ecf1 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -2179,6 +2179,10 @@ int PrimitiveArray::Length() const {
return array->length();
}
@ -188,7 +188,7 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
void PrimitiveArray::Set(Isolate* v8_isolate, int index,
Local<Primitive> item) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -2243,6 +2247,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
@@ -2192,6 +2196,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
array->set(index, *i_item);
}
@ -199,7 +199,7 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
@@ -2956,6 +2964,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
@@ -2875,6 +2883,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
// --- S t a c k T r a c e ---
@ -210,7 +210,7 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
uint32_t index) const {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -3585,6 +3597,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
@@ -3461,6 +3473,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
RETURN_ESCAPED(result);
}
@ -245,20 +245,19 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
bool Value::BooleanValue(Isolate* v8_isolate) const {
return Utils::OpenHandle(this)->BooleanValue(
reinterpret_cast<i::Isolate*>(v8_isolate));
@@ -3971,6 +4011,12 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
@@ -3809,6 +3849,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
return Local<Uint32>();
}
+bool Value::Equals(Local<Value> that) const {
+ return Equals(Isolate::GetCurrent()->GetCurrentContext(), that)
+ .FromMaybe(false);
+}
+
+
Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
auto self = Utils::OpenHandle(this);
@@ -5249,6 +5295,10 @@ bool String::ContainsOnlyOneByte() const {
@@ -5041,6 +5086,10 @@ bool String::ContainsOnlyOneByte() const {
return helper.Check(*str);
}
@ -269,7 +268,7 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
int String::Utf8Length(Isolate* isolate) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
@@ -5401,6 +5451,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
@@ -5193,6 +5242,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
}
} // anonymous namespace
@ -284,10 +283,10 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
int* nchars_ref, int options) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
@@ -5441,6 +5499,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
@@ -5231,6 +5288,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
return end - start;
}
+int String::WriteOneByte(uint8_t* buffer, int start,
+ int length, int options) const {
+ return WriteOneByte(Isolate::GetCurrent(), buffer, start, length, options);
@ -298,12 +297,11 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
+ int options) const {
+ return Write(Isolate::GetCurrent(), buffer, start, length, options);
+}
+
+
int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
int length, int options) const {
return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
@@ -6385,6 +6455,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
@@ -6142,6 +6210,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
return result;
}
@ -315,19 +313,18 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
Local<String> right) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -6660,6 +6735,11 @@ bool v8::BooleanObject::ValueOf() const {
@@ -6411,6 +6484,10 @@ bool v8::BooleanObject::ValueOf() const {
return jsvalue->value()->IsTrue(isolate);
}
+Local<v8::Value> v8::StringObject::New(Local<String> value) {
+ return New(Isolate::GetCurrent(), value);
+}
+
+
Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
Local<String> value) {
i::Handle<i::String> string = Utils::OpenHandle(*value);
@@ -8937,6 +9017,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
@@ -8600,6 +8677,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
return microtask_queue->IsRunningMicrotasks();
}
@ -337,9 +334,9 @@ index e1f16d9594458b5e3aec3b6929634abcce5ee59a..c926d049ec4d04c40573b2e4d3608b59
String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
: str_(nullptr), length_(0) {
if (obj.IsEmpty()) return;
@@ -8956,6 +9039,9 @@ String::Utf8Value::~Utf8Value() {
i::DeleteArray(str_);
}
@@ -8617,6 +8697,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); }
+String::Value::Value(v8::Local<v8::Value> obj)
+ : Value(Isolate::GetCurrent(), obj) {}

View file

@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
diff --git a/src/objects.h b/src/objects.h
index af6f5639604cdef8ad82289d1669635143091d38..169b38745e62a652531f70d8054e26eb1a7b9d18 100644
index c1ae835e89bc7ccd6da36e9c03ca56ee4e07d31e..dc7e78db9ff76917c57f80926e23c7920c7a0c16 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -769,7 +769,7 @@ enum class KeyCollectionMode {
@@ -772,7 +772,7 @@ enum class KeyCollectionMode {
// Utility superclass for stack-allocated objects that must be updated
// on gc. It provides two ways for the gc to update instances, either
// iterating or updating after gc.

View file

@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index 1f16b3f1ce7a476d4a1e20b6437a305bb867b01b..121170ee0eaa1482497595337481589e06e0f9a2 100644
index e25b4a427c96a6f66ea693f162a4806723026a91..fff650f31e33cabdddf2c6f6127678379f99bad7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3767,8 +3767,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -3791,8 +3791,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View file

@ -6,7 +6,7 @@ Subject: Revert "[cctest] Add V8_EXPORT_PRIVATE to arm/arm64 ports"
This reverts commit 1a7d847cfac9a7363c59c980e47a7b7ff416e6da.
diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h
index 07a882a2becd759fd82adc6fb452c60621b51153..7e4a61fb46ee9002d04fe9af2019d3b14c10738f 100644
index 8157d3cb053fcad45357b3570792e19276670a80..3617d4b71aef412f603470350cb388e7c7515391 100644
--- a/src/arm/assembler-arm.h
+++ b/src/arm/assembler-arm.h
@@ -79,7 +79,7 @@ enum Coprocessor {
@ -236,7 +236,7 @@ index 8514469227042b5740da73d42fc210a2282414e4..6f46e4b88c2e7c77f6fd58567e9aa2ae
static bool IsValidImmPCOffset(ImmBranchType branch_type, ptrdiff_t offset);
bool IsTargetInImmPCOffsetRange(Instruction* target);
diff --git a/src/arm64/macro-assembler-arm64.h b/src/arm64/macro-assembler-arm64.h
index 114e19fba9bbafac974205d99c425ea98ed5bc0f..64f332af84843a3091b8b04aebd606dac200b56e 100644
index 62261c9c734de9fe230c52af6fe807a8d444009b..617d709ee5756ede6cb69632520b7d2410562c16 100644
--- a/src/arm64/macro-assembler-arm64.h
+++ b/src/arm64/macro-assembler-arm64.h
@@ -2082,7 +2082,7 @@ class InstructionAccurateScope {
@ -367,10 +367,10 @@ index 0c247fd247151a0bdfbf3a9f420c2eb2fa47b5cd..21543e7f498c0becfcc1121f2f17ebd9
void Emit(Assembler* assm);
size_t entry_count() const;
uint32_t section_size() const;
diff --git a/src/disasm.h b/src/disasm.h
index f543af2609fa1e5b8fa8c7fcc74a073c52a3912e..d752b1a44b928dddd722a9cc68bf5b22629e60c7 100644
--- a/src/disasm.h
+++ b/src/disasm.h
diff --git a/src/diagnostics/disasm.h b/src/diagnostics/disasm.h
index 2fe14f19321c67aaf1dd388472b14c8b5fbfe400..fcc38eb3b2242ce65f872636b9121c66f94b987a 100644
--- a/src/diagnostics/disasm.h
+++ b/src/diagnostics/disasm.h
@@ -14,7 +14,7 @@ typedef unsigned char byte;
// Interface and default implementation for converting addresses and
// register-numbers to text. The default implementation is machine
@ -398,10 +398,10 @@ index f543af2609fa1e5b8fa8c7fcc74a073c52a3912e..d752b1a44b928dddd722a9cc68bf5b22
// Returns -1 if instruction does not mark the beginning of a constant pool,
// or the number of entries in the constant pool beginning here.
diff --git a/src/disassembler.h b/src/disassembler.h
index d6bb84cd274575c78291eafdb6794d7ff690915c..5315d5598f3064cbf5563246bd5bd17fbb916900 100644
--- a/src/disassembler.h
+++ b/src/disassembler.h
diff --git a/src/diagnostics/disassembler.h b/src/diagnostics/disassembler.h
index 1bb326655abb828e42d370e28b5c12908320f47c..8ac5ced6b370fe15f546c0053afb0c404c8fc8dd 100644
--- a/src/diagnostics/disassembler.h
+++ b/src/diagnostics/disassembler.h
@@ -20,10 +20,8 @@ class Disassembler : public AllStatic {
// Instruction'.
// the code object is used for name resolution and may be null.
@ -416,10 +416,10 @@ index d6bb84cd274575c78291eafdb6794d7ff690915c..5315d5598f3064cbf5563246bd5bd17f
} // namespace internal
diff --git a/src/objects.cc b/src/objects.cc
index 70b6966ec0aacfc8df3caa5b73147bbe2691c929..8d6d09eca5ba9ff62744d5d774d7072ad363cf22 100644
index c254eaf4d6a80cafaf4b17ebef91d794e2034790..9641318f878049c96be8b992e20f459a84635fad 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1238,7 +1238,7 @@ bool Object::ToInt32(int32_t* value) {
@@ -1239,7 +1239,7 @@ bool Object::ToInt32(int32_t* value) {
// static constexpr object declarations need a definition to make the
// compiler happy.
constexpr Object Smi::kZero;
@ -462,7 +462,7 @@ index 31309dc5a89b6433479d95dc9de77401690b004a..ef205cdf90e4426d91c7b6551fd17c9e
// [name]: Returns shared name if it exists or an empty string otherwise.
inline String Name() const;
diff --git a/src/objects/string.cc b/src/objects/string.cc
index f1fafa0c8e5e52d59ad717280a7ad4af978d88c2..d68a78939146085ee8cb381b856e1796bd47f07c 100644
index 1f044e3299d6a54caa5a81417213970f24fd1954..625ca289807f0300585811eddb95bc9bc8ac6266 100644
--- a/src/objects/string.cc
+++ b/src/objects/string.cc
@@ -1626,8 +1626,5 @@ String ConsStringIterator::NextLeaf(bool* blew_stack) {
@ -537,7 +537,7 @@ index d31f5ff067c9b096a94705769c64586ffd546341..cce60d015af915e0984060dd2e84d6f7
uint32_t table_index;
WasmInitExpr offset;
diff --git a/test/cctest/parsing/test-parse-decision.cc b/test/cctest/parsing/test-parse-decision.cc
index e3b046baef67369153bafc4605ea0e636a88cd36..c0c4b2cd7e847c217fb8c868263fd74b9c8d9499 100644
index 14b772cd4b72fb7fda13c1633b3c2371aa23485d..2146ca767a53efd3d9ae2f689918de16fd4cbea2 100644
--- a/test/cctest/parsing/test-parse-decision.cc
+++ b/test/cctest/parsing/test-parse-decision.cc
@@ -14,7 +14,6 @@