MCPcopy Create free account
hub / github.com/anjo76/angelscript / INSTRUCTION

Function INSTRUCTION

sdk/angelscript/source/as_context.cpp:2317–2358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2315// memory access functions
2316
2317 INSTRUCTION(asBC_PopPtr):
2318 // Pop a pointer from the stack
2319 l_sp += AS_PTR_SIZE;
2320 l_bc++;
2321 NEXT_INSTRUCTION();
2322
2323 INSTRUCTION(asBC_PshGPtr):
2324 // Replaces PGA + RDSPtr
2325 l_sp -= AS_PTR_SIZE;
2326 *(asPWORD*)l_sp = *(asPWORD*)asBC_PTRARG(l_bc);
2327 l_bc += 1 + AS_PTR_SIZE;
2328 NEXT_INSTRUCTION();
2329
2330 // Push a dword value on the stack
2331 INSTRUCTION(asBC_PshC4):
2332 --l_sp;
2333 *l_sp = asBC_DWORDARG(l_bc);
2334 l_bc += 2;
2335 NEXT_INSTRUCTION();
2336
2337 // Push the dword value of a variable on the stack
2338 INSTRUCTION(asBC_PshV4):
2339 --l_sp;
2340 *l_sp = *(l_fp - asBC_SWORDARG0(l_bc));
2341 l_bc++;
2342 NEXT_INSTRUCTION();
2343
2344 // Push the address of a variable on the stack
2345 INSTRUCTION(asBC_PSF):
2346 l_sp -= AS_PTR_SIZE;
2347 *(asPWORD*)l_sp = asPWORD(l_fp - asBC_SWORDARG0(l_bc));
2348 l_bc++;
2349 NEXT_INSTRUCTION();
2350
2351 // Swap the top 2 pointers on the stack
2352 INSTRUCTION(asBC_SwapPtr):
2353 {
2354 asPWORD p = *(asPWORD*)l_sp;
2355 *(asPWORD*)l_sp = *(asPWORD*)(l_sp+AS_PTR_SIZE);
2356 *(asPWORD*)(l_sp+AS_PTR_SIZE) = p;
2357 l_bc++;
2358 }
2359 NEXT_INSTRUCTION();
2360
2361 // Do a boolean not operation, modifying the value of the variable

Callers 2

ExecuteNextMethod · 0.85
BEGINFunction · 0.85

Calls 15

CallSystemFunctionFunction · 0.85
ScriptObject_ConstructFunction · 0.85
as_powuFunction · 0.85
powfFunction · 0.85
as_powi64Function · 0.85
as_powu64Function · 0.85
GetScriptFunctionMethod · 0.80
CallAllocMethod · 0.80
CallFreeMethod · 0.80
CallObjectMethodMethod · 0.80
DestroyListMethod · 0.80

Tested by

no test coverage detected