engage/generated/moon_sharp/interpreter/tree/expressions/
functioncallexpression.rs1#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 moon_sharp::interpreter::tree::{
10 expression::{Expression, IExpression},
11 nodebase::{INodeBase, NodeBase},
12 },
13 system::object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/expressions/functioncallexpression/FunctionCallExpression.md"))]
17 #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Expressions", name = "FunctionCallExpression")]
18 #[parent(crate::moon_sharp::interpreter::tree::expression::Expression)]
19 pub struct FunctionCallExpression {
20 #[offset(32)]
21 #[rename(name = "m_Arguments")]
22 pub m_arguments: crate::system::collections::generic::list_1::List_1<crate::moon_sharp::interpreter::tree::expression::Expression>,
23 #[offset(40)]
24 #[rename(name = "m_Function")]
25 pub m_function: crate::moon_sharp::interpreter::tree::expression::Expression,
26 #[offset(48)]
27 #[rename(name = "m_Name")]
28 pub m_name: ::unity::Il2CppString,
29 #[offset(56)]
30 #[rename(name = "m_DebugErr")]
31 pub m_debug_err: ::unity::Il2CppString,
32 }
33}
34
35#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression-types")]
36pub use __types::*;
37
38#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
39#[doc(hidden)]
40#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
41mod __FunctionCallExpression_unity_raw {
42 use super::*;
43 #[doc(hidden)]
44 #[allow(non_snake_case)]
45 pub mod __lookup_get_source_ref {
46 use super::*;
47 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
48 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
49 ::unity::lookup::method_info_on_class_with_signature(
50 <FunctionCallExpression as ::unity::ClassIdentity>::class(),
51 "get_SourceRef",
52 0,
53 param_types,
54 false,
55 )
56 });
57 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
58 match &*METHOD {
59 ::core::result::Result::Ok(mi) => *mi,
60 ::core::result::Result::Err(e) => {
61 panic!(
62 "method lookup failed: {}
63::{}
64: {}
65",
66 <FunctionCallExpression as ::unity::ClassIdentity>::NAME,
67 "get_SourceRef",
68 e
69 )
70 },
71 }
72 }
73 }
74 #[doc(hidden)]
75 #[allow(non_snake_case)]
76 pub mod __lookup_set_source_ref {
77 use super::*;
78 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
79 let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
80 &[<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef as ::unity::IlType>::il_type()];
81 ::unity::lookup::method_info_on_class_with_signature(
82 <FunctionCallExpression as ::unity::ClassIdentity>::class(),
83 "set_SourceRef",
84 1,
85 param_types,
86 false,
87 )
88 });
89 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
90 match &*METHOD {
91 ::core::result::Result::Ok(mi) => *mi,
92 ::core::result::Result::Err(e) => {
93 panic!(
94 "method lookup failed: {}
95::{}
96: {}
97",
98 <FunctionCallExpression as ::unity::ClassIdentity>::NAME,
99 "set_SourceRef",
100 e
101 )
102 },
103 }
104 }
105 }
106 #[doc(hidden)]
107 #[allow(non_snake_case)]
108 pub mod __lookup_ctor {
109 use super::*;
110 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
111 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
112 <crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext as ::unity::IlType>::il_type(),
113 <crate::moon_sharp::interpreter::tree::expression::Expression as ::unity::IlType>::il_type(),
114 <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
115 ];
116 ::unity::lookup::method_info_on_class_with_signature(
117 <FunctionCallExpression as ::unity::ClassIdentity>::class(),
118 ".ctor",
119 3,
120 param_types,
121 false,
122 )
123 });
124 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
125 match &*METHOD {
126 ::core::result::Result::Ok(mi) => *mi,
127 ::core::result::Result::Err(e) => {
128 panic!(
129 "method lookup failed: {}
130::{}
131: {}
132",
133 <FunctionCallExpression as ::unity::ClassIdentity>::NAME,
134 ".ctor",
135 e
136 )
137 },
138 }
139 }
140 }
141}
142
143#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
144pub trait IFunctionCallExpressionMethods: IFunctionCallExpression {
145 #[doc = "`get_SourceRef()` overload"]
146 fn get_source_ref(self) -> crate::moon_sharp::interpreter::debugging::sourceref::SourceRef {
147 unsafe {
148 let __receiver =
149 <FunctionCallExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
150 ::unity::il2cpp_call!(__FunctionCallExpression_unity_raw::__lookup_get_source_ref::get_method_info().method_ptr,crate::moon_sharp::interpreter::debugging::sourceref::SourceRef;
151(FunctionCallExpression)__receiver)
152 }
153 }
154 #[doc = "`set_SourceRef(crate::moon_sharp::interpreter::debugging::sourceref::SourceRef)` overload"]
155 fn set_source_ref(self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::debugging::sourceref::SourceRef>) -> () {
156 unsafe {
157 let __receiver =
158 <FunctionCallExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
159 ::unity::il2cpp_call!(__FunctionCallExpression_unity_raw::__lookup_set_source_ref::get_method_info().method_ptr,();
160(FunctionCallExpression)__receiver,(crate::moon_sharp::interpreter::debugging::sourceref::SourceRef)::core::convert::Into::into(value))
161 }
162 }
163 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::expression::Expression, crate::moon_sharp::interpreter::tree::token::Token)` overload"]
164 fn ctor(
165 self,
166 lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>,
167 function: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::expression::Expression>,
168 this_call_name: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
169 ) -> () {
170 unsafe {
171 let __receiver =
172 <FunctionCallExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
173 ::unity::il2cpp_call!(__FunctionCallExpression_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
174(FunctionCallExpression)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext),(crate::moon_sharp::interpreter::tree::expression::Expression)::core::convert::Into::into(function),(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(this_call_name))
175 }
176 }
177 #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
178 fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
179 unsafe {
180 let __receiver =
181 <FunctionCallExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
182 {
183 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
184 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
185 panic!(
186 "unity: virtual slot {}
187 out of range (vtable len {}
188) on the runtime class behind {}
189 (method `{}
190`)",
191 4usize,
192 __vt.len(),
193 <FunctionCallExpression as ::unity::ClassIdentity>::NAME,
194 "Compile",
195 )
196 });
197 let __inner: extern "C" fn(
198 FunctionCallExpression,
199 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
200 ::unity::OptionalMethod,
201 ) -> () = ::core::mem::transmute(__vi.method_ptr);
202 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
203 __inner(__receiver, ::core::convert::Into::into(bc), __mi)
204 }
205 }
206 }
207 #[doc = "`Eval(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)` overload"]
208 fn eval(
209 self,
210 context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
211 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
212 unsafe {
213 let __receiver =
214 <FunctionCallExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
215 {
216 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
217 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
218 panic!(
219 "unity: virtual slot {}
220 out of range (vtable len {}
221) on the runtime class behind {}
222 (method `{}
223`)",
224 6usize,
225 __vt.len(),
226 <FunctionCallExpression as ::unity::ClassIdentity>::NAME,
227 "Eval",
228 )
229 });
230 let __inner: extern "C" fn(
231 FunctionCallExpression,
232 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
233 ::unity::OptionalMethod,
234 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__vi.method_ptr);
235 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
236 __inner(__receiver, ::core::convert::Into::into(context), __mi)
237 }
238 }
239 }
240}
241
242#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
243impl<__T: IFunctionCallExpression> IFunctionCallExpressionMethods for __T {}
244
245#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
246impl FunctionCallExpression {
247 pub fn get_source_ref_method_info() -> &'static ::unity::il2cpp::MethodInfo {
248 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
249 }
250
251 pub fn set_source_ref_method_info() -> &'static ::unity::il2cpp::MethodInfo {
252 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
253 }
254
255 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
256 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
257 }
258
259 pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
260 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
261 }
262
263 pub fn eval_method_info() -> &'static ::unity::il2cpp::MethodInfo {
264 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
265 }
266}
267
268#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
269impl FunctionCallExpression {
270 #[doc = "Direct (non-virtual) call to `FunctionCallExpression`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
271 pub unsafe fn compile(
272 this: impl ::core::convert::Into<::unity::IlInstance>,
273 bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
274 ) -> () {
275 let __mi = Self::compile_method_info();
276 let __inner: extern "C" fn(
277 ::unity::IlInstance,
278 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
279 ::unity::OptionalMethod,
280 ) -> () = ::core::mem::transmute(__mi.method_ptr);
281 __inner(this.into(), bc, ::core::option::Option::None)
282 }
283
284 #[doc = "Direct (non-virtual) call to `FunctionCallExpression`'s own `Eval`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
285 pub unsafe fn eval(
286 this: impl ::core::convert::Into<::unity::IlInstance>,
287 context: crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
288 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
289 let __mi = Self::eval_method_info();
290 let __inner: extern "C" fn(
291 ::unity::IlInstance,
292 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
293 ::unity::OptionalMethod,
294 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__mi.method_ptr);
295 __inner(this.into(), context, ::core::option::Option::None)
296 }
297}
298
299#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
300impl FunctionCallExpression {
301 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::expression::Expression, crate::moon_sharp::interpreter::tree::token::Token)` — overload selector"]
302 pub fn new(
303 lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext,
304 function: crate::moon_sharp::interpreter::tree::expression::Expression,
305 this_call_name: crate::moon_sharp::interpreter::tree::token::Token,
306 ) -> Self {
307 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
308 panic!(
309 "{}
310::{}
311 failed to instantiate",
312 ::core::stringify!(FunctionCallExpression),
313 ::core::stringify!(new),
314 )
315 });
316 <Self as IFunctionCallExpressionMethods>::ctor(this, lcontext, function, this_call_name);
317 this
318 }
319}
320
321#[cfg(feature = "moon_sharp-interpreter-tree-expressions-functioncallexpression")]
322#[doc(hidden)]
323pub mod prelude {
324 pub use super::{FunctionCallExpression, IFunctionCallExpression, IFunctionCallExpressionMethods};
325 #[cfg(feature = "moon_sharp-interpreter-tree-expression")]
326 pub use crate::moon_sharp::interpreter::tree::expression::IExpressionMethods;
327 #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
328 pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
329 #[cfg(feature = "system-object")]
330 pub use crate::system::object::IObjectMethods;
331 pub use crate::{
332 moon_sharp::interpreter::tree::{expression::IExpression, nodebase::INodeBase},
333 system::object::IObject,
334 };
335}