Skip to content

Commit

Permalink
Primitives no longer take an unused parameter
Browse files Browse the repository at this point in the history
do_* functions are no longer considered to be "primitives"
  • Loading branch information
flrl committed Jul 23, 2009
1 parent 4516e00 commit b837c5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// FIXME I think I may be able to make primitives no longer take a param

// Function signature for a primitive
#define DECLARE_PRIMITIVE(P) void P (void *pfa)
#define DECLARE_PRIMITIVE(P) void P()

// Define a primitive and add it to the dictionary
#define PRIMITIVE(NAME, FLAGS, CNAME, LINK) \
Expand Down
4 changes: 2 additions & 2 deletions genh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PREAMBLE

while (<>) {
if (m/^\s*PRIMITIVE\s*\(\"[^"]+\",\s*[^,]+,\s*([^,]+),\s*[^,]+\s*\)\s*\{/) {
print "void $1 (void *);\n";
print "void $1 ();\n";
}
elsif (m/^\s*VARIABLE\s*\(([^,]+),\s*[^,]+,\s*[^,]+,\s*[^,]+\s*\)\s*;/) {
print "extern cell * const var_$1;\n";
Expand All @@ -28,7 +28,7 @@ while (<>) {
print "extern const cell * const const_$1;\n";
}
elsif (m/^\s*READONLY\s*\(([^,]+),\s*[^,]+,\s*[^,]+,\s*[^,]+\s*\)\s*;/) {
print "void readonly_$1 (void *);\n";
print "void readonly_$1 ();\n";
}
}

Expand Down
3 changes: 2 additions & 1 deletion vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

#include "exception.h"
#include "vm.h"
#include "builtin.h"

// Pre-declare a few things
DictEntry _dict__LIT;
extern DictEntry _dict__LIT;

/*
* +------+-----+------+------+-------+-------+-----+
Expand Down

0 comments on commit b837c5d

Please sign in to comment.