Coverage Report

Created: 2017-04-15 07:07

/home/travis/build/MoarVM/MoarVM/src/6model/reprs/MVMCallCapture.h
Line
Count
Source
1
/* Is this a capture that refers to the args area of an existing frame, or
2
 * a saved copy of a frame's args area? */
3
#define MVM_CALL_CAPTURE_MODE_USE   1
4
18.6k
#define MVM_CALL_CAPTURE_MODE_SAVE  2
5
6
/* Representation for a context in the VM. Holds an MVMFrame. */
7
struct MVMCallCaptureBody {
8
    /* Argument processing context. For use mode, it points to the context of
9
     * the frame in question. For save mode, we allocate a fresh one. */
10
    MVMArgProcContext *apc;
11
12
    /* The frame the ArgProcContext lives in, if we're in use mode. This
13
     * ensures the frame stays alive long enough. */
14
    MVMFrame *use_mode_frame;
15
16
    /* The effective MVMCallsite. This may be the original one, but in the
17
     * event of flattening will describe the flattened outcome. */
18
    MVMCallsite *effective_callsite;
19
20
    /* Use or save mode? */
21
    MVMuint8 mode;
22
23
    MVMuint8 owns_callsite;
24
};
25
struct MVMCallCapture {
26
    MVMObject common;
27
    MVMCallCaptureBody body;
28
};
29
30
/* Function for REPR setup. */
31
const MVMREPROps * MVMCallCapture_initialize(MVMThreadContext *tc);
32
33
MVMint64 MVM_capture_pos_primspec(MVMThreadContext *tc, MVMObject *capture, MVMint64 index);