| 
									
										
										
										
											2021-06-12 23:54:40 +03:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibJS/Runtime/NativeFunction.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace JS { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class MapConstructor final : public NativeFunction { | 
					
						
							|  |  |  |     JS_OBJECT(MapConstructor, NativeFunction); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2022-08-16 00:20:49 +01:00
										 |  |  |     explicit MapConstructor(Realm&); | 
					
						
							| 
									
										
										
										
											2022-08-16 00:20:49 +01:00
										 |  |  |     virtual void initialize(Realm&) override; | 
					
						
							| 
									
										
										
										
											2022-03-14 10:25:06 -06:00
										 |  |  |     virtual ~MapConstructor() override = default; | 
					
						
							| 
									
										
										
										
											2021-06-12 23:54:40 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-20 21:16:30 +01:00
										 |  |  |     virtual ThrowCompletionOr<Value> call() override; | 
					
						
							|  |  |  |     virtual ThrowCompletionOr<Object*> construct(FunctionObject&) override; | 
					
						
							| 
									
										
										
										
											2021-06-12 23:54:40 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     virtual bool has_constructor() const override { return true; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-29 01:00:36 +03:00
										 |  |  |     JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter); | 
					
						
							| 
									
										
										
										
											2021-06-12 23:54:40 +03:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |