maxscript/compiler/thunks.h File Reference

thunks.h File Reference
+ This reference page is linked to from the following overview topics:

#include "../kernel/value.h"
#include "../foundation/streams.h"
#include "../ui/rollouts.h"
#include "../ui/uiextend.h"

Classes

class  GlobalThunk
 
class  ConstGlobalThunk
 
class  SystemGlobalThunk
 
class  LocalThunk
 
class  IndirectLocalThunk
 
class  ContextThunk
 
class  FreeThunk
 
class  IndirectFreeThunk
 
class  PropertyThunk
 
class  FnCallPropertyThunk
 
class  IndexThunk
 
class  RolloutControlThunk
 
class  RolloutLocalThunk
 
class  ConstRolloutLocalThunk
 
class  ToolLocalThunk
 
class  CodeBlockLocalThunk
 
class  RCMenuItemThunk
 
class  RCMenuLocalThunk
 
class  PluginLocalThunk
 
class  ConstPluginLocalThunk
 
class  PluginParamThunk
 
class  StructMemberThunk
 
class  ThunkReference
 
class  DerefThunk
 
class  OwnerThunk
 

Macros

#define is_thunk(v)   ((v)->_is_thunk())
 
#define is_indirect_thunk(v)   ((v)->_is_indirect_thunk())
 
#define is_globalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_GLOBAL_THUNK_TAG)
 
#define is_constglobalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CONST_GLOBAL_THUNK_TAG)
 
#define is_systemglobalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_SYS_GLOBAL_THUNK_TAG)
 
#define is_localthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_LOCAL_THUNK_TAG)
 
#define is_contextthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CONTEXT_THUNK_TAG)
 
#define is_freethunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_FREE_THUNK_TAG)
 
#define is_propertythunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PROP_THUNK_TAG)
 
#define is_indexthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_INDEX_THUNK_TAG)
 
#define is_rolloutthunk(v)   ((v)->_is_rolloutthunk())
 
#define is_rolloutlocalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RO_LOCAL_THUNK_TAG)
 
#define is_toollocalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_TOOL_LOCAL_THUNK_TAG)
 
#define is_codeblocklocalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CODEBLOCK_LOCAL_TAG)
 
#define is_rcmenuitemthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_ITEM_THUNK_TAG)
 
#define is_rcmenulocalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_LOCAL_THUNK_TAG)
 
#define is_rcmenuthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_LOCAL_THUNK_TAG || (v)->tag == INTERNAL_RCMENU_ITEM_THUNK_TAG)
 
#define is_pluginlocalthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PLUGIN_LOCAL_THUNK_TAG)
 
#define is_pluginparamthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PLUGIN_PARAM_THUNK_TAG)
 
#define push_plugin(_pi)
 
#define pop_plugin()   thread_local(current_plugin) = _save_cp;
 
#define push_struct(_struct)
 
#define pop_struct()   thread_local(current_struct) = _save_struct;
 
#define is_structmemberthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_STRUCT_MEM_THUNK_TAG)
 
#define is_thunkref(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_THUNK_REF_TAG)
 
#define is_derefthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_THUNK_DEREF_TAG)
 
#define is_ownerthunk(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_OWNER_THUNK_TAG)
 

Functions

 classof_methods (Thunk, Value)
 
BOOL _is_thunk ()
 
ScripterExport void gc_trace ()
 
 Thunk ()
 
Thunkto_thunk ()
 
virtual Thunkmake_free_thunk (int level)
 
void assign (Value *val)
 
ScripterExport Valueget_property (Value **arg_list, int count)
 
ScripterExport Valueset_property (Value **arg_list, int count)
 

Variables

visible_class(Thunk) class
Thunk BOOL 
clear_container
 

Macro Definition Documentation

#define is_thunk (   v)    ((v)->_is_thunk())
#define is_indirect_thunk (   v)    ((v)->_is_indirect_thunk())
#define is_globalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_GLOBAL_THUNK_TAG)
#define is_constglobalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CONST_GLOBAL_THUNK_TAG)
#define is_systemglobalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_SYS_GLOBAL_THUNK_TAG)
#define is_localthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_LOCAL_THUNK_TAG)
#define is_contextthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CONTEXT_THUNK_TAG)
#define is_freethunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_FREE_THUNK_TAG)
#define is_propertythunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PROP_THUNK_TAG)
#define is_indexthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_INDEX_THUNK_TAG)
#define is_rolloutthunk (   v)    ((v)->_is_rolloutthunk())
#define is_rolloutlocalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RO_LOCAL_THUNK_TAG)
#define is_toollocalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_TOOL_LOCAL_THUNK_TAG)
#define is_codeblocklocalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CODEBLOCK_LOCAL_TAG)
#define is_rcmenuitemthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_ITEM_THUNK_TAG)
#define is_rcmenulocalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_LOCAL_THUNK_TAG)
#define is_rcmenuthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_LOCAL_THUNK_TAG || (v)->tag == INTERNAL_RCMENU_ITEM_THUNK_TAG)
#define is_pluginlocalthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PLUGIN_LOCAL_THUNK_TAG)
#define is_pluginparamthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PLUGIN_PARAM_THUNK_TAG)
#define push_plugin (   _pi)
Value:
MSPlugin* _save_cp = thread_local(current_plugin); \
thread_local(current_plugin) = _pi;
#define thread_local(x)
Definition: MAXScript_TLS.h:42
#define pop_plugin ( )    thread_local(current_plugin) = _save_cp;
#define push_struct (   _struct)
Value:
Struct* _save_struct = thread_local(current_struct); \
thread_local(current_struct) = _struct;
#define thread_local(x)
Definition: MAXScript_TLS.h:42
visible_class_debug_ok(StructDef) class StructDef friend Struct
Definition: structs.h:16
#define pop_struct ( )    thread_local(current_struct) = _save_struct;
#define is_structmemberthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_STRUCT_MEM_THUNK_TAG)
#define is_thunkref (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_THUNK_REF_TAG)
#define is_derefthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_THUNK_DEREF_TAG)
#define is_ownerthunk (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_OWNER_THUNK_TAG)

Function Documentation

classof_methods ( Thunk  ,
Value   
)
BOOL _is_thunk ( )
32 { DbgAssert(!is_sourcepositionwrapper(this)); return TRUE; }
#define DbgAssert(expr)
Definition: assert1.h:74
#define is_sourcepositionwrapper(v)
void gc_trace ( )
Thunk ( )
34 : clear_container(FALSE), name(NULL) { }
visible_class(Thunk) class Thunk BOOL clear_container
Definition: thunks.h:21
Value * name
Definition: structs.h:25
#define NULL
Definition: autoptr.h:20
Thunk* to_thunk ( )
36 {return this; }
virtual Thunk* make_free_thunk ( int  level)
virtual
37 { return NULL; }
#define NULL
Definition: autoptr.h:20
void assign ( Value val)
38 { assign_vf(&val, 1); }
Value * get_property ( Value **  arg_list,
int  count 
)
Value * set_property ( Value **  arg_list,
int  count 
)

Variable Documentation

visible_class (Thunk) class Thunk BOOL clear_container