chore: bump chromium to 133.0.6878.0 (main) (#44831)

* chore: bump chromium in DEPS to 133.0.6858.0

* chore: bump chromium in DEPS to 133.0.6860.0

* chore: update patches

v8/revert_fastapi_remove_dynamic_overload_resolution.patch had some additions due to 6023139

* 6044060: Reland "Moves shared GN templates into //build/config/apple."
6044060

* Revert "6023139: [fastapi] Add support for attribute setters"
6023139

* Update printing.patch

The removed include is present in the original source file now, just slightly before where it was being added.

6015430: Reduce platform-like buildflags in sandbox code
Refs: 6015430

* 6039836: Migrate Command::IsMediaKey to be a member of ui::Accelerator
6039836

* 6038659: [CodeHealth] Clean up the feature ZstdContentEncoding
6038659

* chore: bump chromium in DEPS to 133.0.6862.0

* chore: update patches

* 72747: crypto: switch to C++
https://boringssl-review.googlesource.com/c/boringssl/+/72747

* fixup! 72747: crypto: switch to C++ https://boringssl-review.googlesource.com/c/boringssl/+/72747

* chore: gen libc++ filenames

* 6042601: [shared storage] Implement with_lock option for methods from response headers
6042601

* chore: bump chromium in DEPS to 133.0.6864.0

* chore: bump chromium in DEPS to 133.0.6866.0

* chore: bump chromium in DEPS to 133.0.6868.0

* chore: bump chromium in DEPS to 133.0.6870.0

* chore: bump chromium in DEPS to 133.0.6872.0

* chore: bump chromium in DEPS to 133.0.6874.0

* chore: bump chromium in DEPS to 133.0.6876.0

* 6039992: Fix false activation logic for context menu. | 6039992

* chore: update patches

* chore: update patches

* chore: bump chromium in DEPS to 133.0.6878.0

* chore: update patches

* [Build] Organize //components/dbus into a single component

Xref: 6055280

* Merge //components/dbus/* into a single //components/dbus, which
  matches how most components are organized. This avoids having
  many small shared libraries which incurs unnecessary overhead.
* Limit visibility of //components/dbus/* to //components/dbus

* fixup! Update _LIBCPP_ABI_VERSION to always have a default value while keeping unstable false due to changes in llvm https://github.com/llvm/llvm-project/pull/112094

* 6040416: Let s know which widget the input came on. | 6040416

* 6056267: [MPArch guest view] Fix authentication for MPArch guests | 6056267

* make_span() is deprecated: https://issues.chromium.org/issues/341907909

* fixup: https://issues.chromium.org/issues/341907909

* chore: delete extra bracket from removing make_span commit

* fixup: 6059305: Make WTF::UTF8ConversionMode a scoped enum | 6059305

* 6051058: CookieInclusionStatus: Remove ctors which bypass invariants | 6051058

* 6038981: Remove most remaining CHECK(false)s | 6038981

* build: use third_party/simdutf in Node.js

* chore: node ./script/gen-libc++-filenames.js

* chore: fix strict-cast conversion error in subspan()

Xref: 6044946

* chore: fix strict-cast conversion error in base::as_bytes()

Xref: 6044946

* chore: fix strict-cast conversion error in span.split_at()

Xref: 6044946

* chore: use shorthand target name

* chore: better docs in build_add_public_config_simdutf_config.patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
electron-roller[bot] 2024-12-10 13:16:07 -06:00 committed by GitHub
parent 3bd5f14cee
commit cf5a4640f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 983 additions and 656 deletions

View file

@ -1,4 +1,5 @@
chore_allow_customizing_microtask_policy_per_context.patch
deps_add_v8_object_setinternalfieldfornodecore.patch
revert_fastapi_add_support_for_attribute_setters.patch
revert_fastapi_remove_dynamic_overload_resolution.patch
revert_api_delete_deprecated_struct_fastapitypedarray.patch

View file

@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc
index a08ce424cd1f84ce5f1d781f98a242b70f23b168..86f2d298e4ba37a46a74f4f6eba5adc2106889bb 100644
index 676c43e300648a24542bd49df118325227d507d9..d76e52da63748acfb37b31179b3428de77362413 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -6482,14 +6482,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
@@ -6465,14 +6465,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate));
}

View file

@ -250,10 +250,10 @@ index dc27e91ad0da93a5b68053f132f219f95f641ca1..38ba1110da3f77df4681ccb0ebcee78d
switch (c_signature->ReturnInfo().GetType()) {
case CTypeInfo::Type::kVoid:
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932dce4202bb 100644
index 2b8639616427b557b9c00f328b069eb1dc6909c1..07661d03e99bb26dcd0be793932ba15319b7bec0 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -29761,6 +29761,16 @@ static Trivial* UnwrapTrivialObject(Local<Object> object) {
@@ -29773,6 +29773,16 @@ static Trivial* UnwrapTrivialObject(Local<Object> object) {
return wrapped;
}
@ -270,7 +270,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
void FastCallback2JSArray(v8::Local<v8::Object> receiver, int arg0,
v8::Local<v8::Array> arg1) {
Trivial* self = UnwrapTrivialObject(receiver);
@@ -29778,10 +29788,103 @@ void FastCallback4Scalar(v8::Local<v8::Object> receiver, int arg0, float arg1) {
@@ -29790,10 +29800,103 @@ void FastCallback4Scalar(v8::Local<v8::Object> receiver, int arg0, float arg1) {
void FastCallback5DifferentArity(v8::Local<v8::Object> receiver, int arg0,
v8::Local<v8::Array> arg1, float arg2) {}
@ -374,7 +374,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
TEST(FastApiOverloadResolution) {
#if !defined(V8_LITE_MODE) && defined(V8_ENABLE_TURBOFAN)
if (i::v8_flags.jitless) return;
@@ -29795,15 +29898,22 @@ TEST(FastApiOverloadResolution) {
@@ -29807,15 +29910,22 @@ TEST(FastApiOverloadResolution) {
i::v8_flags.always_turbofan = false;
i::FlagList::EnforceFlagImplications();
@ -399,7 +399,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
v8::CFunction scalar_callback =
v8::CFunctionBuilder().Fn(FastCallback4Scalar).Build();
@@ -29811,7 +29921,7 @@ TEST(FastApiOverloadResolution) {
@@ -29823,7 +29933,7 @@ TEST(FastApiOverloadResolution) {
// Check that resolving when there is a scalar at the difference position
// is not possible.
CHECK_EQ(v8::CFunction::OverloadResolution::kImpossible,
@ -408,7 +408,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
v8::CFunction diff_arity_callback =
v8::CFunctionBuilder().Fn(FastCallback5DifferentArity).Build();
@@ -29819,7 +29929,7 @@ TEST(FastApiOverloadResolution) {
@@ -29831,7 +29941,7 @@ TEST(FastApiOverloadResolution) {
// Check that overload resolution between different number of arguments
// is possible.
CHECK_EQ(v8::CFunction::OverloadResolution::kAtCompileTime,

View file

@ -0,0 +1,525 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Calvin Watford <cwatford@slack-corp.com>
Date: Tue, 26 Nov 2024 16:06:53 -0700
Subject: Revert "[fastapi] Add support for attribute setters"
Revert this until Node.js decides how to proceed and then pick up their fix.
Refs: https://github.com/nodejs/node/issues/55452
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5956408
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5982984
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5979766
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/6023139
This reverts commit 6520094871895fbafe91403ceb700ff97fdfd413.
diff --git a/src/compiler/fast-api-calls.cc b/src/compiler/fast-api-calls.cc
index 5da23c3d55bc105ed380762dd515f8856cbe5933..2dc99dc83e0f78d2bbb0875cc04064b565deaf06 100644
--- a/src/compiler/fast-api-calls.cc
+++ b/src/compiler/fast-api-calls.cc
@@ -379,46 +379,6 @@ Node* BuildFastApiCall(Isolate* isolate, Graph* graph,
return builder.Build(c_function, data_argument);
}
-FastApiCallFunction GetFastApiCallTarget(
- JSHeapBroker* broker, FunctionTemplateInfoRef function_template_info,
- size_t arg_count) {
- if (!v8_flags.turbo_fast_api_calls) return {0, nullptr};
-
- static constexpr int kReceiver = 1;
-
- const ZoneVector<const CFunctionInfo*>& signatures =
- function_template_info.c_signatures(broker);
- const size_t overloads_count = signatures.size();
-
- // Only considers entries whose type list length matches arg_count.
- for (size_t i = 0; i < overloads_count; i++) {
- const CFunctionInfo* c_signature = signatures[i];
- const size_t len = c_signature->ArgumentCount() - kReceiver;
- bool optimize_to_fast_call =
- (len == arg_count) &&
- fast_api_call::CanOptimizeFastSignature(c_signature);
-
- if (optimize_to_fast_call) {
- // TODO(nicohartmann@): {Flags::kEnforceRangeBit} is currently only
- // supported on 64 bit architectures. We should support this on 32 bit
- // architectures.
-#if defined(V8_TARGET_ARCH_32_BIT)
- for (unsigned int i = 0; i < c_signature->ArgumentCount(); ++i) {
- const uint8_t flags =
- static_cast<uint8_t>(c_signature->ArgumentInfo(i).GetFlags());
- if (flags & static_cast<uint8_t>(CTypeInfo::Flags::kEnforceRangeBit)) {
- // Bailout
- return {0, nullptr};
- }
- }
-#endif
- return {function_template_info.c_functions(broker)[i], c_signature};
- }
- }
-
- return {0, nullptr};
-}
-
} // namespace fast_api_call
} // namespace compiler
} // namespace internal
diff --git a/src/compiler/fast-api-calls.h b/src/compiler/fast-api-calls.h
index b49322d91d06b7fed34fe41b6ac7d31dcc7783c4..171e66c427991bfe7db5c2875d12559767a24b55 100644
--- a/src/compiler/fast-api-calls.h
+++ b/src/compiler/fast-api-calls.h
@@ -55,10 +55,6 @@ Node* BuildFastApiCall(Isolate* isolate, Graph* graph,
const InitializeOptions& initialize_options,
const GenerateSlowApiCall& generate_slow_api_call);
-FastApiCallFunction GetFastApiCallTarget(
- JSHeapBroker* broker, FunctionTemplateInfoRef function_template_info,
- size_t arg_count);
-
} // namespace fast_api_call
} // namespace compiler
} // namespace internal
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc
index 48663a4fcc284b7d832849e0c467019b384a31ff..d75a38769d582cd6e5a807f9670732dc92d77b7e 100644
--- a/src/compiler/js-call-reducer.cc
+++ b/src/compiler/js-call-reducer.cc
@@ -3877,6 +3877,58 @@ Reduction JSCallReducer::ReduceCallWasmFunction(Node* node,
}
#endif // V8_ENABLE_WEBASSEMBLY
+// Given a FunctionTemplateInfo, checks whether the fast API call can be
+// optimized, applying the initial step of the overload resolution algorithm:
+// Given an overload set function_template_info.c_signatures, and a list of
+// arguments of size arg_count:
+// 1. Remove from the set all entries whose type list is not of length
+// arg_count.
+// Returns an array with the indexes of the remaining entries in S, which
+// represents the set of "optimizable" function overloads.
+
+FastApiCallFunction GetFastApiCallTarget(
+ JSHeapBroker* broker, FunctionTemplateInfoRef function_template_info,
+ size_t arg_count) {
+ if (!v8_flags.turbo_fast_api_calls) return {0, nullptr};
+
+ static constexpr int kReceiver = 1;
+
+ ZoneVector<Address> functions = function_template_info.c_functions(broker);
+ ZoneVector<const CFunctionInfo*> signatures =
+ function_template_info.c_signatures(broker);
+ const size_t overloads_count = signatures.size();
+
+ // Only considers entries whose type list length matches arg_count.
+ for (size_t i = 0; i < overloads_count; i++) {
+ const CFunctionInfo* c_signature = signatures[i];
+ const size_t len = c_signature->ArgumentCount() - kReceiver;
+ bool optimize_to_fast_call = (len == arg_count);
+
+ optimize_to_fast_call =
+ optimize_to_fast_call &&
+ fast_api_call::CanOptimizeFastSignature(c_signature);
+
+ if (optimize_to_fast_call) {
+ // TODO(nicohartmann@): {Flags::kEnforceRangeBit} is currently only
+ // supported on 64 bit architectures. We should support this on 32 bit
+ // architectures.
+#if defined(V8_TARGET_ARCH_32_BIT)
+ for (unsigned int i = 0; i < c_signature->ArgumentCount(); ++i) {
+ const uint8_t flags =
+ static_cast<uint8_t>(c_signature->ArgumentInfo(i).GetFlags());
+ if (flags & static_cast<uint8_t>(CTypeInfo::Flags::kEnforceRangeBit)) {
+ // Bailout
+ return {0, nullptr};
+ }
+ }
+#endif
+ return {functions[i], c_signature};
+ }
+ }
+
+ return {0, nullptr};
+}
+
Reduction JSCallReducer::ReduceCallApiFunction(Node* node,
SharedFunctionInfoRef shared) {
JSCallNode n(node);
@@ -4057,8 +4109,8 @@ Reduction JSCallReducer::ReduceCallApiFunction(Node* node,
}
// Handles overloaded functions.
- FastApiCallFunction c_function = fast_api_call::GetFastApiCallTarget(
- broker(), function_template_info, argc);
+ FastApiCallFunction c_function =
+ GetFastApiCallTarget(broker(), function_template_info, argc);
if (c_function.address) {
FastApiCallReducerAssembler a(this, node, function_template_info,
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index 5b9a78e7a9a728842148eebe733501174c0c94a1..95c44eb81f9eba481b7c795d0a8becb1aa757a90 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -16,7 +16,6 @@
#include "src/compiler/allocation-builder.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/compilation-dependencies.h"
-#include "src/compiler/fast-api-calls.h"
#include "src/compiler/frame-states.h"
#include "src/compiler/graph-assembler.h"
#include "src/compiler/js-graph.h"
@@ -1463,7 +1462,7 @@ Reduction JSNativeContextSpecialization::ReduceMegaDOMPropertyAccess(
value = InlineApiCall(lookup_start_object, lookup_start_object, frame_state,
nullptr /*value*/, &effect, &control,
- function_template_info, source);
+ function_template_info);
ReplaceWithValue(node, value, effect, control);
return Replace(value);
}
@@ -2835,8 +2834,7 @@ Node* JSNativeContextSpecialization::InlinePropertyGetterCall(
access_info.api_holder().value(), broker())
: receiver;
value = InlineApiCall(receiver, api_holder, frame_state, nullptr, effect,
- control, constant.AsFunctionTemplateInfo(),
- FeedbackSource());
+ control, constant.AsFunctionTemplateInfo());
}
// Remember to rewire the IfException edge if this is inside a try-block.
if (if_exceptions != nullptr) {
@@ -2871,7 +2869,7 @@ void JSNativeContextSpecialization::InlinePropertySetterCall(
access_info.api_holder().value(), broker())
: receiver;
InlineApiCall(receiver, api_holder, frame_state, value, effect, control,
- constant.AsFunctionTemplateInfo(), FeedbackSource());
+ constant.AsFunctionTemplateInfo());
}
// Remember to rewire the IfException edge if this is inside a try-block.
if (if_exceptions != nullptr) {
@@ -2884,66 +2882,10 @@ void JSNativeContextSpecialization::InlinePropertySetterCall(
}
}
-namespace {
-CallDescriptor* PushRegularApiCallInputs(
- JSGraph* jsgraph, JSHeapBroker* broker, Node* receiver, Node* api_holder,
- Node* frame_state, Node* value, Node** effect, Node** control,
- FunctionTemplateInfoRef function_template_info, Node** inputs,
- int& cursor) {
- // Only setters have a value.
- int const argc = value == nullptr ? 0 : 1;
-
- // The builtin always expects the receiver as the first param on the stack.
- bool no_profiling = broker->dependencies()->DependOnNoProfilingProtector();
- Callable call_api_callback = Builtins::CallableFor(
- jsgraph->isolate(), no_profiling
- ? Builtin::kCallApiCallbackOptimizedNoProfiling
- : Builtin::kCallApiCallbackOptimized);
-
- Node* func_templ =
- jsgraph->HeapConstantNoHole(function_template_info.object());
- ApiFunction function(function_template_info.callback(broker));
- Node* function_reference = jsgraph->graph()->NewNode(
- jsgraph->common()->ExternalConstant(ExternalReference::Create(
- jsgraph->isolate(), &function, ExternalReference::DIRECT_API_CALL,
- function_template_info.c_functions(broker).data(),
- function_template_info.c_signatures(broker).data(),
- static_cast<uint32_t>(
- function_template_info.c_functions(broker).size()))));
- Node* code = jsgraph->HeapConstantNoHole(call_api_callback.code());
-
- // Add CallApiCallbackStub's register argument as well.
- Node* context =
- jsgraph->ConstantNoHole(broker->target_native_context(), broker);
- inputs[cursor++] = code;
- inputs[cursor++] = function_reference;
- inputs[cursor++] = jsgraph->ConstantNoHole(argc);
- inputs[cursor++] = func_templ;
- inputs[cursor++] = api_holder;
- inputs[cursor++] = receiver;
- if (value) {
- inputs[cursor++] = value;
- }
- inputs[cursor++] = context;
- inputs[cursor++] = frame_state;
- inputs[cursor++] = *effect;
- inputs[cursor++] = *control;
-
- CallInterfaceDescriptor call_interface_descriptor =
- call_api_callback.descriptor();
- return Linkage::GetStubCallDescriptor(
- jsgraph->zone(), call_interface_descriptor,
- call_interface_descriptor.GetStackParameterCount() + argc +
- 1 /* implicit receiver */,
- CallDescriptor::kNeedsFrameState);
-}
-} // namespace
-
Node* JSNativeContextSpecialization::InlineApiCall(
Node* receiver, Node* api_holder, Node* frame_state, Node* value,
Node** effect, Node** control,
- FunctionTemplateInfoRef function_template_info,
- const FeedbackSource& feedback) {
+ FunctionTemplateInfoRef function_template_info) {
compiler::OptionalObjectRef maybe_callback_data =
function_template_info.callback_data(broker());
// Check if the function has an associated C++ code to execute.
@@ -2957,44 +2899,45 @@ Node* JSNativeContextSpecialization::InlineApiCall(
// Only setters have a value.
int const argc = value == nullptr ? 0 : 1;
+ // The builtin always expects the receiver as the first param on the stack.
+ bool no_profiling = broker()->dependencies()->DependOnNoProfilingProtector();
+ Callable call_api_callback = Builtins::CallableFor(
+ isolate(), no_profiling ? Builtin::kCallApiCallbackOptimizedNoProfiling
+ : Builtin::kCallApiCallbackOptimized);
+ CallInterfaceDescriptor call_interface_descriptor =
+ call_api_callback.descriptor();
+ auto call_descriptor = Linkage::GetStubCallDescriptor(
+ graph()->zone(), call_interface_descriptor,
+ call_interface_descriptor.GetStackParameterCount() + argc +
+ 1 /* implicit receiver */,
+ CallDescriptor::kNeedsFrameState);
- // Handles overloaded functions.
- FastApiCallFunction c_function = fast_api_call::GetFastApiCallTarget(
- broker(), function_template_info, argc);
-
- if (c_function.address) {
- const int input_count = 14;
- Node* inputs[input_count];
-
- int cursor = 0;
- inputs[cursor++] = receiver;
- if (value) {
- inputs[cursor++] = value;
- }
- inputs[cursor++] =
- jsgraph()->ConstantNoHole(maybe_callback_data.value(), broker());
-
- auto call_descriptor = PushRegularApiCallInputs(
- jsgraph(), broker(), receiver, api_holder, frame_state, value, effect,
- control, function_template_info, inputs, cursor);
-
- // The input_count is constant, but getters have less parameters than
- // setters.
- DCHECK_LE(cursor, input_count);
+ Node* func_templ =
+ jsgraph()->HeapConstantNoHole(function_template_info.object());
+ ApiFunction function(function_template_info.callback(broker()));
+ Node* function_reference =
+ graph()->NewNode(common()->ExternalConstant(ExternalReference::Create(
+ &function, ExternalReference::DIRECT_API_CALL)));
+ Node* code = jsgraph()->HeapConstantNoHole(call_api_callback.code());
- return *effect = *control = graph()->NewNode(
- simplified()->FastApiCall(c_function, feedback, call_descriptor),
- cursor, inputs);
+ // Add CallApiCallbackStub's register argument as well.
+ Node* context = jsgraph()->ConstantNoHole(native_context(), broker());
+ Node* inputs[11] = {
+ code, function_reference, jsgraph()->ConstantNoHole(argc),
+ func_templ, api_holder, receiver};
+ int index = 6 + argc;
+ inputs[index++] = context;
+ inputs[index++] = frame_state;
+ inputs[index++] = *effect;
+ inputs[index++] = *control;
+ // This needs to stay here because of the edge case described in
+ // http://crbug.com/675648.
+ if (value != nullptr) {
+ inputs[6] = value;
}
- Node* inputs[11];
- int cursor = 0;
- CallDescriptor* call_descriptor = PushRegularApiCallInputs(
- jsgraph(), broker(), receiver, api_holder, frame_state, value, effect,
- control, function_template_info, inputs, cursor);
-
return *effect = *control =
- graph()->NewNode(common()->Call(call_descriptor), cursor, inputs);
+ graph()->NewNode(common()->Call(call_descriptor), index, inputs);
}
std::optional<JSNativeContextSpecialization::ValueEffectControl>
diff --git a/src/compiler/js-native-context-specialization.h b/src/compiler/js-native-context-specialization.h
index 8761637df00ed1a717ca581ef5faf8c78ec3336b..c74b59b6cc4c742fa5c50df2cc89794c8bd0f23d 100644
--- a/src/compiler/js-native-context-specialization.h
+++ b/src/compiler/js-native-context-specialization.h
@@ -185,8 +185,7 @@ class V8_EXPORT_PRIVATE JSNativeContextSpecialization final
PropertyAccessInfo const& access_info);
Node* InlineApiCall(Node* receiver, Node* api_holder, Node* frame_state,
Node* value, Node** effect, Node** control,
- FunctionTemplateInfoRef function_template_info,
- const FeedbackSource& feedback);
+ FunctionTemplateInfoRef function_template_info);
// Construct the appropriate subgraph for element access.
ValueEffectControl BuildElementAccess(Node* receiver, Node* index,
diff --git a/src/d8/d8-test.cc b/src/d8/d8-test.cc
index 77e3b3d71d552fdb50e47b75ca8d1bc7296bb9d4..6467930fbb39a67a10d6822545e985965ced83ad 100644
--- a/src/d8/d8-test.cc
+++ b/src/d8/d8-test.cc
@@ -1305,67 +1305,6 @@ class FastCApiObject {
info.GetReturnValue().Set(BigInt::NewFromUnsigned(isolate, a + b));
}
- static void AttributeGetterSlowCallback(
- const FunctionCallbackInfo<Value>& info) {
- FastCApiObject* self = UnwrapObject(info.This());
- self->slow_call_count_++;
- info.GetReturnValue().Set(self->attribute_value_);
- }
-
- static int AttributeGetterFastCallback(Local<Object> receiver,
- FastApiCallbackOptions& options) {
- FastCApiObject* self = UnwrapObject(receiver);
- CHECK_SELF_OR_THROW_FAST_OPTIONS(0);
- self->fast_call_count_++;
- return self->attribute_value_;
- }
-
-#ifdef V8_USE_SIMULATOR_WITH_GENERIC_C_CALLS
- static AnyCType AttributeGetterFastCallbackPatch(AnyCType receiver,
- AnyCType options) {
- AnyCType ret;
- ret.int32_value = AttributeGetterFastCallback(receiver.object_value,
- *options.options_value);
- return ret;
- }
-#endif // V8_USE_SIMULATOR_WITH_GENERIC_C_CALLS
-
- static void AttributeSetterSlowCallback(
- const FunctionCallbackInfo<Value>& info) {
- FastCApiObject* self = UnwrapObject(info.This());
- self->slow_call_count_++;
- if (info.Length() < 1 || !info[0]->IsNumber()) {
- info.GetIsolate()->ThrowError(
- "The attribute requires a number as a new value");
- return;
- }
- double double_val =
- info[0]->NumberValue(info.GetIsolate()->GetCurrentContext()).FromJust();
- if (!base::IsValueInRangeForNumericType<int>(double_val)) {
- info.GetIsolate()->ThrowError(
- "New value of attribute is not within int32 range");
- return;
- }
- self->attribute_value_ = static_cast<int>(double_val);
- }
-
- static void AttributeSetterFastCallback(Local<Object> receiver, int32_t value,
- FastApiCallbackOptions& options) {
- FastCApiObject* self = UnwrapObject(receiver);
- CHECK_SELF_OR_THROW_FAST_OPTIONS();
- self->fast_call_count_++;
- self->attribute_value_ = value;
- }
-
-#ifdef V8_USE_SIMULATOR_WITH_GENERIC_C_CALLS
- static void AttributeSetterFastCallbackPatch(AnyCType receiver,
- AnyCType value,
- AnyCType options) {
- AttributeSetterFastCallback(receiver.object_value, value.int32_value,
- *options.options_value);
- }
-#endif // V8_USE_SIMULATOR_WITH_GENERIC_C_CALLS
-
static void FastCallCount(const FunctionCallbackInfo<Value>& info) {
FastCApiObject* self = UnwrapObject(info.This());
CHECK_SELF_OR_THROW_SLOW();
@@ -1500,25 +1439,6 @@ Local<FunctionTemplate> Shell::CreateTestFastCApiTemplate(Isolate* isolate) {
ConstructorBehavior::kThrow,
SideEffectType::kHasSideEffect, &add_all_c_func));
- CFunction fast_setter = CFunction::Make(
- FastCApiObject::AttributeSetterFastCallback V8_IF_USE_SIMULATOR(
- FastCApiObject::AttributeSetterFastCallback));
- CFunction fast_getter = CFunction::Make(
- FastCApiObject::AttributeGetterFastCallback V8_IF_USE_SIMULATOR(
- FastCApiObject::AttributeGetterFastCallback));
-
- api_obj_ctor->PrototypeTemplate()->SetAccessorProperty(
- String::NewFromUtf8(isolate, "fast_attribute").ToLocalChecked(),
- FunctionTemplate::New(
- isolate, FastCApiObject::AttributeGetterSlowCallback,
- Local<Value>(), signature, 1, ConstructorBehavior::kThrow,
- SideEffectType::kHasSideEffect, &fast_getter),
- FunctionTemplate::New(
- isolate, FastCApiObject::AttributeSetterSlowCallback,
- Local<Value>(), signature, 1, ConstructorBehavior::kThrow,
- SideEffectType::kHasSideEffect, &fast_setter),
- v8::PropertyAttribute::None);
-
CFunction add_all_seq_c_func = CFunction::Make(
FastCApiObject::AddAllSequenceFastCallback V8_IF_USE_SIMULATOR(
FastCApiObject::AddAllSequenceFastCallbackPatch));
diff --git a/test/mjsunit/compiler/fast-api-attributes.js b/test/mjsunit/compiler/fast-api-attributes.js
deleted file mode 100644
index 137e5c917cf7a56c89e70ed49d07e3134d1c8eac..0000000000000000000000000000000000000000
--- a/test/mjsunit/compiler/fast-api-attributes.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file excercises basic fast API calls and enables fuzzing of this
-// functionality.
-
-// Flags: --turbo-fast-api-calls --expose-fast-api --allow-natives-syntax --turbofan
-// --always-turbofan is disabled because we rely on particular feedback for
-// optimizing to the fastest path.
-// Flags: --no-always-turbofan
-// The test relies on optimizing/deoptimizing at predictable moments, so
-// it's not suitable for deoptimization fuzzing.
-// Flags: --deopt-every-n-times=0
-// Flags: --fast-api-allow-float-in-sim
-
-const fast_c_api = new d8.test.FastCAPI();
-
-function get() {
- return fast_c_api.fast_attribute;
-}
-
-function set(value) {
- fast_c_api.fast_attribute = value;
-}
-
-%PrepareFunctionForOptimization(set);
-set(12);
-%OptimizeFunctionOnNextCall(set);
-%PrepareFunctionForOptimization(get);
-assertEquals(12, get());
-%OptimizeFunctionOnNextCall(get);
-
-
-fast_c_api.reset_counts();
-set(21);
-assertOptimized(set);
-assertEquals(1, fast_c_api.fast_call_count());
-assertEquals(0, fast_c_api.slow_call_count());
-
-fast_c_api.reset_counts();
-assertEquals(21, get());
-assertOptimized(get);
-assertEquals(1, fast_c_api.fast_call_count());
-assertEquals(0, fast_c_api.slow_call_count());
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index 207322443192073f516787cbaf81e69c87d34a3c..2256e42324bdc91a4c92bfcfe9909c71f8e8533b 100644
--- a/test/mjsunit/mjsunit.status
+++ b/test/mjsunit/mjsunit.status
@@ -757,7 +757,6 @@
# These tests rely on TurboFan being enabled.
'compiler/call-with-arraylike-or-spread*': [SKIP],
'compiler/fast-api-calls': [SKIP],
- 'compiler/fast-api-attributes': [SKIP],
'compiler/fast-api-interface-types': [SKIP],
'compiler/regress-crbug-1201011': [SKIP],
'compiler/regress-crbug-1201057': [SKIP],
@@ -2359,7 +2358,6 @@
'regress/regress-1049982-2': [FAIL],
# Maglev doesn't support fast API calls.
'compiler/fast-api-annotations': [FAIL],
- 'compiler/fast-api-attributes': [FAIL],
'compiler/fast-api-calls': [FAIL],
'compiler/fast-api-calls-8args': [FAIL],
'compiler/fast-api-calls-string': [FAIL],

View file

@ -13,10 +13,10 @@ Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5979766
This reverts commit c41f7a0ef99bd1c9752ee79923f634145ebc4153.
diff --git a/src/api/api.cc b/src/api/api.cc
index 86f2d298e4ba37a46a74f4f6eba5adc2106889bb..ae1de25004bd1d1ba11225bc13472f4cbab3ca33 100644
index d76e52da63748acfb37b31179b3428de77362413..0b30c6568d1a38237f3629fb88a5c9cbf1650f98 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -1348,16 +1348,6 @@ Local<FunctionTemplate> FunctionTemplate::NewWithCFunctionOverloads(
@@ -1349,16 +1349,6 @@ Local<FunctionTemplate> FunctionTemplate::NewWithCFunctionOverloads(
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
API_RCS_SCOPE(i_isolate, FunctionTemplate, New);
@ -319,7 +319,7 @@ index d75a38769d582cd6e5a807f9670732dc92d77b7e..a29bd4a5be0c9a268386898f8a52e989
return Replace(fast_call_subgraph);
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index a76784f65355cd7f380cadf0db602668f59cf07b..37e216509163514bc9ee43d7bb25695387e82351 100644
index 377d36b1d880892d0d446ee386d21028d3ffec16..ebb8bcd585f6b185e355922fd97c94bd0136d968 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -2015,7 +2015,7 @@ class RepresentationSelector {
@ -346,10 +346,10 @@ index a76784f65355cd7f380cadf0db602668f59cf07b..37e216509163514bc9ee43d7bb256953
case CTypeInfo::Type::kBool:
SetOutput<T>(node, MachineRepresentation::kBit);
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index a27ea417112518987f95eac5d7d091693149280a..a8fd6fba72b3140016258b8c156aa65701367c59 100644
index d0405cf5bc25d47b7cf8bfd03b0bb639df4eddd4..f5810d72d99f4ecfe668d9e1fd9b3ad2ea123875 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -2055,21 +2055,26 @@ FastApiCallParameters const& FastApiCallParametersOf(const Operator* op) {
@@ -2096,21 +2096,26 @@ FastApiCallParameters const& FastApiCallParametersOf(const Operator* op) {
}
std::ostream& operator<<(std::ostream& os, FastApiCallParameters const& p) {
@ -381,7 +381,7 @@ index a27ea417112518987f95eac5d7d091693149280a..a8fd6fba72b3140016258b8c156aa657
lhs.feedback() == rhs.feedback() &&
lhs.descriptor() == rhs.descriptor();
}
@@ -2279,11 +2284,19 @@ const Operator* SimplifiedOperatorBuilder::TransitionAndStoreNonNumberElement(
@@ -2320,11 +2325,19 @@ const Operator* SimplifiedOperatorBuilder::TransitionAndStoreNonNumberElement(
}
const Operator* SimplifiedOperatorBuilder::FastApiCall(
@ -405,7 +405,7 @@ index a27ea417112518987f95eac5d7d091693149280a..a8fd6fba72b3140016258b8c156aa657
// Arguments for CallApiCallbackOptimizedXXX builtin (including context)
// plus JS arguments (including receiver).
int slow_arg_count = static_cast<int>(descriptor->ParameterCount());
@@ -2293,13 +2306,13 @@ const Operator* SimplifiedOperatorBuilder::FastApiCall(
@@ -2334,13 +2347,13 @@ const Operator* SimplifiedOperatorBuilder::FastApiCall(
return zone()->New<Operator1<FastApiCallParameters>>(
IrOpcode::kFastApiCall, Operator::kNoProperties, "FastApiCall",
value_input_count, 1, 1, 1, 1, 2,
@ -422,10 +422,10 @@ index a27ea417112518987f95eac5d7d091693149280a..a8fd6fba72b3140016258b8c156aa657
return signature->ArgumentCount();
}
diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h
index a4aecbbfe2f82a16dfc136c2bc22614ade9e6bf7..ee61ba530af51cd3b32a62cc5d4b83016f501078 100644
index 5cb305f8db8419bcaedc89dbd9d68226bcf90551..19cc23394d5dd729974ff4faf0e4f7cf54c4710e 100644
--- a/src/compiler/simplified-operator.h
+++ b/src/compiler/simplified-operator.h
@@ -716,25 +716,35 @@ struct FastApiCallFunction {
@@ -742,25 +742,35 @@ struct FastApiCallFunction {
return address == rhs.address && signature == rhs.signature;
}
};
@ -466,7 +466,7 @@ index a4aecbbfe2f82a16dfc136c2bc22614ade9e6bf7..ee61ba530af51cd3b32a62cc5d4b8301
const FeedbackSource feedback_;
CallDescriptor* descriptor_;
@@ -1205,9 +1215,9 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final
@@ -1233,9 +1243,9 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final
const Operator* Unsigned32Divide();
// Represents the inputs necessary to construct a fast and a slow API call.
@ -480,10 +480,10 @@ index a4aecbbfe2f82a16dfc136c2bc22614ade9e6bf7..ee61ba530af51cd3b32a62cc5d4b8301
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
const Operator* GetContinuationPreservedEmbedderData();
diff --git a/src/compiler/turbofan-typer.cc b/src/compiler/turbofan-typer.cc
index 51f797d342c4fb20e6833fdebbc8a6417b9a3537..a1ab6f4a314a56db8d1351e81e9640e470c324ae 100644
index 811c9c5ab82ebbdf6ca14a2fd99c3b154609d506..f36916c1a0d39293f01eca84cac6ef83096cd25e 100644
--- a/src/compiler/turbofan-typer.cc
+++ b/src/compiler/turbofan-typer.cc
@@ -1186,8 +1186,11 @@ Type Typer::Visitor::TypeCall(Node* node) { return Type::Any(); }
@@ -1190,8 +1190,11 @@ Type Typer::Visitor::TypeCall(Node* node) { return Type::Any(); }
Type Typer::Visitor::TypeFastApiCall(Node* node) {
FastApiCallParameters const& op_params = FastApiCallParametersOf(node->op());
@ -604,7 +604,7 @@ index 2dec266f9e648391fe61a62931cca1ad20de719c..dc27e91ad0da93a5b68053f132f219f9
V<T> Checked(V<Tuple<T, Word32>> result, Label<>& otherwise) {
V<Word32> result_state = __ template Projection<1>(result);
diff --git a/src/compiler/turboshaft/graph-builder.cc b/src/compiler/turboshaft/graph-builder.cc
index 683604a0f5e2c0694f29e447e095417311ea37ec..cb3c976f0f0b9fc3fd799bc301d57f588b9c7ae6 100644
index f24cd884bf7810aaed5e58b2044c2770653266f1..d79f6c801d2562a3cd65597d79050791fee3ad08 100644
--- a/src/compiler/turboshaft/graph-builder.cc
+++ b/src/compiler/turboshaft/graph-builder.cc
@@ -1974,7 +1974,7 @@ OpIndex GraphBuilder::Process(
@ -669,10 +669,10 @@ index 683604a0f5e2c0694f29e447e095417311ea37ec..cb3c976f0f0b9fc3fd799bc301d57f58
// There is one return in addition to the return value of the C function,
// which indicates if a fast API call actually happened.
diff --git a/src/compiler/turboshaft/operations.h b/src/compiler/turboshaft/operations.h
index 1b3a33fde8d73fea2d1d022711b6472a77ad7a75..917b39db6eaba0d9795ab8986687d591821d6317 100644
index a26611708f2dd162e127d7a7c9af9135892d0b40..b04639190b239af92a2845886e5852080e6e454a 100644
--- a/src/compiler/turboshaft/operations.h
+++ b/src/compiler/turboshaft/operations.h
@@ -6385,16 +6385,24 @@ struct Float64SameValueOp : FixedArityOperationT<2, Float64SameValueOp> {
@@ -6386,16 +6386,24 @@ struct Float64SameValueOp : FixedArityOperationT<2, Float64SameValueOp> {
};
struct FastApiCallParameters : public NON_EXPORTED_BASE(ZoneObject) {
@ -705,7 +705,7 @@ index 1b3a33fde8d73fea2d1d022711b6472a77ad7a75..917b39db6eaba0d9795ab8986687d591
};
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 351705cbc6c054d38f8d9d93744701b9004fcd1c..4c13f51d4b61f17558c6b10a09f8de5aedc093a8 100644
index 5ad805a11f7de73f06518ee3cf878ca492c0c652..2571f2800450cb8582198dc7cb7ef58311c52dae 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -8356,13 +8356,19 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
@ -734,7 +734,7 @@ index 351705cbc6c054d38f8d9d93744701b9004fcd1c..4c13f51d4b61f17558c6b10a09f8de5a
return gasm_->AdaptLocalArgument(receiver_node);
}
diff --git a/src/d8/d8-test.cc b/src/d8/d8-test.cc
index e231c93579e0ca8068a0c192e6351bc20648d7ae..cb4d43c95665f7ba7f94a9ff63557ab97a1eef5a 100644
index 6467930fbb39a67a10d6822545e985965ced83ad..1c99e4d89cbc605c6c1b75ce31b09b67334a10ee 100644
--- a/src/d8/d8-test.cc
+++ b/src/d8/d8-test.cc
@@ -443,6 +443,20 @@ class FastCApiObject {
@ -758,7 +758,7 @@ index e231c93579e0ca8068a0c192e6351bc20648d7ae..cb4d43c95665f7ba7f94a9ff63557ab9
#ifdef V8_USE_SIMULATOR_WITH_GENERIC_C_CALLS
static AnyCType Add32BitIntFastCallbackPatch(AnyCType receiver,
AnyCType arg_i32,
@@ -1549,6 +1563,22 @@ Local<FunctionTemplate> Shell::CreateTestFastCApiTemplate(Isolate* isolate) {
@@ -1553,6 +1567,22 @@ Local<FunctionTemplate> Shell::CreateTestFastCApiTemplate(Isolate* isolate) {
signature, 1, ConstructorBehavior::kThrow,
SideEffectType::kHasSideEffect, {add_all_overloads, 2}));