mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Cleanup of symbol code
This commit is contained in:
parent
695131a4d8
commit
1af80a9331
2 changed files with 4 additions and 4 deletions
6
cgen.scm
6
cgen.scm
|
@ -949,8 +949,7 @@
|
||||||
;; Emit symbol definitions
|
;; Emit symbol definitions
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (sym)
|
(lambda (sym)
|
||||||
(emit*
|
(emit* "defsymbol(" (mangle sym) ");"))
|
||||||
"defsymbol(" (mangle sym) ", " (symbol->string sym) ");"))
|
|
||||||
*symbols*)
|
*symbols*)
|
||||||
|
|
||||||
;; Emit lambdas:
|
;; Emit lambdas:
|
||||||
|
@ -990,7 +989,8 @@
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (sym)
|
(lambda (sym)
|
||||||
(emit*
|
(emit*
|
||||||
" quote_" (mangle sym) " = find_or_add_symbol(\"" (symbol->string sym) "\");"))
|
" quote_" (mangle sym) " = find_or_add_symbol(\""
|
||||||
|
(symbol->string sym) "\");"))
|
||||||
*symbols*)
|
*symbols*)
|
||||||
|
|
||||||
;; Initialize global table
|
;; Initialize global table
|
||||||
|
|
|
@ -144,7 +144,7 @@ typedef symbol_type *symbol;
|
||||||
#define symbol_pname(x) (((symbol_type *) x)->pname)
|
#define symbol_pname(x) (((symbol_type *) x)->pname)
|
||||||
#define symbol_plist(x) (((symbol_type *) x)->plist)
|
#define symbol_plist(x) (((symbol_type *) x)->plist)
|
||||||
|
|
||||||
#define defsymbol(name,pname) \
|
#define defsymbol(name) \
|
||||||
static object quote_##name = nil;
|
static object quote_##name = nil;
|
||||||
|
|
||||||
/* Define numeric types */
|
/* Define numeric types */
|
||||||
|
|
Loading…
Add table
Reference in a new issue