thunks.h File Reference

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

Go to the source code of this file.

Classes

class   GlobalThunk
class   ConstGlobalThunk
class   SystemGlobalThunk
class   LocalThunk
class   IndirectLocalThunk
class   ContextThunk
class   FreeThunk
class   IndirectFreeThunk
class   ClosureFreeThunk
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

Defines

#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_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

  visible_class (Thunk) class Thunk

Define 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)

Definition at line 54 of file thunks.h.

#define is_constglobalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CONST_GLOBAL_THUNK_TAG)

Definition at line 71 of file thunks.h.

#define is_systemglobalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_SYS_GLOBAL_THUNK_TAG)

Definition at line 91 of file thunks.h.

#define is_localthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_LOCAL_THUNK_TAG)

Definition at line 110 of file thunks.h.

#define is_contextthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CONTEXT_THUNK_TAG)

Definition at line 148 of file thunks.h.

#define is_freethunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_FREE_THUNK_TAG)

Definition at line 165 of file thunks.h.

#define is_propertythunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PROP_THUNK_TAG)

Definition at line 223 of file thunks.h.

#define is_indexthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_INDEX_THUNK_TAG)

Definition at line 253 of file thunks.h.

#define is_rolloutthunk (   v )    ((v)->_is_rolloutthunk())

Definition at line 273 of file thunks.h.

#define is_rolloutlocalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RO_LOCAL_THUNK_TAG)

Definition at line 294 of file thunks.h.

#define is_toollocalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_TOOL_LOCAL_THUNK_TAG)

Definition at line 328 of file thunks.h.

#define is_codeblocklocalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_CODEBLOCK_LOCAL_TAG)

Definition at line 350 of file thunks.h.

#define is_rcmenuitemthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_ITEM_THUNK_TAG)

Definition at line 368 of file thunks.h.

#define is_rcmenulocalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_LOCAL_THUNK_TAG)

Definition at line 389 of file thunks.h.

#define is_rcmenuthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_RCMENU_LOCAL_THUNK_TAG || (v)->tag == INTERNAL_RCMENU_ITEM_THUNK_TAG)

Definition at line 390 of file thunks.h.

#define is_pluginlocalthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PLUGIN_LOCAL_THUNK_TAG)

Definition at line 410 of file thunks.h.

#define is_pluginparamthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_PLUGIN_PARAM_THUNK_TAG)

Definition at line 435 of file thunks.h.

#define push_plugin (   _pi )
Value:
MSPlugin* _save_cp = thread_local(current_plugin);  \
    thread_local(current_plugin) = _pi;

Definition at line 448 of file thunks.h.

#define pop_plugin ( )    thread_local(current_plugin) = _save_cp;

Definition at line 452 of file thunks.h.

#define push_struct (   _struct )
Value:
Struct* _save_struct = thread_local(current_struct);    \
    thread_local(current_struct) = _struct;

Definition at line 455 of file thunks.h.

#define pop_struct ( )    thread_local(current_struct) = _save_struct;

Definition at line 459 of file thunks.h.

#define is_thunkref (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_THUNK_REF_TAG)

Definition at line 487 of file thunks.h.

#define is_derefthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_THUNK_DEREF_TAG)

Definition at line 502 of file thunks.h.

#define is_ownerthunk (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == INTERNAL_OWNER_THUNK_TAG)

Definition at line 520 of file thunks.h.


Function Documentation

visible_class ( Thunk  )

Definition at line 21 of file thunks.h.

            : public Value
{
public:
    Value*  name;
    BOOL    clear_container; // outer-level prop in a prop sequence, clear current_container when done

            classof_methods (Thunk, Value);
#   define  is_thunk(v) ((v)->_is_thunk())
#   define  is_indirect_thunk(v) ((v)->_is_indirect_thunk())
    BOOL    _is_thunk() { DbgAssert(!is_sourcepositionwrapper(this)); return TRUE; }
    ScripterExport void gc_trace();
    Thunk() : clear_container(FALSE), name(NULL) { }

    Thunk*  to_thunk() {return this; }
    virtual Thunk* make_free_thunk(int level) { return NULL; }
    void    assign(Value* val) { assign_vf(&val, 1); }

    ScripterExport Value*   get_property(Value** arg_list, int count);
    ScripterExport Value*   set_property(Value** arg_list, int count);
};