MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Capture

Method Capture

src/hx/gc/GcRegCapture.cpp:136–145  ·  view source on GitHub ↗

Put this function here so we can be reasonablly sure that "this" register and the 4 registers that may be used to pass args are on the stack.

Source from the content-addressed store, hash-verified

134// Put this function here so we can be reasonablly sure that "this" register and
135// the 4 registers that may be used to pass args are on the stack.
136int RegisterCapture::Capture(int *inTopOfStack,int **inBuf,int &outSize,int inMaxSize, int *inBottom)
137{
138 int size = ( (char *)inTopOfStack - (char *)inBottom )/sizeof(void *);
139 if (size>inMaxSize)
140 size = inMaxSize;
141 outSize = size;
142 if (size>0)
143 memcpy(inBuf,inBottom,size*sizeof(void*));
144 return 1;
145}
146
147
148RegisterCapture *gRegisterCaptureInstance = 0;

Callers

nothing calls this directly

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected