Start sketching in the FFI.

This commit is contained in:
Bob Nystrom
2013-12-29 10:06:35 -08:00
parent 667d393fbb
commit 63d1255566
6 changed files with 153 additions and 14 deletions
-14
View File
@@ -12,11 +12,6 @@
// parsing/code generation. This minimizes the number of explicit forward
// declarations needed.
// The maximum number of arguments that can be passed to a method. Note that
// this limtation is hardcoded in other places in the VM, in particular, the
// `CODE_CALL_XX` instructions assume a certain maximum number.
#define MAX_PARAMETERS (16)
// The maximum number of local (i.e. non-global) variables that can be declared
// in a single function, method, or chunk of top level code. This is the
// maximum number of variables in scope at one time, and spans block scopes.
@@ -35,15 +30,6 @@
// argument.
#define MAX_CONSTANTS (256)
// The maximum name of a method, not including the signature. This is an
// arbitrary but enforced maximum just so we know how long the method name
// strings need to be in the parser.
#define MAX_METHOD_NAME (64)
// The maximum length of a method signature. This includes the name, and the
// extra spaces added to handle arity, and another byte to terminate the string.
#define MAX_METHOD_SIGNATURE (MAX_METHOD_NAME + MAX_PARAMETERS + 1)
typedef enum
{
TOKEN_LEFT_PAREN,