mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 22:17:33 +02:00
Added (system)
This commit is contained in:
parent
7537d41e26
commit
b3f57d7157
3 changed files with 6 additions and 2 deletions
2
TODO
2
TODO
|
@ -14,8 +14,6 @@ Working TODO list:
|
||||||
- need to change current*port functions to actually have a current port, and other i/o operations to use the correct current port
|
- need to change current*port functions to actually have a current port, and other i/o operations to use the correct current port
|
||||||
- quasiquote - will need to enhance the parser to support a second type of quote, at minimum
|
- quasiquote - will need to enhance the parser to support a second type of quote, at minimum
|
||||||
- string<? - and related functions, too
|
- string<? - and related functions, too
|
||||||
- (system) - not standard, but need to run gcc. See cyclone.scm for use
|
|
||||||
Almost done, need to add primitive to runtime
|
|
||||||
- vectors - limited use in cgen module - make-vector, vector-set!, and vector-ref
|
- vectors - limited use in cgen module - make-vector, vector-set!, and vector-ref
|
||||||
|
|
||||||
- Reduction in size of generated code
|
- Reduction in size of generated code
|
||||||
|
|
|
@ -1050,6 +1050,9 @@ void _integer_91_125char(object cont, object args) {
|
||||||
void _string_91_125number(object cont, object args) {
|
void _string_91_125number(object cont, object args) {
|
||||||
common_type i = Cyc_string2number(car(args));
|
common_type i = Cyc_string2number(car(args));
|
||||||
return_funcall1(cont, &i);}
|
return_funcall1(cont, &i);}
|
||||||
|
void _cyc_system(object cont, object args) {
|
||||||
|
integer_type i = Cyc_system(car(args));
|
||||||
|
return_funcall1(cont, &i);}
|
||||||
//void _error(object cont, object args) {
|
//void _error(object cont, object args) {
|
||||||
// integer_type argc = Cyc_length(args);
|
// integer_type argc = Cyc_length(args);
|
||||||
// dispatch_va(argc.value, dispatch_error, cont, cont, args); }
|
// dispatch_va(argc.value, dispatch_error, cont, cont, args); }
|
||||||
|
@ -1719,6 +1722,7 @@ static primitive_type cddddr_primitive = {primitive_tag, "cddddr", &_cddddr};
|
||||||
static primitive_type char_91_125integer_primitive = {primitive_tag, "char->integer", &_char_91_125integer};
|
static primitive_type char_91_125integer_primitive = {primitive_tag, "char->integer", &_char_91_125integer};
|
||||||
static primitive_type integer_91_125char_primitive = {primitive_tag, "integer->char", &_integer_91_125char};
|
static primitive_type integer_91_125char_primitive = {primitive_tag, "integer->char", &_integer_91_125char};
|
||||||
static primitive_type string_91_125number_primitive = {primitive_tag, "string->number", &_string_91_125number};
|
static primitive_type string_91_125number_primitive = {primitive_tag, "string->number", &_string_91_125number};
|
||||||
|
static primitive_type system_primitive = {primitive_tag, "system", &_cyc_system};
|
||||||
static primitive_type string_91append_primitive = {primitive_tag, "string-append", &_string_91append};
|
static primitive_type string_91append_primitive = {primitive_tag, "string-append", &_string_91append};
|
||||||
static primitive_type string_91_125list_primitive = {primitive_tag, "string->list", &_string_91_125list};
|
static primitive_type string_91_125list_primitive = {primitive_tag, "string->list", &_string_91_125list};
|
||||||
static primitive_type list_91_125string_primitive = {primitive_tag, "list->string", &_list_91_125string};
|
static primitive_type list_91_125string_primitive = {primitive_tag, "list->string", &_list_91_125string};
|
||||||
|
@ -1814,6 +1818,7 @@ const object primitive_cddddr = &cddddr_primitive;
|
||||||
const object primitive_char_91_125integer = &char_91_125integer_primitive;
|
const object primitive_char_91_125integer = &char_91_125integer_primitive;
|
||||||
const object primitive_integer_91_125char = &integer_91_125char_primitive;
|
const object primitive_integer_91_125char = &integer_91_125char_primitive;
|
||||||
const object primitive_string_91_125number = &string_91_125number_primitive;
|
const object primitive_string_91_125number = &string_91_125number_primitive;
|
||||||
|
const object primitive_system = &system_primitive;
|
||||||
const object primitive_string_91append = &string_91append_primitive;
|
const object primitive_string_91append = &string_91append_primitive;
|
||||||
const object primitive_string_91_125list = &string_91_125list_primitive;
|
const object primitive_string_91_125list = &string_91_125list_primitive;
|
||||||
const object primitive_list_91_125string = &list_91_125string_primitive;
|
const object primitive_list_91_125string = &list_91_125string_primitive;
|
||||||
|
|
|
@ -262,6 +262,7 @@ extern const object primitive_list_91_125string;
|
||||||
extern const object primitive_string_91_125symbol;
|
extern const object primitive_string_91_125symbol;
|
||||||
extern const object primitive_symbol_91_125string;
|
extern const object primitive_symbol_91_125string;
|
||||||
extern const object primitive_number_91_125string;
|
extern const object primitive_number_91_125string;
|
||||||
|
extern const object primitive_system;
|
||||||
extern const object primitive_boolean_127;
|
extern const object primitive_boolean_127;
|
||||||
extern const object primitive_char_127;
|
extern const object primitive_char_127;
|
||||||
extern const object primitive_eof_91object_127;
|
extern const object primitive_eof_91object_127;
|
||||||
|
|
Loading…
Add table
Reference in a new issue