3ds Max C++ API Reference
Loading...
Searching...
No Matches
value_locals.h File Reference

Classes

class  MXS_Exit_ValueLocal_Scope
 Class that uses the RAII idiom to push/pop the thread local current_locals_frame. More...
class  MXS_Exit_ValueLocalArray_Scope
 Class that uses the RAII idiom to push/pop the thread local current_locals_frame. More...
class  ScopedValueTempArray
 Class that uses the RAII idiom to allocate and deallocate value temp arrays. More...
class  ScopedSaveCurrentFrames
 Class that uses the RAII idiom to save and restore the current frame data. More...
class  ScopedMaxScriptSEHandler
 Class that uses the RAII idiom to push/pop setting a structured error handler. More...
class  ScopedMaxScriptEvaluationContext
 Class that uses the RAII idiom to create a maxscript visible stack frame. More...
class  ScopedPushControl
 Class that uses the RAII idiom to push/pop the thread local current_controller. More...

Macros

#define one_value_local(n1)
#define one_value_local_noFrameValidate(n1)
#define one_typed_value_local(n1)
#define one_typed_value_local_noFrameValidate(n1)
#define two_value_locals(n1, n2)
#define two_typed_value_locals(n1, n2)
#define three_value_locals(n1, n2, n3)
#define three_typed_value_locals(n1, n2, n3)
#define four_value_locals(n1, n2, n3, n4)
#define four_typed_value_locals(n1, n2, n3, n4)
#define five_value_locals(n1, n2, n3, n4, n5)
#define five_typed_value_locals(n1, n2, n3, n4, n5)
#define six_value_locals(n1, n2, n3, n4, n5, n6)
#define six_typed_value_locals(n1, n2, n3, n4, n5, n6)
#define seven_value_locals(n1, n2, n3, n4, n5, n6, n7)
#define seven_typed_value_locals(n1, n2, n3, n4, n5, n6, n7)
#define eight_value_locals(n1, n2, n3, n4, n5, n6, n7, n8)
#define eight_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8)
#define nine_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9)
#define nine_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9)
#define ten_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
#define ten_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
#define eleven_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
#define eleven_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
#define twelve_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12)
#define twelve_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12)
#define thirteen_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13)
#define thirteen_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13)
#define fourteen_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14)
#define fourteen_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14)
#define value_local_array(var, count)
#define one_value_local_tls(n1)
#define one_value_local_noFrameValidate_tls(n1)
#define one_typed_value_local_tls(n1)
#define one_typed_value_local_noFrameValidate_tls(n1)
#define two_value_locals_tls(n1, n2)
#define two_typed_value_locals_tls(n1, n2)
#define three_value_locals_tls(n1, n2, n3)
#define three_typed_value_locals_tls(n1, n2, n3)
#define four_value_locals_tls(n1, n2, n3, n4)
#define four_typed_value_locals_tls(n1, n2, n3, n4)
#define five_value_locals_tls(n1, n2, n3, n4, n5)
#define five_typed_value_locals_tls(n1, n2, n3, n4, n5)
#define six_value_locals_tls(n1, n2, n3, n4, n5, n6)
#define six_typed_value_locals_tls(n1, n2, n3, n4, n5, n6)
#define seven_value_locals_tls(n1, n2, n3, n4, n5, n6, n7)
#define seven_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7)
#define eight_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8)
#define eight_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8)
#define nine_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9)
#define nine_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9)
#define ten_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
#define ten_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
#define eleven_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
#define eleven_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
#define twelve_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12)
#define twelve_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12)
#define thirteen_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13)
#define thirteen_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13)
#define fourteen_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14)
#define fourteen_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14)
#define value_local_array_tls(var, count)
#define return_value(r)
#define return_value_tls(r)
#define save_current_source()
#define restore_current_source()
#define save_current_source_no_pos()
#define restore_current_source_no_pos()
#define save_current_source_pos()
#define restore_current_source_pos()
#define save_current_source_to_frame()
#define save_current_source_to_frame_no_pos()
#define save_current_source_to_frame_pos()
#define save_current_source_to_frame_no_file()
#define save_current_source_tls()
#define restore_current_source_tls()
#define save_current_source_no_pos_tls()
#define restore_current_source_no_pos_tls()
#define save_current_source_pos_tls()
#define restore_current_source_pos_tls()
#define save_current_source_to_frame_tls()
#define save_current_source_to_frame_no_pos_tls()
#define save_current_source_to_frame_pos_tls()
#define save_current_source_to_frame_no_file_tls()

Functions

template<typename Type>
Type templated_return_value_fn (Type r)
template<typename Type>
Type templated_return_value_fn_tls (Type r, MAXScript_TLS *_tls)
ScripterExport void save_error_source_data (MAXScript_TLS *tls=nullptr)
ScripterExport void clear_error_source_data (MAXScript_TLS *tls=nullptr)

Macro Definition Documentation

◆ one_value_local

#define one_value_local ( n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define NULL
Definition autoptr.h:18
Definition value.h:108
51#define one_value_local(n1) \
52 struct { int count; Value** link; Value* n1; } vl = \
53 { 1, NULL, NULL }; \
54 vl.link = thread_local(current_locals_frame); \
55 thread_local(current_locals_frame) = (Value**)&vl; \
56 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ one_value_local_noFrameValidate

#define one_value_local_noFrameValidate ( n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false);
58#define one_value_local_noFrameValidate(n1) \
59 struct { int count; Value** link; Value* n1; } vl = \
60 { 1, NULL, NULL }; \
61 vl.link = thread_local(current_locals_frame); \
62 thread_local(current_locals_frame) = (Value**)&vl; \
63 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false);

◆ one_typed_value_local

#define one_typed_value_local ( n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
65#define one_typed_value_local(n1) \
66 struct { int count; Value** link; n1; } vl = \
67 { 1, NULL, NULL }; \
68 vl.link = thread_local(current_locals_frame); \
69 thread_local(current_locals_frame) = (Value**)&vl; \
70 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ one_typed_value_local_noFrameValidate

#define one_typed_value_local_noFrameValidate ( n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false);
72#define one_typed_value_local_noFrameValidate(n1) \
73 struct { int count; Value** link; n1; } vl = \
74 { 1, NULL, NULL }; \
75 vl.link = thread_local(current_locals_frame); \
76 thread_local(current_locals_frame) = (Value**)&vl; \
77 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false);

◆ two_value_locals

#define two_value_locals ( n1,
n2 )
Value:
struct { int count; Value** link; Value *n1, *n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
79#define two_value_locals(n1, n2) \
80 struct { int count; Value** link; Value *n1, *n2; } vl = \
81 { 2, NULL, NULL, NULL }; \
82 vl.link = thread_local(current_locals_frame); \
83 thread_local(current_locals_frame) = (Value**)&vl; \
84 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ two_typed_value_locals

#define two_typed_value_locals ( n1,
n2 )
Value:
struct { int count; Value** link; n1; n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
86#define two_typed_value_locals(n1, n2) \
87 struct { int count; Value** link; n1; n2; } vl = \
88 { 2, NULL, NULL, NULL }; \
89 vl.link = thread_local(current_locals_frame); \
90 thread_local(current_locals_frame) = (Value**)&vl; \
91 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ three_value_locals

#define three_value_locals ( n1,
n2,
n3 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
93#define three_value_locals(n1, n2, n3) \
94 struct { int count; Value** link; Value *n1, *n2, *n3; } vl = \
95 { 3, NULL, NULL, NULL, NULL }; \
96 vl.link = thread_local(current_locals_frame); \
97 thread_local(current_locals_frame) = (Value**)&vl; \
98 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ three_typed_value_locals

#define three_typed_value_locals ( n1,
n2,
n3 )
Value:
struct { int count; Value** link; n1; n2; n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
100#define three_typed_value_locals(n1, n2, n3) \
101 struct { int count; Value** link; n1; n2; n3; } vl = \
102 { 3, NULL, NULL, NULL, NULL }; \
103 vl.link = thread_local(current_locals_frame); \
104 thread_local(current_locals_frame) = (Value**)&vl; \
105 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ four_value_locals

#define four_value_locals ( n1,
n2,
n3,
n4 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
107#define four_value_locals(n1, n2, n3, n4) \
108 struct { int count; Value** link; Value *n1, *n2, *n3, *n4; } vl = \
109 { 4, NULL, NULL, NULL, NULL, NULL }; \
110 vl.link = thread_local(current_locals_frame); \
111 thread_local(current_locals_frame) = (Value**)&vl; \
112 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ four_typed_value_locals

#define four_typed_value_locals ( n1,
n2,
n3,
n4 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
114#define four_typed_value_locals(n1, n2, n3, n4) \
115 struct { int count; Value** link; n1; n2; n3; n4; } vl = \
116 { 4, NULL, NULL, NULL, NULL, NULL }; \
117 vl.link = thread_local(current_locals_frame); \
118 thread_local(current_locals_frame) = (Value**)&vl; \
119 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ five_value_locals

#define five_value_locals ( n1,
n2,
n3,
n4,
n5 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
121#define five_value_locals(n1, n2, n3, n4, n5) \
122 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5; } vl = \
123 { 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
124 vl.link = thread_local(current_locals_frame); \
125 thread_local(current_locals_frame) = (Value**)&vl; \
126 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ five_typed_value_locals

#define five_typed_value_locals ( n1,
n2,
n3,
n4,
n5 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
128#define five_typed_value_locals(n1, n2, n3, n4, n5) \
129 struct { int count; Value** link; n1; n2; n3; n4; n5; } vl = \
130 { 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
131 vl.link = thread_local(current_locals_frame); \
132 thread_local(current_locals_frame) = (Value**)&vl; \
133 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ six_value_locals

#define six_value_locals ( n1,
n2,
n3,
n4,
n5,
n6 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
135#define six_value_locals(n1, n2, n3, n4, n5, n6) \
136 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6; } vl = \
137 { 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
138 vl.link = thread_local(current_locals_frame); \
139 thread_local(current_locals_frame) = (Value**)&vl; \
140 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ six_typed_value_locals

#define six_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
142#define six_typed_value_locals(n1, n2, n3, n4, n5, n6) \
143 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; } vl = \
144 { 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
145 vl.link = thread_local(current_locals_frame); \
146 thread_local(current_locals_frame) = (Value**)&vl; \
147 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ seven_value_locals

#define seven_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
149#define seven_value_locals(n1, n2, n3, n4, n5, n6, n7) \
150 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7; } vl = \
151 { 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
152 vl.link = thread_local(current_locals_frame); \
153 thread_local(current_locals_frame) = (Value**)&vl; \
154 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ seven_typed_value_locals

#define seven_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
156#define seven_typed_value_locals(n1, n2, n3, n4, n5, n6, n7) \
157 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; } vl = \
158 { 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
159 vl.link = thread_local(current_locals_frame); \
160 thread_local(current_locals_frame) = (Value**)&vl; \
161 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ eight_value_locals

#define eight_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
163#define eight_value_locals(n1, n2, n3, n4, n5, n6, n7, n8) \
164 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8; } vl = \
165 { 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
166 vl.link = thread_local(current_locals_frame); \
167 thread_local(current_locals_frame) = (Value**)&vl; \
168 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ eight_typed_value_locals

#define eight_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
170#define eight_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8) \
171 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; } vl = \
172 { 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
173 vl.link = thread_local(current_locals_frame); \
174 thread_local(current_locals_frame) = (Value**)&vl; \
175 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ nine_value_locals

#define nine_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
177#define nine_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9) \
178 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9; } vl = \
179 { 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
180 vl.link = thread_local(current_locals_frame); \
181 thread_local(current_locals_frame) = (Value**)&vl; \
182 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ nine_typed_value_locals

#define nine_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
184#define nine_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9) \
185 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; } vl = \
186 { 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
187 vl.link = thread_local(current_locals_frame); \
188 thread_local(current_locals_frame) = (Value**)&vl; \
189 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ ten_value_locals

#define ten_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
191#define ten_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) \
192 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10; } vl = \
193 { 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
194 vl.link = thread_local(current_locals_frame); \
195 thread_local(current_locals_frame) = (Value**)&vl; \
196 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ ten_typed_value_locals

#define ten_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
198#define ten_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) \
199 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; } vl = \
200 { 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
201 vl.link = thread_local(current_locals_frame); \
202 thread_local(current_locals_frame) = (Value**)&vl; \
203 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ eleven_value_locals

#define eleven_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
205#define eleven_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11) \
206 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11; } vl = \
207 { 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
208 vl.link = thread_local(current_locals_frame); \
209 thread_local(current_locals_frame) = (Value**)&vl; \
210 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ eleven_typed_value_locals

#define eleven_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
212#define eleven_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11) \
213 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; } vl = \
214 { 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
215 vl.link = thread_local(current_locals_frame); \
216 thread_local(current_locals_frame) = (Value**)&vl; \
217 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ twelve_value_locals

#define twelve_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12; } vl = \
{ 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
219#define twelve_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12) \
220 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12; } vl = \
221 { 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
222 vl.link = thread_local(current_locals_frame); \
223 thread_local(current_locals_frame) = (Value**)&vl; \
224 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ twelve_typed_value_locals

#define twelve_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; } vl = \
{ 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
226#define twelve_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12) \
227 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; } vl = \
228 { 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
229 vl.link = thread_local(current_locals_frame); \
230 thread_local(current_locals_frame) = (Value**)&vl; \
231 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ thirteen_value_locals

#define thirteen_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13; } vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
233#define thirteen_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13) \
234 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13; } vl = \
235 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
236 vl.link = thread_local(current_locals_frame); \
237 thread_local(current_locals_frame) = (Value**)&vl; \
238 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ thirteen_typed_value_locals

#define thirteen_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; } vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
240#define thirteen_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13) \
241 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; } vl = \
242 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
243 vl.link = thread_local(current_locals_frame); \
244 thread_local(current_locals_frame) = (Value**)&vl; \
245 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ fourteen_value_locals

#define fourteen_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13,
n14 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13, *n14; } vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
247#define fourteen_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14) \
248 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13, *n14; } vl = \
249 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
250 vl.link = thread_local(current_locals_frame); \
251 thread_local(current_locals_frame) = (Value**)&vl; \
252 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ fourteen_typed_value_locals

#define fourteen_typed_value_locals ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13,
n14 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; n14; } vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
254#define fourteen_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14) \
255 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; n14; } vl = \
256 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
257 vl.link = thread_local(current_locals_frame); \
258 thread_local(current_locals_frame) = (Value**)&vl; \
259 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ value_local_array

#define value_local_array ( var,
count )
Value:
MAXScript_TLS* _## var ##_tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index); \
void* _## var ##_alloc_ptr = _malloca(((count) + 2) * sizeof(Value*)); \
var = &((Value**)_## var ##_alloc_ptr)[2]; \
memset(var, 0, (count) * sizeof(Value*)); \
var[-2] = (Value*)(static_cast<INT_PTR>(count)); \
var[-1] = (Value*)_## var ##_tls->current_locals_frame; \
_## var ##_tls->current_locals_frame = &var[-2]; \
MXS_Exit_ValueLocalArray_Scope _## var ##_Exit_ValueLocal_Scope(_## var ##_alloc_ptr, _## var ##_tls);
ScripterExport int thread_locals_index
Class that uses the RAII idiom to push/pop the thread local current_locals_frame.
Definition value_locals.h:39
Definition MAXScript_TLS.h:38
267#define value_local_array(var, count) \
268 MAXScript_TLS* _## var ##_tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index); \
269 void* _## var ##_alloc_ptr = _malloca(((count) + 2) * sizeof(Value*)); \
270 var = &((Value**)_## var ##_alloc_ptr)[2]; \
271 memset(var, 0, (count) * sizeof(Value*)); \
272 var[-2] = (Value*)(static_cast<INT_PTR>(count)); \
273 var[-1] = (Value*)_## var ##_tls->current_locals_frame; \
274 _## var ##_tls->current_locals_frame = &var[-2]; \
275 MXS_Exit_ValueLocalArray_Scope _## var ##_Exit_ValueLocal_Scope(_## var ##_alloc_ptr, _## var ##_tls);

◆ one_value_local_tls

#define one_value_local_tls ( n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
280#define one_value_local_tls(n1) \
281 struct { int count; Value** link; Value* n1; } vl = \
282 { 1, NULL, NULL }; \
283 vl.link = _tls->current_locals_frame; \
284 _tls->current_locals_frame = (Value**)&vl; \
285 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ one_value_local_noFrameValidate_tls

#define one_value_local_noFrameValidate_tls ( n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false, _tls);
287#define one_value_local_noFrameValidate_tls(n1) \
288 struct { int count; Value** link; Value* n1; } vl = \
289 { 1, NULL, NULL }; \
290 vl.link = _tls->current_locals_frame; \
291 _tls->current_locals_frame = (Value**)&vl; \
292 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false, _tls);

◆ one_typed_value_local_tls

#define one_typed_value_local_tls ( n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
294#define one_typed_value_local_tls(n1) \
295 struct { int count; Value** link; n1; } vl = \
296 { 1, NULL, NULL }; \
297 vl.link = _tls->current_locals_frame; \
298 _tls->current_locals_frame = (Value**)&vl; \
299 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ one_typed_value_local_noFrameValidate_tls

#define one_typed_value_local_noFrameValidate_tls ( n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false, _tls);
301#define one_typed_value_local_noFrameValidate_tls(n1) \
302 struct { int count; Value** link; n1; } vl = \
303 { 1, NULL, NULL }; \
304 vl.link = _tls->current_locals_frame; \
305 _tls->current_locals_frame = (Value**)&vl; \
306 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false, _tls);

◆ two_value_locals_tls

#define two_value_locals_tls ( n1,
n2 )
Value:
struct { int count; Value** link; Value *n1, *n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
308#define two_value_locals_tls(n1, n2) \
309 struct { int count; Value** link; Value *n1, *n2; } vl = \
310 { 2, NULL, NULL, NULL }; \
311 vl.link = _tls->current_locals_frame; \
312 _tls->current_locals_frame = (Value**)&vl; \
313 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ two_typed_value_locals_tls

#define two_typed_value_locals_tls ( n1,
n2 )
Value:
struct { int count; Value** link; n1; n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
315#define two_typed_value_locals_tls(n1, n2) \
316 struct { int count; Value** link; n1; n2; } vl = \
317 { 2, NULL, NULL, NULL }; \
318 vl.link = _tls->current_locals_frame; \
319 _tls->current_locals_frame = (Value**)&vl; \
320 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ three_value_locals_tls

#define three_value_locals_tls ( n1,
n2,
n3 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
322#define three_value_locals_tls(n1, n2, n3) \
323 struct { int count; Value** link; Value *n1, *n2, *n3; } vl = \
324 { 3, NULL, NULL, NULL, NULL }; \
325 vl.link = _tls->current_locals_frame; \
326 _tls->current_locals_frame = (Value**)&vl; \
327 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ three_typed_value_locals_tls

#define three_typed_value_locals_tls ( n1,
n2,
n3 )
Value:
struct { int count; Value** link; n1; n2; n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
329#define three_typed_value_locals_tls(n1, n2, n3) \
330 struct { int count; Value** link; n1; n2; n3; } vl = \
331 { 3, NULL, NULL, NULL, NULL }; \
332 vl.link = _tls->current_locals_frame; \
333 _tls->current_locals_frame = (Value**)&vl; \
334 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ four_value_locals_tls

#define four_value_locals_tls ( n1,
n2,
n3,
n4 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
336#define four_value_locals_tls(n1, n2, n3, n4) \
337 struct { int count; Value** link; Value *n1, *n2, *n3, *n4; } vl = \
338 { 4, NULL, NULL, NULL, NULL, NULL }; \
339 vl.link = _tls->current_locals_frame; \
340 _tls->current_locals_frame = (Value**)&vl; \
341 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ four_typed_value_locals_tls

#define four_typed_value_locals_tls ( n1,
n2,
n3,
n4 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
343#define four_typed_value_locals_tls(n1, n2, n3, n4) \
344 struct { int count; Value** link; n1; n2; n3; n4; } vl = \
345 { 4, NULL, NULL, NULL, NULL, NULL }; \
346 vl.link = _tls->current_locals_frame; \
347 _tls->current_locals_frame = (Value**)&vl; \
348 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ five_value_locals_tls

#define five_value_locals_tls ( n1,
n2,
n3,
n4,
n5 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
350#define five_value_locals_tls(n1, n2, n3, n4, n5) \
351 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5; } vl = \
352 { 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
353 vl.link = _tls->current_locals_frame; \
354 _tls->current_locals_frame = (Value**)&vl; \
355 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ five_typed_value_locals_tls

#define five_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
357#define five_typed_value_locals_tls(n1, n2, n3, n4, n5) \
358 struct { int count; Value** link; n1; n2; n3; n4; n5; } vl = \
359 { 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
360 vl.link = _tls->current_locals_frame; \
361 _tls->current_locals_frame = (Value**)&vl; \
362 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ six_value_locals_tls

#define six_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
364#define six_value_locals_tls(n1, n2, n3, n4, n5, n6) \
365 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6; } vl = \
366 { 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
367 vl.link = _tls->current_locals_frame; \
368 _tls->current_locals_frame = (Value**)&vl; \
369 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ six_typed_value_locals_tls

#define six_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
371#define six_typed_value_locals_tls(n1, n2, n3, n4, n5, n6) \
372 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; } vl = \
373 { 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
374 vl.link = _tls->current_locals_frame; \
375 _tls->current_locals_frame = (Value**)&vl; \
376 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ seven_value_locals_tls

#define seven_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
378#define seven_value_locals_tls(n1, n2, n3, n4, n5, n6, n7) \
379 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7; } vl = \
380 { 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
381 vl.link = _tls->current_locals_frame; \
382 _tls->current_locals_frame = (Value**)&vl; \
383 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ seven_typed_value_locals_tls

#define seven_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
385#define seven_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7) \
386 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; } vl = \
387 { 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
388 vl.link = _tls->current_locals_frame; \
389 _tls->current_locals_frame = (Value**)&vl; \
390 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ eight_value_locals_tls

#define eight_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
392#define eight_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8) \
393 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8; } vl = \
394 { 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
395 vl.link = _tls->current_locals_frame; \
396 _tls->current_locals_frame = (Value**)&vl; \
397 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ eight_typed_value_locals_tls

#define eight_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
399#define eight_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8) \
400 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; } vl = \
401 { 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
402 vl.link = _tls->current_locals_frame; \
403 _tls->current_locals_frame = (Value**)&vl; \
404 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ nine_value_locals_tls

#define nine_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
406#define nine_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9) \
407 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9; } vl = \
408 { 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
409 vl.link = _tls->current_locals_frame; \
410 _tls->current_locals_frame = (Value**)&vl; \
411 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ nine_typed_value_locals_tls

#define nine_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
413#define nine_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9) \
414 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; } vl = \
415 { 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
416 vl.link = _tls->current_locals_frame; \
417 _tls->current_locals_frame = (Value**)&vl; \
418 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ ten_value_locals_tls

#define ten_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
420#define ten_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) \
421 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10; } vl = \
422 { 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
423 vl.link = _tls->current_locals_frame; \
424 _tls->current_locals_frame = (Value**)&vl; \
425 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ ten_typed_value_locals_tls

#define ten_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
427#define ten_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) \
428 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; } vl = \
429 { 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
430 vl.link = _tls->current_locals_frame; \
431 _tls->current_locals_frame = (Value**)&vl; \
432 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ eleven_value_locals_tls

#define eleven_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
434#define eleven_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11) \
435 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11; } vl = \
436 { 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
437 vl.link = _tls->current_locals_frame; \
438 _tls->current_locals_frame = (Value**)&vl; \
439 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ eleven_typed_value_locals_tls

#define eleven_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
441#define eleven_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11) \
442 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; } vl = \
443 { 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
444 vl.link = _tls->current_locals_frame; \
445 _tls->current_locals_frame = (Value**)&vl; \
446 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);

◆ twelve_value_locals_tls

#define twelve_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12; } vl = \
{ 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
448#define twelve_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12) \
449 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12; } vl = \
450 { 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
451 vl.link = thread_local(current_locals_frame); \
452 _tls->current_locals_frame = (Value**)&vl; \
453 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ twelve_typed_value_locals_tls

#define twelve_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; } vl = \
{ 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
455#define twelve_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12) \
456 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; } vl = \
457 { 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
458 vl.link = thread_local(current_locals_frame); \
459 _tls->current_locals_frame = (Value**)&vl; \
460 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ thirteen_value_locals_tls

#define thirteen_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13; } vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
462#define thirteen_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13) \
463 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13; } vl = \
464 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
465 vl.link = thread_local(current_locals_frame); \
466 _tls->current_locals_frame = (Value**)&vl; \
467 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ thirteen_typed_value_locals_tls

#define thirteen_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; } vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
469#define thirteen_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13) \
470 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; } vl = \
471 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
472 vl.link = thread_local(current_locals_frame); \
473 _tls->current_locals_frame = (Value**)&vl; \
474 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ fourteen_value_locals_tls

#define fourteen_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13,
n14 )
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13, *n14;} vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
476#define fourteen_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14) \
477 struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11, *n12, *n13, *n14;} vl = \
478 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
479 vl.link = thread_local(current_locals_frame); \
480 _tls->current_locals_frame = (Value**)&vl; \
481 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ fourteen_typed_value_locals_tls

#define fourteen_typed_value_locals_tls ( n1,
n2,
n3,
n4,
n5,
n6,
n7,
n8,
n9,
n10,
n11,
n12,
n13,
n14 )
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; n14;} vl = \
{ 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
483#define fourteen_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14) \
484 struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; n12; n13; n14;} vl = \
485 { 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
486 vl.link = thread_local(current_locals_frame); \
487 _tls->current_locals_frame = (Value**)&vl; \
488 MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;

◆ value_local_array_tls

#define value_local_array_tls ( var,
count )
Value:
void* _## var ##_alloc_ptr = _malloca(((count) + 2) * sizeof(Value*)); \
var = &((Value**)_## var ##_alloc_ptr)[2]; \
memset(var, 0, (count) * sizeof(Value*)); \
var[-2] = (Value*)(static_cast<INT_PTR>(count)); \
var[-1] = (Value*)_tls->current_locals_frame; \
_tls->current_locals_frame = &var[-2]; \
MXS_Exit_ValueLocalArray_Scope _## var ##_Exit_ValueLocal_Scope(_## var ##_alloc_ptr, _tls);
490#define value_local_array_tls(var, count) \
491 void* _## var ##_alloc_ptr = _malloca(((count) + 2) * sizeof(Value*)); \
492 var = &((Value**)_## var ##_alloc_ptr)[2]; \
493 memset(var, 0, (count) * sizeof(Value*)); \
494 var[-2] = (Value*)(static_cast<INT_PTR>(count)); \
495 var[-1] = (Value*)_tls->current_locals_frame; \
496 _tls->current_locals_frame = &var[-2]; \
497 MXS_Exit_ValueLocalArray_Scope _## var ##_Exit_ValueLocal_Scope(_## var ##_alloc_ptr, _tls);

◆ return_value

#define return_value ( r)
Value:
Type templated_return_value_fn(Type r)
Definition value_locals.h:503

◆ return_value_tls

#define return_value_tls ( r)
Value:
Type templated_return_value_fn_tls(Type r, MAXScript_TLS *_tls)
Definition value_locals.h:517

◆ save_current_source

#define save_current_source ( )
Value:
Value* _save_source = thread_local(source_file); \
MSZipPackage* _save_pkg = thread_local(current_pkg); \
unsigned int _save_pos = thread_local(source_pos); \
unsigned int _save_line = thread_local(source_line); \
DWORD _save_flags = thread_local(source_flags);
Definition mxsZipPackage.h:40
628#define save_current_source() \
629 Value* _save_source = thread_local(source_file); \
630 MSZipPackage* _save_pkg = thread_local(current_pkg); \
631 unsigned int _save_pos = thread_local(source_pos); \
632 unsigned int _save_line = thread_local(source_line); \
633 DWORD _save_flags = thread_local(source_flags);

◆ restore_current_source

#define restore_current_source ( )
Value:
{ \
thread_local(source_file) = _save_source; \
thread_local(current_pkg) = _save_pkg; \
thread_local(source_pos) = _save_pos; \
thread_local(source_line) = _save_line; \
thread_local(source_flags) = _save_flags;}
635#define restore_current_source() { \
636 thread_local(source_file) = _save_source; \
637 thread_local(current_pkg) = _save_pkg; \
638 thread_local(source_pos) = _save_pos; \
639 thread_local(source_line) = _save_line; \
640 thread_local(source_flags) = _save_flags;}

◆ save_current_source_no_pos

#define save_current_source_no_pos ( )
Value:
Value* _save_source = thread_local(source_file); \
MSZipPackage* _save_pkg = thread_local(current_pkg); \
DWORD _save_flags = thread_local(source_flags);
642#define save_current_source_no_pos() \
643 Value* _save_source = thread_local(source_file); \
644 MSZipPackage* _save_pkg = thread_local(current_pkg); \
645 DWORD _save_flags = thread_local(source_flags);

◆ restore_current_source_no_pos

#define restore_current_source_no_pos ( )
Value:
{ \
thread_local(source_file) = _save_source; \
thread_local(current_pkg) = _save_pkg; \
thread_local(source_flags) = _save_flags;}
647#define restore_current_source_no_pos() { \
648 thread_local(source_file) = _save_source; \
649 thread_local(current_pkg) = _save_pkg; \
650 thread_local(source_flags) = _save_flags;}

◆ save_current_source_pos

#define save_current_source_pos ( )
Value:
unsigned int _save_pos = thread_local(source_pos); \
unsigned int _save_line = thread_local(source_line); \
DWORD _save_flags = thread_local(source_flags);
652#define save_current_source_pos() \
653 unsigned int _save_pos = thread_local(source_pos); \
654 unsigned int _save_line = thread_local(source_line); \
655 DWORD _save_flags = thread_local(source_flags);

◆ restore_current_source_pos

#define restore_current_source_pos ( )
Value:
{ \
thread_local(source_pos) = _save_pos; \
thread_local(source_line) = _save_line; \
thread_local(source_flags) = _save_flags;}
657#define restore_current_source_pos() { \
658 thread_local(source_pos) = _save_pos; \
659 thread_local(source_line) = _save_line; \
660 thread_local(source_flags) = _save_flags;}

◆ save_current_source_to_frame

#define save_current_source_to_frame ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[3] = thread_local(source_file); \
if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
if (_frame) _frame[8] = (Value*)thread_local(source_line); \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(thread_local(source_flags));}
662#define save_current_source_to_frame() { \
663 Value** _frame = thread_local(current_scan_frame); \
664 if (_frame) _frame[3] = thread_local(source_file); \
665 if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
666 if (_frame) _frame[8] = (Value*)thread_local(source_line); \
667 if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(thread_local(source_flags));}

◆ save_current_source_to_frame_no_pos

#define save_current_source_to_frame_no_pos ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[3] = thread_local(source_file); \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(thread_local(source_flags));}
669#define save_current_source_to_frame_no_pos() { \
670 Value** _frame = thread_local(current_scan_frame); \
671 if (_frame) _frame[3] = thread_local(source_file); \
672 if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(thread_local(source_flags));}

◆ save_current_source_to_frame_pos

#define save_current_source_to_frame_pos ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
if (_frame) _frame[8] = (Value*)thread_local(source_line);}
674#define save_current_source_to_frame_pos() { \
675 Value** _frame = thread_local(current_scan_frame); \
676 if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
677 if (_frame) _frame[8] = (Value*)thread_local(source_line);}

◆ save_current_source_to_frame_no_file

#define save_current_source_to_frame_no_file ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
if (_frame) _frame[8] = (Value*)thread_local(source_line);}
679#define save_current_source_to_frame_no_file() { \
680 Value** _frame = thread_local(current_scan_frame); \
681 if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
682 if (_frame) _frame[8] = (Value*)thread_local(source_line);}

◆ save_current_source_tls

#define save_current_source_tls ( )
Value:
Value* _save_source = _tls->source_file; \
MSZipPackage* _save_pkg = _tls->current_pkg; \
unsigned int _save_pos = _tls->source_pos; \
unsigned int _save_line = _tls->source_line; \
DWORD _save_flags = _tls->source_flags;
687#define save_current_source_tls() \
688 Value* _save_source = _tls->source_file; \
689 MSZipPackage* _save_pkg = _tls->current_pkg; \
690 unsigned int _save_pos = _tls->source_pos; \
691 unsigned int _save_line = _tls->source_line; \
692 DWORD _save_flags = _tls->source_flags;

◆ restore_current_source_tls

#define restore_current_source_tls ( )
Value:
{ \
_tls->source_file = _save_source; \
_tls->current_pkg = _save_pkg; \
_tls->source_pos = _save_pos; \
_tls->source_line = _save_line; \
_tls->source_flags = _save_flags;}
694#define restore_current_source_tls() { \
695 _tls->source_file = _save_source; \
696 _tls->current_pkg = _save_pkg; \
697 _tls->source_pos = _save_pos; \
698 _tls->source_line = _save_line; \
699 _tls->source_flags = _save_flags;}

◆ save_current_source_no_pos_tls

#define save_current_source_no_pos_tls ( )
Value:
Value* _save_source = _tls->source_file; \
MSZipPackage* _save_pkg = _tls->current_pkg; \
DWORD _save_flags = _tls->source_flags;
701#define save_current_source_no_pos_tls() \
702 Value* _save_source = _tls->source_file; \
703 MSZipPackage* _save_pkg = _tls->current_pkg; \
704 DWORD _save_flags = _tls->source_flags;

◆ restore_current_source_no_pos_tls

#define restore_current_source_no_pos_tls ( )
Value:
{ \
_tls->source_file = _save_source; \
_tls->current_pkg = _save_pkg; \
_tls->source_flags = _save_flags;}
706#define restore_current_source_no_pos_tls() { \
707 _tls->source_file = _save_source; \
708 _tls->current_pkg = _save_pkg; \
709 _tls->source_flags = _save_flags;}

◆ save_current_source_pos_tls

#define save_current_source_pos_tls ( )
Value:
unsigned int _save_pos = _tls->source_pos; \
unsigned int _save_line = _tls->source_line; \
DWORD _save_flags = _tls->source_flags;
711#define save_current_source_pos_tls() \
712 unsigned int _save_pos = _tls->source_pos; \
713 unsigned int _save_line = _tls->source_line; \
714 DWORD _save_flags = _tls->source_flags;

◆ restore_current_source_pos_tls

#define restore_current_source_pos_tls ( )
Value:
{ \
_tls->source_pos = _save_pos; \
_tls->source_line = _save_line; \
_tls->source_flags = _save_flags;}
716#define restore_current_source_pos_tls() { \
717 _tls->source_pos = _save_pos; \
718 _tls->source_line = _save_line; \
719 _tls->source_flags = _save_flags;}

◆ save_current_source_to_frame_tls

#define save_current_source_to_frame_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[3] = _tls->source_file; \
if (_frame) _frame[4] = (Value*)_tls->source_pos; \
if (_frame) _frame[8] = (Value*)_tls->source_line; \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(_tls->source_flags);}
721#define save_current_source_to_frame_tls() { \
722 Value** _frame = _tls->current_scan_frame; \
723 if (_frame) _frame[3] = _tls->source_file; \
724 if (_frame) _frame[4] = (Value*)_tls->source_pos; \
725 if (_frame) _frame[8] = (Value*)_tls->source_line; \
726 if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(_tls->source_flags);}

◆ save_current_source_to_frame_no_pos_tls

#define save_current_source_to_frame_no_pos_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[3] = _tls->source_file; \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(_tls->source_flags);}
728#define save_current_source_to_frame_no_pos_tls() { \
729 Value** _frame = _tls->current_scan_frame; \
730 if (_frame) _frame[3] = _tls->source_file; \
731 if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(_tls->source_flags);}

◆ save_current_source_to_frame_pos_tls

#define save_current_source_to_frame_pos_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[4] = (Value*)_tls->source_pos; \
if (_frame) _frame[8] = (Value*)_tls->source_line;}
733#define save_current_source_to_frame_pos_tls() { \
734 Value** _frame = _tls->current_scan_frame; \
735 if (_frame) _frame[4] = (Value*)_tls->source_pos; \
736 if (_frame) _frame[8] = (Value*)_tls->source_line;}

◆ save_current_source_to_frame_no_file_tls

#define save_current_source_to_frame_no_file_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[4] = (Value*)_tls->source_pos; \
if (_frame) _frame[8] = (Value*)_tls->source_line;}
738#define save_current_source_to_frame_no_file_tls() { \
739 Value** _frame = _tls->current_scan_frame; \
740 if (_frame) _frame[4] = (Value*)_tls->source_pos; \
741 if (_frame) _frame[8] = (Value*)_tls->source_line;}

Function Documentation

◆ templated_return_value_fn()

template<typename Type>
Type templated_return_value_fn ( Type r)
504{
505 thread_local(current_result) = r;
506 return r;
507}

◆ templated_return_value_fn_tls()

template<typename Type>
Type templated_return_value_fn_tls ( Type r,
MAXScript_TLS * _tls )
518{
519 _tls->current_result = r;
520 return r;
521}

◆ save_error_source_data()

ScripterExport void save_error_source_data ( MAXScript_TLS * tls = nullptr)

◆ clear_error_source_data()

ScripterExport void clear_error_source_data ( MAXScript_TLS * tls = nullptr)