| 531 | paramCount++; |
| 532 | } |
| 533 | void AddExternal(VariableInfo *var) |
| 534 | { |
| 535 | if(!lastExternal) |
| 536 | { |
| 537 | firstExternal = lastExternal = (ExternalInfo*)functionPool.Allocate(sizeof(ExternalInfo)); |
| 538 | }else{ |
| 539 | lastExternal->next = (ExternalInfo*)functionPool.Allocate(sizeof(ExternalInfo)); |
| 540 | lastExternal = lastExternal->next; |
| 541 | } |
| 542 | memset(lastExternal, 0, sizeof(FunctionInfo::ExternalInfo)); |
| 543 | lastExternal->next = NULL; |
| 544 | lastExternal->variable = var; |
| 545 | lastExternal->closurePos = externalSize; |
| 546 | #ifdef _M_X64 |
| 547 | externalSize += 8 + (var->varType->size < 12 ? 12 : var->varType->size); // Pointer and a place for the union{variable, {pointer, size}} |
| 548 | #else |
| 549 | externalSize += 4 + (var->varType->size < 8 ? 8 : var->varType->size); // Pointer and a place for the union{variable, {pointer, size}} |
| 550 | #endif |
| 551 | externalCount++; |
| 552 | } |
| 553 | int address; // Address of the beginning of function inside bytecode |
| 554 | int codeSize; // Size of a function bytecode |
| 555 | void *funcPtr; // Address of the function in memory |
no test coverage detected