Fixed the code style in *.c files to two spaces indentation and add a linter named funstx to Fun. (0.39.0)
This commit is contained in:
parent
33001a7ad2
commit
03b2532474
237 changed files with 17550 additions and 13911 deletions
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @file load_global.c
|
||||
* @file load_global.c
|
||||
* @brief Implements the OP_LOAD_GLOBAL opcode for loading global variables in the VM.
|
||||
*
|
||||
* This file handles the OP_LOAD_GLOBAL instruction, which loads a global variable
|
||||
|
|
@ -31,14 +31,14 @@
|
|||
*/
|
||||
|
||||
case OP_LOAD_GLOBAL: {
|
||||
int idx = inst.operand;
|
||||
if (idx < 0 || idx >= MAX_GLOBALS) {
|
||||
fprintf(stderr, "Runtime error: global index out of range\n");
|
||||
exit(1);
|
||||
}
|
||||
int idx = inst.operand;
|
||||
if (idx < 0 || idx >= MAX_GLOBALS) {
|
||||
fprintf(stderr, "Runtime error: global index out of range\n");
|
||||
exit(1);
|
||||
}
|
||||
#ifdef FUN_DEBUG
|
||||
fprintf(stderr, "DEBUG LOAD_GLOBAL[%d]: type=%d\n", idx, vm->globals[idx].type);
|
||||
fprintf(stderr, "DEBUG LOAD_GLOBAL[%d]: type=%d\n", idx, vm->globals[idx].type);
|
||||
#endif
|
||||
push_value(vm, copy_value(&vm->globals[idx]));
|
||||
break;
|
||||
push_value(vm, copy_value(&vm->globals[idx]));
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue