Permalink
Browse files

More VM cleanups

  • Loading branch information...
1 parent d2c1381 commit 7d02d8b9d794bd3cefa96cc9c8f01efab5f84c5e @slavapestov slavapestov committed May 13, 2009
Showing with 17 additions and 17 deletions.
  1. +1 −1 vm/layouts.hpp
  2. +0 −2 vm/master.hpp
  3. +6 −4 vm/os-unix.hpp
  4. +6 −6 vm/os-windows.hpp
  5. +4 −4 vm/utilities.cpp
View
2 vm/layouts.hpp
@@ -90,7 +90,7 @@ inline static cell tag_for(cell type)
return type < HEADER_TYPE ? type : OBJECT_TYPE;
}
-class object;
+struct object;
struct header {
cell value;
View
2 vm/master.hpp
@@ -19,8 +19,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <unistd.h>
-#include <sys/param.h>
/* C++ headers */
#if __GNUC__ == 4
View
10 vm/os-unix.hpp
@@ -1,3 +1,5 @@
+#include <unistd.h>
+#include <sys/param.h>
#include <dirent.h>
#include <sys/mman.h>
#include <sys/types.h>
@@ -24,13 +26,13 @@ typedef char symbol_char;
#define FSEEK fseeko
#define FIXNUM_FORMAT "%ld"
-#define cell_FORMAT "%lu"
-#define cell_HEX_FORMAT "%lx"
+#define CELL_FORMAT "%lu"
+#define CELL_HEX_FORMAT "%lx"
#ifdef FACTOR_64
- #define cell_HEX_PAD_FORMAT "%016lx"
+ #define CELL_HEX_PAD_FORMAT "%016lx"
#else
- #define cell_HEX_PAD_FORMAT "%08lx"
+ #define CELL_HEX_PAD_FORMAT "%08lx"
#endif
#define FIXNUM_FORMAT "%ld"
View
12 vm/os-windows.hpp
@@ -22,14 +22,14 @@ typedef wchar_t vm_char;
#define FSEEK fseek
#ifdef WIN64
- #define cell_FORMAT "%Iu"
- #define cell_HEX_FORMAT "%Ix"
- #define cell_HEX_PAD_FORMAT "%016Ix"
+ #define CELL_FORMAT "%Iu"
+ #define CELL_HEX_FORMAT "%Ix"
+ #define CELL_HEX_PAD_FORMAT "%016Ix"
#define FIXNUM_FORMAT "%Id"
#else
- #define cell_FORMAT "%lu"
- #define cell_HEX_FORMAT "%lx"
- #define cell_HEX_PAD_FORMAT "%08lx"
+ #define CELL_FORMAT "%lu"
+ #define CELL_HEX_FORMAT "%lx"
+ #define CELL_HEX_PAD_FORMAT "%08lx"
#define FIXNUM_FORMAT "%ld"
#endif
View
8 vm/utilities.cpp
@@ -32,17 +32,17 @@ void print_string(const char *str)
void print_cell(cell x)
{
- printf(cell_FORMAT,x);
+ printf(CELL_FORMAT,x);
}
void print_cell_hex(cell x)
{
- printf(cell_HEX_FORMAT,x);
+ printf(CELL_HEX_FORMAT,x);
}
void print_cell_hex_pad(cell x)
{
- printf(cell_HEX_PAD_FORMAT,x);
+ printf(CELL_HEX_PAD_FORMAT,x);
}
void print_fixnum(fixnum x)
@@ -53,7 +53,7 @@ void print_fixnum(fixnum x)
cell read_cell_hex()
{
cell cell;
- if(scanf(cell_HEX_FORMAT,&cell) < 0) exit(1);
+ if(scanf(CELL_HEX_FORMAT,&cell) < 0) exit(1);
return cell;
};

0 comments on commit 7d02d8b

Please sign in to comment.