mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibWeb: Move IDLOverloadResolution from Bindings/ to WebIDL/
This commit is contained in:
parent
6480faacb6
commit
86f68eb3c3
4 changed files with 6 additions and 6 deletions
|
@ -1928,7 +1928,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::@function.name:snakecase@)
|
||||||
if (!effective_overload_set.has_value())
|
if (!effective_overload_set.has_value())
|
||||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::OverloadResolutionFailed);
|
return vm.throw_completion<JS::TypeError>(JS::ErrorType::OverloadResolutionFailed);
|
||||||
|
|
||||||
auto chosen_overload = TRY(resolve_overload(vm, effective_overload_set.value()));
|
auto chosen_overload = TRY(WebIDL::resolve_overload(vm, effective_overload_set.value()));
|
||||||
switch (chosen_overload.callable_id) {
|
switch (chosen_overload.callable_id) {
|
||||||
)~~~");
|
)~~~");
|
||||||
|
|
||||||
|
@ -2358,7 +2358,6 @@ void generate_prototype_implementation(IDL::Interface const& interface)
|
||||||
#include <LibJS/Runtime/Value.h>
|
#include <LibJS/Runtime/Value.h>
|
||||||
#include <LibWeb/Bindings/@prototype_class@.h>
|
#include <LibWeb/Bindings/@prototype_class@.h>
|
||||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||||
#include <LibWeb/Bindings/IDLOverloadResolution.h>
|
|
||||||
#include <LibWeb/Bindings/LocationObject.h>
|
#include <LibWeb/Bindings/LocationObject.h>
|
||||||
#include <LibWeb/DOM/Element.h>
|
#include <LibWeb/DOM/Element.h>
|
||||||
#include <LibWeb/DOM/Event.h>
|
#include <LibWeb/DOM/Event.h>
|
||||||
|
@ -2368,6 +2367,7 @@ void generate_prototype_implementation(IDL::Interface const& interface)
|
||||||
#include <LibWeb/HTML/Origin.h>
|
#include <LibWeb/HTML/Origin.h>
|
||||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||||
#include <LibWeb/HTML/Window.h>
|
#include <LibWeb/HTML/Window.h>
|
||||||
|
#include <LibWeb/WebIDL/OverloadResolution.h>
|
||||||
|
|
||||||
#if __has_include(<LibWeb/Bindings/@prototype_base_class@.h>)
|
#if __has_include(<LibWeb/Bindings/@prototype_base_class@.h>)
|
||||||
# include <LibWeb/Bindings/@prototype_base_class@.h>
|
# include <LibWeb/Bindings/@prototype_base_class@.h>
|
||||||
|
|
|
@ -3,7 +3,6 @@ include(libweb_generators)
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
Bindings/AudioConstructor.cpp
|
Bindings/AudioConstructor.cpp
|
||||||
Bindings/CSSNamespace.cpp
|
Bindings/CSSNamespace.cpp
|
||||||
Bindings/IDLOverloadResolution.cpp
|
|
||||||
Bindings/ImageConstructor.cpp
|
Bindings/ImageConstructor.cpp
|
||||||
Bindings/LegacyPlatformObject.cpp
|
Bindings/LegacyPlatformObject.cpp
|
||||||
Bindings/LocationConstructor.cpp
|
Bindings/LocationConstructor.cpp
|
||||||
|
@ -413,6 +412,7 @@ set(SOURCES
|
||||||
WebGL/WebGLRenderingContextBase.cpp
|
WebGL/WebGLRenderingContextBase.cpp
|
||||||
WebIDL/AbstractOperations.cpp
|
WebIDL/AbstractOperations.cpp
|
||||||
WebIDL/CallbackType.cpp
|
WebIDL/CallbackType.cpp
|
||||||
|
WebIDL/OverloadResolution.cpp
|
||||||
WebSockets/WebSocket.cpp
|
WebSockets/WebSocket.cpp
|
||||||
XHR/EventNames.cpp
|
XHR/EventNames.cpp
|
||||||
XHR/ProgressEvent.cpp
|
XHR/ProgressEvent.cpp
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
#include <LibJS/Runtime/FunctionObject.h>
|
#include <LibJS/Runtime/FunctionObject.h>
|
||||||
#include <LibJS/Runtime/TypedArray.h>
|
#include <LibJS/Runtime/TypedArray.h>
|
||||||
#include <LibJS/Runtime/Value.h>
|
#include <LibJS/Runtime/Value.h>
|
||||||
#include <LibWeb/Bindings/IDLOverloadResolution.h>
|
|
||||||
#include <LibWeb/Bindings/PlatformObject.h>
|
#include <LibWeb/Bindings/PlatformObject.h>
|
||||||
|
#include <LibWeb/WebIDL/OverloadResolution.h>
|
||||||
|
|
||||||
namespace Web::Bindings {
|
namespace Web::WebIDL {
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#dfn-convert-ecmascript-to-idl-value
|
// https://webidl.spec.whatwg.org/#dfn-convert-ecmascript-to-idl-value
|
||||||
static JS::Value convert_ecmascript_type_to_idl_value(JS::Value value, IDL::Type const&)
|
static JS::Value convert_ecmascript_type_to_idl_value(JS::Value value, IDL::Type const&)
|
|
@ -11,7 +11,7 @@
|
||||||
#include <LibIDL/Types.h>
|
#include <LibIDL/Types.h>
|
||||||
#include <LibJS/Runtime/VM.h>
|
#include <LibJS/Runtime/VM.h>
|
||||||
|
|
||||||
namespace Web::Bindings {
|
namespace Web::WebIDL {
|
||||||
|
|
||||||
struct ResolvedOverload {
|
struct ResolvedOverload {
|
||||||
// Corresponds to "the special value “missing”" in the overload resolution algorithm.
|
// Corresponds to "the special value “missing”" in the overload resolution algorithm.
|
Loading…
Add table
Add a link
Reference in a new issue