engage/generated/moon_sharp/interpreter/tree/statements/
chunkstatement.rs1#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 moon_sharp::interpreter::tree::{
10 nodebase::{INodeBase, NodeBase},
11 statement::{IStatement, Statement},
12 },
13 system::object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/statements/chunkstatement/ChunkStatement.md"))]
17 #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Statements", name = "ChunkStatement")]
18 #[parent(crate::moon_sharp::interpreter::tree::statement::Statement)]
19 pub struct ChunkStatement {
20 #[offset(32)]
21 #[rename(name = "m_Block")]
22 pub m_block: crate::moon_sharp::interpreter::tree::statement::Statement,
23 #[offset(40)]
24 #[rename(name = "m_StackFrame")]
25 pub m_stack_frame: crate::moon_sharp::interpreter::execution::runtimescopeframe::RuntimeScopeFrame,
26 #[offset(48)]
27 #[rename(name = "m_Env")]
28 pub m_env: crate::moon_sharp::interpreter::symbolref::SymbolRef,
29 #[offset(56)]
30 #[rename(name = "m_VarArgs")]
31 pub m_var_args: crate::moon_sharp::interpreter::symbolref::SymbolRef,
32 }
33}
34
35#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement-types")]
36pub use __types::*;
37
38#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
39#[doc(hidden)]
40#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
41mod __ChunkStatement_unity_raw {
42 use super::*;
43 #[doc(hidden)]
44 #[allow(non_snake_case)]
45 pub mod __lookup_ctor {
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 &[<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext as ::unity::IlType>::il_type()];
50 ::unity::lookup::method_info_on_class_with_signature(<ChunkStatement as ::unity::ClassIdentity>::class(), ".ctor", 1, param_types, false)
51 });
52 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
53 match &*METHOD {
54 ::core::result::Result::Ok(mi) => *mi,
55 ::core::result::Result::Err(e) => {
56 panic!(
57 "method lookup failed: {}
58::{}
59: {}
60",
61 <ChunkStatement as ::unity::ClassIdentity>::NAME,
62 ".ctor",
63 e
64 )
65 },
66 }
67 }
68 }
69}
70
71#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
72pub trait IChunkStatementMethods: IChunkStatement {
73 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)` overload"]
74 fn ctor(self, lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>) -> () {
75 unsafe {
76 let __receiver = <ChunkStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
77 ::unity::il2cpp_call!(__ChunkStatement_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
78(ChunkStatement)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext))
79 }
80 }
81 #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
82 fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
83 unsafe {
84 let __receiver = <ChunkStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
85 {
86 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
87 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
88 panic!(
89 "unity: virtual slot {}
90 out of range (vtable len {}
91) on the runtime class behind {}
92 (method `{}
93`)",
94 4usize,
95 __vt.len(),
96 <ChunkStatement as ::unity::ClassIdentity>::NAME,
97 "Compile",
98 )
99 });
100 let __inner: extern "C" fn(
101 ChunkStatement,
102 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
103 ::unity::OptionalMethod,
104 ) -> () = ::core::mem::transmute(__vi.method_ptr);
105 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
106 __inner(__receiver, ::core::convert::Into::into(bc), __mi)
107 }
108 }
109 }
110 #[doc = "`CreateUpvalue(crate::moon_sharp::interpreter::execution::buildtimescope::BuildTimeScope, crate::moon_sharp::interpreter::symbolref::SymbolRef)` overload"]
111 fn create_upvalue(
112 self,
113 scope: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::buildtimescope::BuildTimeScope>,
114 symbol: impl ::core::convert::Into<crate::moon_sharp::interpreter::symbolref::SymbolRef>,
115 ) -> crate::moon_sharp::interpreter::symbolref::SymbolRef {
116 unsafe {
117 let __receiver = <ChunkStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
118 {
119 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
120 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
121 panic!(
122 "unity: virtual slot {}
123 out of range (vtable len {}
124) on the runtime class behind {}
125 (method `{}
126`)",
127 5usize,
128 __vt.len(),
129 <ChunkStatement as ::unity::ClassIdentity>::NAME,
130 "CreateUpvalue",
131 )
132 });
133 let __inner: extern "C" fn(
134 ChunkStatement,
135 crate::moon_sharp::interpreter::execution::buildtimescope::BuildTimeScope,
136 crate::moon_sharp::interpreter::symbolref::SymbolRef,
137 ::unity::OptionalMethod,
138 ) -> crate::moon_sharp::interpreter::symbolref::SymbolRef = ::core::mem::transmute(__vi.method_ptr);
139 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
140 __inner(__receiver, ::core::convert::Into::into(scope), ::core::convert::Into::into(symbol), __mi)
141 }
142 }
143 }
144}
145
146#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
147impl<__T: IChunkStatement> IChunkStatementMethods for __T {}
148
149#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
150impl ChunkStatement {
151 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
153 }
154
155 pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
157 }
158
159 pub fn create_upvalue_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
161 }
162}
163
164#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
165impl ChunkStatement {
166 #[doc = "Direct (non-virtual) call to `ChunkStatement`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
167 pub unsafe fn compile(
168 this: impl ::core::convert::Into<::unity::IlInstance>,
169 bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
170 ) -> () {
171 let __mi = Self::compile_method_info();
172 let __inner: extern "C" fn(
173 ::unity::IlInstance,
174 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
175 ::unity::OptionalMethod,
176 ) -> () = ::core::mem::transmute(__mi.method_ptr);
177 __inner(this.into(), bc, ::core::option::Option::None)
178 }
179
180 #[doc = "Direct (non-virtual) call to `ChunkStatement`'s own `CreateUpvalue`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
181 pub unsafe fn create_upvalue(
182 this: impl ::core::convert::Into<::unity::IlInstance>,
183 scope: crate::moon_sharp::interpreter::execution::buildtimescope::BuildTimeScope,
184 symbol: crate::moon_sharp::interpreter::symbolref::SymbolRef,
185 ) -> crate::moon_sharp::interpreter::symbolref::SymbolRef {
186 let __mi = Self::create_upvalue_method_info();
187 let __inner: extern "C" fn(
188 ::unity::IlInstance,
189 crate::moon_sharp::interpreter::execution::buildtimescope::BuildTimeScope,
190 crate::moon_sharp::interpreter::symbolref::SymbolRef,
191 ::unity::OptionalMethod,
192 ) -> crate::moon_sharp::interpreter::symbolref::SymbolRef = ::core::mem::transmute(__mi.method_ptr);
193 __inner(this.into(), scope, symbol, ::core::option::Option::None)
194 }
195}
196
197#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
198impl ChunkStatement {
199 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)` — overload selector"]
200 pub fn new(lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext) -> Self {
201 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
202 panic!(
203 "{}
204::{}
205 failed to instantiate",
206 ::core::stringify!(ChunkStatement),
207 ::core::stringify!(new),
208 )
209 });
210 <Self as IChunkStatementMethods>::ctor(this, lcontext);
211 this
212 }
213}
214
215#[cfg(feature = "moon_sharp-interpreter-tree-statements-chunkstatement")]
216#[doc(hidden)]
217pub mod prelude {
218 pub use super::{ChunkStatement, IChunkStatement, IChunkStatementMethods};
219 #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
220 pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
221 #[cfg(feature = "moon_sharp-interpreter-tree-statement")]
222 pub use crate::moon_sharp::interpreter::tree::statement::IStatementMethods;
223 #[cfg(feature = "system-object")]
224 pub use crate::system::object::IObjectMethods;
225 pub use crate::{
226 moon_sharp::interpreter::tree::{nodebase::INodeBase, statement::IStatement},
227 system::object::IObject,
228 };
229}