Permalink
Browse files

Remove unnecessary C code.

  • Loading branch information...
1 parent 8ca55e3 commit 9c208b62e1f0565b596d93f32f12e88b3c074128 @kr committed Mar 20, 2009
Showing with 2 additions and 32 deletions.
  1. +0 −2 bytes.h
  2. +1 −13 bytes.na
  3. +0 −2 str.h
  4. +1 −13 str.na
  5. +0 −2 vm.c
View
@@ -3,8 +3,6 @@
#ifndef bytes_h
#define bytes_h
-void bytes_init();
-
datum make_bytes(uint len);
datum make_bytes_init(const char *s);
datum make_bytes_init_len(const char *s, int len);
View
@@ -5,14 +5,6 @@ inline C <<end
#include "bytes.h"
#include "prim.h"
-static datum percent_star_sym;
-
-void
-bytes_init()
-{
- percent_star_sym = intern("%*");
-}
-
/* Based on the table in Python's unicodeobject.c. */
static char utf8_code_length[256] = {
/* Map UTF-8 encoded prefix byte to sequence length. Zero means illegal
@@ -278,11 +270,7 @@ def bytes: sobj:
(format (self 1) (a.car)) / ((self.tail 2).%* (a.cdr))
(self.head i) / ((self.tail i).%* a)
- inline C "%" <<end
- regs[R_VM0] = rcv;
- args = cons(args, nil);
- return call(regs[R_VM0], percent_star_sym, args);
- end
+ (% . a) self %* a
def (to-str x):
? (inspect.same-type? x str):
View
2 str.h
@@ -8,8 +8,6 @@ typedef struct str {
char data[];
} *str;
-void str_init();
-
int strp(datum x);
datum make_str(size_t size);
View
14 str.na
@@ -8,14 +8,6 @@ inline C <<end
#include "bytes.h"
#include "prim.h"
-static datum percent_star_sym;
-
-void
-str_init()
-{
- percent_star_sym = intern("%*:1");
-}
-
int
strp(datum x)
{
@@ -187,11 +179,7 @@ def str: sobj:
else:
(self.head i) / ((self.tail i).%* a)
- inline C (% . args) <<end
- regs[R_VM0] = rcv;
- args = cons(args, nil);
- return call(regs[R_VM0], percent_star_sym, args);
- end
+ (% . a): self %* a
inline C (intern.) <<end
return intern_str(rcv);
View
2 vm.c
@@ -632,8 +632,6 @@ main(int argc, char **argv)
if (argc != 2) usage();
init_mem();
- str_init();
- bytes_init();
link_builtins(lxc_modules);

0 comments on commit 9c208b6

Please sign in to comment.