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_local.c
|
||||
* @file load_local.c
|
||||
* @brief Implements the OP_LOAD_LOCAL opcode for loading local variables in the VM.
|
||||
*
|
||||
* This file handles the OP_LOAD_LOCAL instruction, which loads a local variable
|
||||
|
|
@ -31,12 +31,12 @@
|
|||
*/
|
||||
|
||||
case OP_LOAD_LOCAL: {
|
||||
int slot = inst.operand;
|
||||
if (slot < 0 || slot >= MAX_FRAME_LOCALS) {
|
||||
fprintf(stderr, "Runtime error: local slot out of range\n");
|
||||
exit(1);
|
||||
}
|
||||
Value val = copy_value(&f->locals[slot]);
|
||||
push_value(vm, val);
|
||||
break;
|
||||
int slot = inst.operand;
|
||||
if (slot < 0 || slot >= MAX_FRAME_LOCALS) {
|
||||
fprintf(stderr, "Runtime error: local slot out of range\n");
|
||||
exit(1);
|
||||
}
|
||||
Value val = copy_value(&f->locals[slot]);
|
||||
push_value(vm, val);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue