| 
									
										
										
										
											2023-10-18 13:26:47 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2021-2023, Andreas Kling <kling@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibJS/Bytecode/IdentifierTable.h>
 | 
					
						
							| 
									
										
										
										
											2023-10-20 13:09:35 +02:00
										 |  |  | #include <LibJS/Bytecode/Op.h>
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:26:47 +02:00
										 |  |  | #include <LibJS/Runtime/Completion.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace JS::Bytecode { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-05 14:22:57 +01:00
										 |  |  | ThrowCompletionOr<NonnullGCPtr<Object>> base_object_for_get(VM&, Value base_value); | 
					
						
							| 
									
										
										
										
											2023-11-05 14:33:54 +01:00
										 |  |  | ThrowCompletionOr<Value> get_by_id(VM&, DeprecatedFlyString const& property, Value base_value, Value this_value, PropertyLookupCache&); | 
					
						
							| 
									
										
										
										
											2023-11-05 14:22:57 +01:00
										 |  |  | ThrowCompletionOr<Value> get_by_value(VM&, Value base_value, Value property_key_value); | 
					
						
							| 
									
										
										
										
											2023-11-05 14:37:54 +01:00
										 |  |  | ThrowCompletionOr<Value> get_global(Bytecode::Interpreter&, DeprecatedFlyString const& identifier, GlobalVariableCache&); | 
					
						
							| 
									
										
										
										
											2023-11-08 20:51:26 +01:00
										 |  |  | ThrowCompletionOr<void> put_by_property_key(VM&, Value base, Value this_value, Value value, PropertyKey name, Op::PropertyKind kind, PropertyLookupCache* = nullptr); | 
					
						
							| 
									
										
										
										
											2023-11-27 12:56:20 +01:00
										 |  |  | ThrowCompletionOr<Value> perform_call(Interpreter&, Value this_value, Op::CallType, Value callee, ReadonlySpan<Value> argument_values); | 
					
						
							| 
									
										
										
										
											2023-10-26 15:13:08 +02:00
										 |  |  | ThrowCompletionOr<void> throw_if_needed_for_call(Interpreter&, Value callee, Op::CallType, Optional<StringTableIndex> const& expression_string); | 
					
						
							| 
									
										
										
										
											2023-10-21 15:22:41 +02:00
										 |  |  | ThrowCompletionOr<Value> typeof_variable(VM&, DeprecatedFlyString const&); | 
					
						
							| 
									
										
										
										
											2023-11-16 07:13:35 +01:00
										 |  |  | ThrowCompletionOr<void> set_variable(VM&, DeprecatedFlyString const&, Value, Op::EnvironmentMode, Op::SetVariable::InitializationMode, EnvironmentVariableCache&); | 
					
						
							| 
									
										
										
										
											2023-10-21 15:45:10 +02:00
										 |  |  | Value new_function(VM&, FunctionExpression const&, Optional<IdentifierTableIndex> const& lhs_name, Optional<Register> const& home_object); | 
					
						
							| 
									
										
										
										
											2023-10-21 15:55:02 +02:00
										 |  |  | ThrowCompletionOr<void> put_by_value(VM&, Value base, Value property_key_value, Value value, Op::PropertyKind); | 
					
						
							| 
									
										
										
										
											2023-11-05 15:14:54 +01:00
										 |  |  | ThrowCompletionOr<Value> get_variable(Bytecode::Interpreter&, DeprecatedFlyString const& name, EnvironmentVariableCache&); | 
					
						
							| 
									
										
										
										
											2023-10-18 13:26:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-27 13:48:07 +02:00
										 |  |  | struct CalleeAndThis { | 
					
						
							|  |  |  |     Value callee; | 
					
						
							|  |  |  |     Value this_value; | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2023-11-10 13:00:36 +01:00
										 |  |  | ThrowCompletionOr<CalleeAndThis> get_callee_and_this_from_environment(Bytecode::Interpreter&, DeprecatedFlyString const& name, EnvironmentVariableCache&); | 
					
						
							| 
									
										
										
										
											2023-10-27 17:07:30 +02:00
										 |  |  | Value new_regexp(VM&, ParsedRegex const&, DeprecatedString const& pattern, DeprecatedString const& flags); | 
					
						
							| 
									
										
										
										
											2023-10-29 15:29:42 +02:00
										 |  |  | MarkedVector<Value> argument_list_evaluation(VM&, Value arguments); | 
					
						
							| 
									
										
										
										
											2023-10-29 00:21:43 +02:00
										 |  |  | ThrowCompletionOr<void> create_variable(VM&, DeprecatedFlyString const& name, Op::EnvironmentMode, bool is_global, bool is_immutable, bool is_strict); | 
					
						
							| 
									
										
										
										
											2023-10-29 15:29:42 +02:00
										 |  |  | ThrowCompletionOr<ECMAScriptFunctionObject*> new_class(VM&, Value super_class, ClassExpression const&, Optional<IdentifierTableIndex> const& lhs_name); | 
					
						
							| 
									
										
										
										
											2023-10-29 15:25:28 +01:00
										 |  |  | ThrowCompletionOr<NonnullGCPtr<Object>> super_call_with_argument_array(VM&, Value argument_array, bool is_synthetic); | 
					
						
							| 
									
										
										
										
											2023-10-29 15:52:54 +01:00
										 |  |  | Object* iterator_to_object(VM&, IteratorRecord); | 
					
						
							| 
									
										
										
										
											2023-10-29 16:01:25 +01:00
										 |  |  | IteratorRecord object_to_iterator(VM&, Object&); | 
					
						
							| 
									
										
										
										
											2023-10-29 17:07:25 +01:00
										 |  |  | ThrowCompletionOr<NonnullGCPtr<Array>> iterator_to_array(VM&, Value iterator); | 
					
						
							| 
									
										
										
										
											2023-10-29 17:20:51 +01:00
										 |  |  | ThrowCompletionOr<void> append(VM& vm, Value lhs, Value rhs, bool is_spread); | 
					
						
							| 
									
										
										
										
											2023-10-29 20:29:14 +01:00
										 |  |  | ThrowCompletionOr<Value> delete_by_id(Bytecode::Interpreter&, Value base, IdentifierTableIndex identifier); | 
					
						
							| 
									
										
										
										
											2023-10-29 21:20:25 +01:00
										 |  |  | ThrowCompletionOr<Value> delete_by_value(Bytecode::Interpreter&, Value base, Value property_key_value); | 
					
						
							| 
									
										
										
										
											2023-10-29 21:37:52 +01:00
										 |  |  | ThrowCompletionOr<Value> delete_by_value_with_this(Bytecode::Interpreter&, Value base, Value property_key_value, Value this_value); | 
					
						
							| 
									
										
										
										
											2023-10-29 21:15:52 +01:00
										 |  |  | ThrowCompletionOr<Object*> get_object_property_iterator(VM&, Value); | 
					
						
							| 
									
										
										
										
											2023-10-27 13:48:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-18 13:26:47 +02:00
										 |  |  | } |