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_const.c
|
||||
* @file load_const.c
|
||||
* @brief Implements the OP_LOAD_CONST opcode for loading constants in the VM.
|
||||
*
|
||||
* This file handles the OP_LOAD_CONST instruction, which loads a constant value
|
||||
|
|
@ -26,12 +26,12 @@
|
|||
*/
|
||||
|
||||
case OP_LOAD_CONST: {
|
||||
int idx = inst.operand;
|
||||
if (idx < 0 || idx >= f->fn->const_count) {
|
||||
fprintf(stderr, "Runtime error: constant index out of range\n");
|
||||
exit(1);
|
||||
}
|
||||
Value c = copy_value(&f->fn->constants[idx]);
|
||||
push_value(vm, c);
|
||||
break;
|
||||
int idx = inst.operand;
|
||||
if (idx < 0 || idx >= f->fn->const_count) {
|
||||
fprintf(stderr, "Runtime error: constant index out of range\n");
|
||||
exit(1);
|
||||
}
|
||||
Value c = copy_value(&f->fn->constants[idx]);
|
||||
push_value(vm, c);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue