jitter.patch (3293B)
1 diff --git a/jitter/jitter-missing.h b/jitter/jitter-missing.h 2 index 80cefdd..e84dc79 100644 3 --- a/jitter/jitter-missing.h 4 +++ b/jitter/jitter-missing.h 5 @@ -124,12 +124,12 @@ 6 7 /* Do nothing. */ 8 void 9 -flockfile () 10 +flockfile (FILE *) 11 __attribute__ ((nonnull (1))); 12 13 /* Do nothing. */ 14 void 15 -funlockfile () 16 +funlockfile (FILE *) 17 __attribute__ ((nonnull (1))); 18 19 #endif // #ifndef JITTER_MISSING_H_ 20 diff --git a/templates/vm.h b/templates/vm.h 21 index 6fcfbbb..c66d43b 100644 22 --- a/templates/vm.h 23 +++ b/templates/vm.h 24 @@ -1125,6 +1125,36 @@ vmprefix_program_point; 25 26 27 28 +/* VM exit status. 29 + * ************************************************************************** */ 30 + 31 +/* A value of this type is returned by a VM after execution, and the last 32 + returned value is also held in the VM state in order to make consistency 33 + checks. */ 34 +enum vmprefix_exit_status 35 + { 36 + /* This state has never been used for execution. This is the initial value 37 + within the state, and is never returned after execution. */ 38 + vmprefix_exit_status_never_executed = 0, 39 + 40 + /* The state is being used in execution right now; this is never returned by 41 + the executor. It is an error (checked for) to execute code with a VM 42 + state containing this exit status, which shows that there has been a 43 + problem -- likely VM code was exited via longjmp, skipping the proper 44 + cleanup. */ 45 + vmprefix_exit_status_being_executed = 1, 46 + 47 + /* Some VM code has been executed. It is now possible to execute more code 48 + (including the same code again) in the same state. */ 49 + vmprefix_exit_status_exited = 2, 50 + 51 + /* Code execution has been interrupted for debugging, but can be resumed. */ 52 + vmprefix_exit_status_debug = 3, 53 + }; 54 + 55 + 56 + 57 + 58 /* Executing code from an executable routine. 59 * ************************************************************************** */ 60 61 @@ -1185,36 +1215,6 @@ vmprefix_execute_routine (jitter_routine r, 62 __attribute__ ((nonnull (1, 2))); 63 64 65 - 66 - 67 -/* VM exit status. 68 - * ************************************************************************** */ 69 - 70 -/* A value of this type is returned by a VM after execution, and the last 71 - returned value is also held in the VM state in order to make consistency 72 - checks. */ 73 -enum vmprefix_exit_status 74 - { 75 - /* This state has never been used for execution. This is the initial value 76 - within the state, and is never returned after execution. */ 77 - vmprefix_exit_status_never_executed = 0, 78 - 79 - /* The state is being used in execution right now; this is never returned by 80 - the executor. It is an error (checked for) to execute code with a VM 81 - state containing this exit status, which shows that there has been a 82 - problem -- likely VM code was exited via longjmp, skipping the proper 83 - cleanup. */ 84 - vmprefix_exit_status_being_executed = 1, 85 - 86 - /* Some VM code has been executed. It is now possible to execute more code 87 - (including the same code again) in the same state. */ 88 - vmprefix_exit_status_exited = 2, 89 - 90 - /* Code execution has been interrupted for debugging, but can be resumed. */ 91 - vmprefix_exit_status_debug = 3, 92 - }; 93 - 94 - 95 96 97 /* Low-level debugging features relying on assembly: data locations.