-/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
\f
static SCM write_program = SCM_BOOL_F;
-SCM_DEFINE (scm_rtl_program_code, "rtl-program-code", 1, 0, 0,
+SCM_DEFINE (scm_program_code, "program-code", 1, 0, 0,
(SCM program),
"")
-#define FUNC_NAME s_scm_rtl_program_code
+#define FUNC_NAME s_scm_program_code
{
SCM_VALIDATE_PROGRAM (1, program);
SCM
scm_i_program_name (SCM program)
{
- static SCM rtl_program_name = SCM_BOOL_F;
+ static SCM program_name = SCM_BOOL_F;
if (SCM_PRIMITIVE_P (program))
return SCM_SUBR_NAME (program);
- if (scm_is_false (rtl_program_name) && scm_module_system_booted_p)
- rtl_program_name =
- scm_c_private_variable ("system vm program", "rtl-program-name");
+ if (scm_is_false (program_name) && scm_module_system_booted_p)
+ program_name =
+ scm_c_private_variable ("system vm program", "program-name");
- return scm_call_1 (scm_variable_ref (rtl_program_name), program);
+ return scm_call_1 (scm_variable_ref (program_name), program);
}
SCM
scm_i_program_documentation (SCM program)
{
- static SCM rtl_program_documentation = SCM_BOOL_F;
+ static SCM program_documentation = SCM_BOOL_F;
if (SCM_PRIMITIVE_P (program))
return SCM_BOOL_F;
- if (scm_is_false (rtl_program_documentation) && scm_module_system_booted_p)
- rtl_program_documentation =
- scm_c_private_variable ("system vm program",
- "rtl-program-documentation");
+ if (scm_is_false (program_documentation) && scm_module_system_booted_p)
+ program_documentation =
+ scm_c_private_variable ("system vm program", "program-documentation");
- return scm_call_1 (scm_variable_ref (rtl_program_documentation), program);
+ return scm_call_1 (scm_variable_ref (program_documentation), program);
}
SCM
scm_i_program_properties (SCM program)
{
- static SCM rtl_program_properties = SCM_BOOL_F;
+ static SCM program_properties = SCM_BOOL_F;
if (SCM_PRIMITIVE_P (program))
{
return scm_acons (scm_sym_name, name, SCM_EOL);
}
- if (scm_is_false (rtl_program_properties) && scm_module_system_booted_p)
- rtl_program_properties =
- scm_c_private_variable ("system vm program", "rtl-program-properties");
+ if (scm_is_false (program_properties) && scm_module_system_booted_p)
+ program_properties =
+ scm_c_private_variable ("system vm program", "program-properties");
- return scm_call_1 (scm_variable_ref (rtl_program_properties), program);
+ return scm_call_1 (scm_variable_ref (program_properties), program);
}
void
}
else if (scm_is_false (write_program) || print_error)
{
- scm_puts_unlocked ("#<rtl-program ", port);
+ scm_puts_unlocked ("#<program ", port);
scm_uintprint (SCM_UNPACK (program), 16, port);
scm_putc_unlocked (' ', port);
scm_uintprint ((scm_t_uintptr) SCM_PROGRAM_CODE (program), 16, port);
* Scheme interface
*/
-SCM_DEFINE (scm_rtl_program_p, "rtl-program?", 1, 0, 0,
+SCM_DEFINE (scm_program_p, "program?", 1, 0, 0,
(SCM obj),
"")
-#define FUNC_NAME s_scm_rtl_program_p
+#define FUNC_NAME s_scm_program_p
{
return scm_from_bool (SCM_PROGRAM_P (obj));
}
}
SCM
-scm_program_source (SCM program, SCM ip, SCM sources)
+scm_program_address_range (SCM program)
{
- static SCM program_source = SCM_BOOL_F;
+ static SCM program_address_range = SCM_BOOL_F;
- if (scm_is_false (program_source)) {
- if (!scm_module_system_booted_p)
- return SCM_BOOL_F;
-
- program_source =
- scm_c_private_variable ("system vm program", "program-source");
- }
+ if (scm_is_false (program_address_range) && scm_module_system_booted_p)
+ program_address_range =
+ scm_c_private_variable ("system vm program", "program-address-range");
- if (SCM_UNBNDP (sources))
- return scm_call_2 (scm_variable_ref (program_source), program, ip);
- else
- return scm_call_3 (scm_variable_ref (program_source), program, ip, sources);
+ return scm_call_1 (scm_variable_ref (program_address_range), program);
}
-
+
SCM_DEFINE (scm_program_num_free_variables, "program-num-free-variables", 1, 0, 0,
(SCM program),
"")
int
scm_i_program_arity (SCM program, int *req, int *opt, int *rest)
{
- static SCM rtl_program_minimum_arity = SCM_BOOL_F;
+ static SCM program_minimum_arity = SCM_BOOL_F;
SCM l;
if (SCM_PRIMITIVE_P (program))
return 1;
}
- if (scm_is_false (rtl_program_minimum_arity) && scm_module_system_booted_p)
- rtl_program_minimum_arity =
- scm_c_private_variable ("system vm program",
- "rtl-program-minimum-arity");
+ if (scm_is_false (program_minimum_arity) && scm_module_system_booted_p)
+ program_minimum_arity =
+ scm_c_private_variable ("system vm program", "program-minimum-arity");
- l = scm_call_1 (scm_variable_ref (rtl_program_minimum_arity), program);
+ l = scm_call_1 (scm_variable_ref (program_minimum_arity), program);
if (scm_is_false (l))
return 0;