Get logical imports in "wren_modules" working.

There's a lot of changes here and surely some rough edges to iron out.
Also, I need to update the docs. But I want to get closer to landing
this so I can build on it.
This commit is contained in:
Bob Nystrom
2018-07-15 20:09:41 -07:00
parent 8210452970
commit c367fc3bfc
31 changed files with 665 additions and 190 deletions
+1 -16
View File
@@ -4,28 +4,13 @@
#include "uv.h"
#include "scheduler.h"
#include "stat.h"
#include "vm.h"
#include "wren.h"
#include <stdio.h>
#include <fcntl.h>
// Windows doesn't define all of the Unix permission and mode flags by default,
// so map them ourselves.
#if defined(WIN32) || defined(WIN64)
#include <sys\stat.h>
// Map to Windows permission flags.
#define S_IRUSR _S_IREAD
#define S_IWUSR _S_IWRITE
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
// Not supported on Windows.
#define O_SYNC 0
#endif
typedef struct sFileRequestData
{
WrenHandle* fiber;