forked from SWI-Prolog/swipl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewriting mkvmi to create a single template file
- Loading branch information
1 parent
bfa7113
commit 55d4fc8
Showing
8 changed files
with
597 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* File: pl-codetable.ic | ||
|
||
This file provides a description of the virtual machine instructions | ||
and their arguments. It is used by pl-comp.c to facilitate the | ||
compiler and decompiler, as well as pl-wic.c to save/reload sequences | ||
of virtual machine instructions. | ||
*/ | ||
|
||
#include "pl-incl.h" | ||
|
||
const code_info codeTable[] = { | ||
/* {name, ID, flags, #args, argtype} */ | ||
#define _VMI(Name, flags, nargs, argtypes) {VM_STRLOWER(Name), Name, flags, nargs, {VM_DEPAREN(argtypes)}}, | ||
#include "pl-vmi.ih" | ||
{ NULL, 0, 0, 0, {0} } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* File: pl-jumptable.ic | ||
|
||
This file provides the GCC-2 jump-labels to exploit GCC's | ||
support for threaded code. | ||
*/ | ||
|
||
static void *jmp_table[] = | ||
{ | ||
#define _VMI(Name,...) &&Name ## _LBL, | ||
#include "pl-vmi.ih" | ||
NULL | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* File: pl-vmi.h | ||
This file provides the definition of type code. | ||
*/ | ||
|
||
typedef enum | ||
{ | ||
#define _VMI(Name,...) Name, | ||
#include "pl-vmi.ih" | ||
VMI_END_LIST | ||
} vmi; | ||
|
||
#define I_HIGHEST ((int)VMI_END_LIST) | ||
/* VM_SIGNATURE is defined in pl-vmi.h */ |
Oops, something went wrong.