deps: bring in V8 5.1 - 5.0 ABI compatibility
Ref: https://github.com/ofrobots/node/pull/23 PR-URL: https://github.com/nodejs/node/pull/7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
d894648450
commit
9beef23b60
6
deps/v8/include/v8-platform.h
vendored
6
deps/v8/include/v8-platform.h
vendored
@ -152,9 +152,9 @@ class Platform {
|
||||
*/
|
||||
virtual uint64_t AddTraceEvent(
|
||||
char phase, const uint8_t* category_enabled_flag, const char* name,
|
||||
const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values, unsigned int flags) {
|
||||
uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names,
|
||||
const uint8_t* arg_types, const uint64_t* arg_values,
|
||||
unsigned int flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
18
deps/v8/include/v8.h
vendored
18
deps/v8/include/v8.h
vendored
@ -5212,8 +5212,8 @@ class V8_EXPORT HeapStatistics {
|
||||
size_t total_available_size_;
|
||||
size_t used_heap_size_;
|
||||
size_t heap_size_limit_;
|
||||
size_t malloced_memory_;
|
||||
bool does_zap_garbage_;
|
||||
size_t malloced_memory_;
|
||||
|
||||
friend class V8;
|
||||
friend class Isolate;
|
||||
@ -7330,7 +7330,7 @@ class Internals {
|
||||
1 * kApiPointerSize + kApiIntSize;
|
||||
static const int kStringResourceOffset = 3 * kApiPointerSize;
|
||||
|
||||
static const int kOddballKindOffset = 5 * kApiPointerSize;
|
||||
static const int kOddballKindOffset = 4 * kApiPointerSize;
|
||||
static const int kForeignAddressOffset = kApiPointerSize;
|
||||
static const int kJSObjectHeaderSize = 3 * kApiPointerSize;
|
||||
static const int kFixedArrayHeaderSize = 2 * kApiPointerSize;
|
||||
@ -7349,12 +7349,12 @@ class Internals {
|
||||
static const int kIsolateRootsOffset =
|
||||
kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size +
|
||||
kApiPointerSize;
|
||||
static const int kUndefinedValueRootIndex = 4;
|
||||
static const int kTheHoleValueRootIndex = 5;
|
||||
static const int kNullValueRootIndex = 6;
|
||||
static const int kTrueValueRootIndex = 7;
|
||||
static const int kFalseValueRootIndex = 8;
|
||||
static const int kEmptyStringRootIndex = 9;
|
||||
static const int kUndefinedValueRootIndex = 5;
|
||||
static const int kNullValueRootIndex = 7;
|
||||
static const int kTrueValueRootIndex = 8;
|
||||
static const int kFalseValueRootIndex = 9;
|
||||
static const int kEmptyStringRootIndex = 10;
|
||||
static const int kTheHoleValueRootIndex = 11;
|
||||
|
||||
// The external allocation limit should be below 256 MB on all architectures
|
||||
// to avoid that resource-constrained embedders run low on memory.
|
||||
@ -7370,7 +7370,7 @@ class Internals {
|
||||
static const int kNodeIsPartiallyDependentShift = 4;
|
||||
static const int kNodeIsActiveShift = 4;
|
||||
|
||||
static const int kJSObjectType = 0xb8;
|
||||
static const int kJSObjectType = 0xb5;
|
||||
static const int kFirstNonstringType = 0x80;
|
||||
static const int kOddballType = 0x83;
|
||||
static const int kForeignType = 0x87;
|
||||
|
4
deps/v8/src/api.cc
vendored
4
deps/v8/src/api.cc
vendored
@ -5526,8 +5526,8 @@ HeapStatistics::HeapStatistics()
|
||||
total_available_size_(0),
|
||||
used_heap_size_(0),
|
||||
heap_size_limit_(0),
|
||||
malloced_memory_(0),
|
||||
does_zap_garbage_(0) {}
|
||||
does_zap_garbage_(0),
|
||||
malloced_memory_(0) {}
|
||||
|
||||
HeapSpaceStatistics::HeapSpaceStatistics(): space_name_(0),
|
||||
space_size_(0),
|
||||
|
22
deps/v8/src/builtins.cc
vendored
22
deps/v8/src/builtins.cc
vendored
@ -223,7 +223,8 @@ inline bool PrototypeHasNoElements(Isolate* isolate, JSObject* object) {
|
||||
HeapObject* empty = isolate->heap()->empty_fixed_array();
|
||||
while (prototype != null) {
|
||||
Map* map = prototype->map();
|
||||
if (map->instance_type() <= LAST_CUSTOM_ELEMENTS_RECEIVER) return false;
|
||||
if (map->instance_type() <= LAST_CUSTOM_ELEMENTS_RECEIVER ||
|
||||
map->instance_type() == JS_GLOBAL_PROXY_TYPE) return false;
|
||||
if (JSObject::cast(prototype)->elements() != empty) return false;
|
||||
prototype = HeapObject::cast(map->prototype());
|
||||
}
|
||||
@ -237,6 +238,7 @@ inline bool IsJSArrayFastElementMovingAllowed(Isolate* isolate,
|
||||
|
||||
inline bool HasSimpleElements(JSObject* current) {
|
||||
return current->map()->instance_type() > LAST_CUSTOM_ELEMENTS_RECEIVER &&
|
||||
current->map()->instance_type() != JS_GLOBAL_PROXY_TYPE &&
|
||||
!current->GetElementsAccessor()->HasAccessors(current);
|
||||
}
|
||||
|
||||
@ -421,9 +423,13 @@ void Builtins::Generate_ObjectHasOwnProperty(
|
||||
|
||||
{
|
||||
Label if_objectissimple(assembler);
|
||||
assembler->Branch(assembler->Int32LessThanOrEqual(
|
||||
instance_type,
|
||||
assembler->Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
|
||||
assembler->Branch(assembler->Word32Or(
|
||||
assembler->Int32LessThanOrEqual(
|
||||
instance_type, assembler->Int32Constant(
|
||||
LAST_SPECIAL_RECEIVER_TYPE)),
|
||||
assembler->Word32Equal(
|
||||
instance_type, assembler->Int32Constant(
|
||||
JS_GLOBAL_PROXY_TYPE))),
|
||||
&call_runtime, &if_objectissimple);
|
||||
assembler->Bind(&if_objectissimple);
|
||||
}
|
||||
@ -481,9 +487,13 @@ void Builtins::Generate_ObjectHasOwnProperty(
|
||||
assembler->Bind(&keyisindex);
|
||||
{
|
||||
Label if_objectissimple(assembler);
|
||||
assembler->Branch(assembler->Int32LessThanOrEqual(
|
||||
instance_type, assembler->Int32Constant(
|
||||
assembler->Branch(assembler->Word32Or(
|
||||
assembler->Int32LessThanOrEqual(
|
||||
instance_type, assembler->Int32Constant(
|
||||
LAST_CUSTOM_ELEMENTS_RECEIVER)),
|
||||
assembler->Word32Equal(
|
||||
instance_type, assembler->Int32Constant(
|
||||
JS_GLOBAL_PROXY_TYPE))),
|
||||
&call_runtime, &if_objectissimple);
|
||||
assembler->Bind(&if_objectissimple);
|
||||
}
|
||||
|
3
deps/v8/src/code-stubs-hydrogen.cc
vendored
3
deps/v8/src/code-stubs-hydrogen.cc
vendored
@ -923,6 +923,9 @@ HValue* CodeStubGraphBuilder<FastArrayPushStub>::BuildCodeStub() {
|
||||
check_instance_type.If<HCompareNumericAndBranch>(
|
||||
instance_type, Add<HConstant>(LAST_CUSTOM_ELEMENTS_RECEIVER),
|
||||
Token::LTE);
|
||||
check_instance_type.Or();
|
||||
check_instance_type.If<HCompareNumericAndBranch>(
|
||||
instance_type, Add<HConstant>(JS_GLOBAL_PROXY_TYPE), Token::EQ);
|
||||
check_instance_type.ThenDeopt(Deoptimizer::kFastArrayPushFailed);
|
||||
check_instance_type.End();
|
||||
|
||||
|
2
deps/v8/src/d8.cc
vendored
2
deps/v8/src/d8.cc
vendored
@ -133,7 +133,7 @@ class PredictablePlatform : public Platform {
|
||||
}
|
||||
|
||||
uint64_t AddTraceEvent(char phase, const uint8_t* categoryEnabledFlag,
|
||||
const char* name, const char* scope, uint64_t id,
|
||||
const char* name, uint64_t id,
|
||||
uint64_t bind_id, int numArgs, const char** argNames,
|
||||
const uint8_t* argTypes, const uint64_t* argValues,
|
||||
unsigned int flags) override {
|
||||
|
6
deps/v8/src/heap/heap.h
vendored
6
deps/v8/src/heap/heap.h
vendored
@ -33,14 +33,14 @@ using v8::MemoryPressureLevel;
|
||||
V(Map, one_pointer_filler_map, OnePointerFillerMap) \
|
||||
V(Map, two_pointer_filler_map, TwoPointerFillerMap) \
|
||||
/* Cluster the most popular ones in a few cache lines here at the top. */ \
|
||||
V(Oddball, uninitialized_value, UninitializedValue) \
|
||||
V(Oddball, undefined_value, UndefinedValue) \
|
||||
V(Oddball, the_hole_value, TheHoleValue) \
|
||||
V(Map, cell_map, CellMap) \
|
||||
V(Oddball, null_value, NullValue) \
|
||||
V(Oddball, true_value, TrueValue) \
|
||||
V(Oddball, false_value, FalseValue) \
|
||||
V(String, empty_string, empty_string) \
|
||||
V(Oddball, uninitialized_value, UninitializedValue) \
|
||||
V(Map, cell_map, CellMap) \
|
||||
V(Oddball, the_hole_value, TheHoleValue) \
|
||||
V(Map, global_property_cell_map, GlobalPropertyCellMap) \
|
||||
V(Map, shared_function_info_map, SharedFunctionInfoMap) \
|
||||
V(Map, meta_map, MetaMap) \
|
||||
|
3
deps/v8/src/keys.cc
vendored
3
deps/v8/src/keys.cc
vendored
@ -406,7 +406,8 @@ MaybeHandle<FixedArray> GetOwnKeysWithUninitializedEnumCache(
|
||||
}
|
||||
|
||||
bool OnlyHasSimpleProperties(Map* map) {
|
||||
return map->instance_type() > LAST_CUSTOM_ELEMENTS_RECEIVER;
|
||||
return map->instance_type() > LAST_CUSTOM_ELEMENTS_RECEIVER &&
|
||||
map->instance_type() != JS_GLOBAL_PROXY_TYPE;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
2
deps/v8/src/libplatform/default-platform.cc
vendored
2
deps/v8/src/libplatform/default-platform.cc
vendored
@ -170,7 +170,7 @@ double DefaultPlatform::MonotonicallyIncreasingTime() {
|
||||
|
||||
uint64_t DefaultPlatform::AddTraceEvent(
|
||||
char phase, const uint8_t* category_enabled_flag, const char* name,
|
||||
const char* scope, uint64_t id, uint64_t bind_id, int num_args,
|
||||
uint64_t id, uint64_t bind_id, int num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values, unsigned int flags) {
|
||||
return 0;
|
||||
|
2
deps/v8/src/libplatform/default-platform.h
vendored
2
deps/v8/src/libplatform/default-platform.h
vendored
@ -47,7 +47,7 @@ class DefaultPlatform : public Platform {
|
||||
const char* GetCategoryGroupName(
|
||||
const uint8_t* category_enabled_flag) override;
|
||||
uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag,
|
||||
const char* name, const char* scope, uint64_t id,
|
||||
const char* name, uint64_t id,
|
||||
uint64_t bind_id, int32_t num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values,
|
||||
|
3
deps/v8/src/lookup.cc
vendored
3
deps/v8/src/lookup.cc
vendored
@ -74,7 +74,8 @@ void LookupIterator::Next() {
|
||||
JSReceiver* holder = *holder_;
|
||||
Map* map = holder->map();
|
||||
|
||||
if (map->instance_type() <= LAST_SPECIAL_RECEIVER_TYPE) {
|
||||
if (map->instance_type() <= LAST_SPECIAL_RECEIVER_TYPE ||
|
||||
map->instance_type() == JS_GLOBAL_PROXY_TYPE) {
|
||||
state_ = IsElement() ? LookupInSpecialHolder<true>(map, holder)
|
||||
: LookupInSpecialHolder<false>(map, holder);
|
||||
if (IsFound()) return;
|
||||
|
3
deps/v8/src/lookup.h
vendored
3
deps/v8/src/lookup.h
vendored
@ -289,7 +289,8 @@ class LookupIterator final BASE_EMBEDDED {
|
||||
void NextInternal(Map* map, JSReceiver* holder);
|
||||
template <bool is_element>
|
||||
inline State LookupInHolder(Map* map, JSReceiver* holder) {
|
||||
return map->instance_type() <= LAST_SPECIAL_RECEIVER_TYPE
|
||||
return (map->instance_type() <= LAST_SPECIAL_RECEIVER_TYPE ||
|
||||
map->instance_type() == JS_GLOBAL_PROXY_TYPE)
|
||||
? LookupInSpecialHolder<is_element>(map, holder)
|
||||
: LookupInRegularHolder<is_element>(map, holder);
|
||||
}
|
||||
|
3
deps/v8/src/objects.cc
vendored
3
deps/v8/src/objects.cc
vendored
@ -8411,7 +8411,8 @@ bool Map::OnlyHasSimpleProperties() {
|
||||
// Wrapped string elements aren't explicitly stored in the elements backing
|
||||
// store, but are loaded indirectly from the underlying string.
|
||||
return !IsStringWrapperElementsKind(elements_kind()) &&
|
||||
instance_type() > LAST_SPECIAL_RECEIVER_TYPE &&
|
||||
(instance_type() > LAST_SPECIAL_RECEIVER_TYPE &&
|
||||
instance_type() != JS_GLOBAL_PROXY_TYPE) &&
|
||||
!has_hidden_prototype() && !is_dictionary_map();
|
||||
}
|
||||
|
||||
|
10
deps/v8/src/objects.h
vendored
10
deps/v8/src/objects.h
vendored
@ -707,13 +707,13 @@ enum InstanceType {
|
||||
// compares for checking the JS_RECEIVER and the NONCALLABLE_JS_OBJECT range.
|
||||
JS_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE
|
||||
JS_GLOBAL_OBJECT_TYPE, // FIRST_JS_OBJECT_TYPE
|
||||
JS_GLOBAL_PROXY_TYPE,
|
||||
// Like JS_OBJECT_TYPE, but requires access checks and/or has interceptors.
|
||||
JS_SPECIAL_API_OBJECT_TYPE, // LAST_SPECIAL_RECEIVER_TYPE
|
||||
JS_VALUE_TYPE, // LAST_CUSTOM_ELEMENTS_RECEIVER
|
||||
JS_OBJECT_TYPE,
|
||||
JS_GLOBAL_PROXY_TYPE,
|
||||
JS_MESSAGE_OBJECT_TYPE,
|
||||
JS_DATE_TYPE,
|
||||
JS_OBJECT_TYPE,
|
||||
JS_CONTEXT_EXTENSION_OBJECT_TYPE,
|
||||
JS_GENERATOR_OBJECT_TYPE,
|
||||
JS_MODULE_TYPE,
|
||||
@ -9638,9 +9638,9 @@ class Oddball: public HeapObject {
|
||||
static const int kToStringOffset = HeapObject::kHeaderSize;
|
||||
static const int kToNumberOffset = kToStringOffset + kPointerSize;
|
||||
static const int kToBooleanOffset = kToNumberOffset + kPointerSize;
|
||||
static const int kTypeOfOffset = kToBooleanOffset + kPointerSize;
|
||||
static const int kKindOffset = kTypeOfOffset + kPointerSize;
|
||||
static const int kSize = kKindOffset + kPointerSize;
|
||||
static const int kKindOffset = kToBooleanOffset + kPointerSize;
|
||||
static const int kTypeOfOffset = kKindOffset + kPointerSize;
|
||||
static const int kSize = kTypeOfOffset + kPointerSize;
|
||||
|
||||
static const byte kFalse = 0;
|
||||
static const byte kTrue = 1;
|
||||
|
6
deps/v8/src/tracing/trace-event.h
vendored
6
deps/v8/src/tracing/trace-event.h
vendored
@ -478,7 +478,7 @@ static V8_INLINE uint64_t AddTraceEvent(char phase,
|
||||
uint64_t id, uint64_t bind_id,
|
||||
unsigned int flags) {
|
||||
return TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_group_enabled, name,
|
||||
scope, id, bind_id, kZeroNumArgs, NULL,
|
||||
id, bind_id, kZeroNumArgs, NULL,
|
||||
NULL, NULL, flags);
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ static V8_INLINE uint64_t AddTraceEvent(
|
||||
uint64_t arg_values[1];
|
||||
SetTraceValue(arg1_val, &arg_types[0], &arg_values[0]);
|
||||
return TRACE_EVENT_API_ADD_TRACE_EVENT(
|
||||
phase, category_group_enabled, name, scope, id, bind_id, num_args,
|
||||
phase, category_group_enabled, name, id, bind_id, num_args,
|
||||
&arg1_name, arg_types, arg_values, flags);
|
||||
}
|
||||
|
||||
@ -509,7 +509,7 @@ static V8_INLINE uint64_t AddTraceEvent(
|
||||
SetTraceValue(arg1_val, &arg_types[0], &arg_values[0]);
|
||||
SetTraceValue(arg2_val, &arg_types[1], &arg_values[1]);
|
||||
return TRACE_EVENT_API_ADD_TRACE_EVENT(
|
||||
phase, category_group_enabled, name, scope, id, bind_id, num_args,
|
||||
phase, category_group_enabled, name, id, bind_id, num_args,
|
||||
arg_names, arg_types, arg_values, flags);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ class MockPlatform : public v8::Platform {
|
||||
}
|
||||
|
||||
uint64_t AddTraceEvent(char phase, const uint8_t* categoryEnabledFlag,
|
||||
const char* name, const char* scope, uint64_t id,
|
||||
const char* name, uint64_t id,
|
||||
uint64_t bind_id, int numArgs, const char** argNames,
|
||||
const uint8_t* argTypes, const uint64_t* argValues,
|
||||
unsigned int flags) override {
|
||||
|
2
deps/v8/test/cctest/test-trace-event.cc
vendored
2
deps/v8/test/cctest/test-trace-event.cc
vendored
@ -72,7 +72,7 @@ class MockTracingPlatform : public v8::Platform {
|
||||
void PerformDelayedTask() {}
|
||||
|
||||
uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag,
|
||||
const char* name, const char* scope, uint64_t id,
|
||||
const char* name, uint64_t id,
|
||||
uint64_t bind_id, int num_args, const char** arg_names,
|
||||
const uint8_t* arg_types, const uint64_t* arg_values,
|
||||
unsigned int flags) override {
|
||||
|
Loading…
x
Reference in New Issue
Block a user