| Commit message (Expand) | Author | Age | Files | Lines |
* | Generics with setters have <applicable-struct-with-setter> layout...* libguile/goops.c (scm_sys_set_object_setter_x): Remove. Instead, we
use slot-set! of 'setter.
(scm_i_define_class_for_vtable): Move lower in the file, and fold in
scm_make_extended_class_from_symbol and make_class_from_symbol.
Properly handle applicable structs with setters.
(scm_class_applicable_struct_with_setter_class): New private capture.
(scm_sys_bless_applicable_struct_vtables_x): Rename to take two
arguments, and bless the second argument as an applicable struct with
setter vtable.
(scm_sys_goops_early_init): Capture setter classes.
* libguile/deprecated.c (SPEC_OF, CPL_OF): Access slots by name, not by
index.
(applicablep, more_specificp): Adapt to use CPL_OF.
(scm_find_method): Access "methods" slot by name.
* libguile/procs.c (scm_setter): Remove special case for generics; if
it's a setter, it will be a normal applicable struct.
* module/oop/goops.scm (<applicable-struct-with-setter-class>)
(<applicable-struct-with-setter>): New classes.
(<generic-with-setter>): Now an instance of the setter metaclass and a
child of the setter class, so that the "setter" slot ends up in the
right place.
(<accessor>, <extended-generic-with-setter>, <extended-accessor>): Be
instances of the setter metaclass.
(<method>, <accessor-method>): Move definitions farther down.
(make): Use slot-set! when initializing setters here.
(initialize): Likewise for <applicable-struct-with-setter>. Remove
specialization for <generic-with-setter>.
| Andy Wingo | 2015-01-23 | 1 | -4/+0 |
* | Remove unreachable code in scm_setter...* libguile/procs.c (scm_setter): Remove unreachable code.
| Andy Wingo | 2015-01-23 | 1 | -1/+0 |
* | Rename objcodes?.{scm,c,h} to loader.{scm,c,h}...* libguile/loader.c:
* libguile/loader.h: Rename from objcodes.[ch].
* module/system/vm/loader.scm: Rename from objcode.scm.
* libguile/Makefile.am:
* libguile/gsubr.c:
* libguile/init.c:
* libguile/procs.c:
* libguile/vm.c:
* module/Makefile.am:
* module/ice-9/eval-string.scm:
* module/language/rtl/spec.scm:
* module/system/base/target.scm:
* module/system/repl/command.scm:
* module/system/repl/common.scm:
* module/system/vm/debug.scm:
* module/system/vm/disassembler.scm:
* module/system/vm/objcode.scm:
* test-suite/tests/compiler.test:
* test-suite/tests/dwarf.test:
* test-suite/tests/rtl-compilation.test:
* test-suite/tests/rtl.test: Adapt.
| Andy Wingo | 2013-11-19 | 1 | -1/+1 |
* | Remove RTL_ infix from macros...* libguile/programs.h (SCM_PROGRAM_P):
(SCM_PROGRAM_CODE):
(SCM_PROGRAM_FREE_VARIABLES):
(SCM_PROGRAM_FREE_VARIABLE_REF):
(SCM_PROGRAM_FREE_VARIABLE_SET):
(SCM_PROGRAM_NUM_FREE_VARIABLES):
(SCM_VALIDATE_PROGRAM): Remove RTL_ infix.
* libguile/continuations.c:
* libguile/continuations.h:
* libguile/control.c:
* libguile/foreign.c:
* libguile/frames.c:
* libguile/gsubr.c:
* libguile/gsubr.h:
* libguile/procprop.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/stacks.c:
* libguile/vm-engine.c: Adapt.
| Andy Wingo | 2013-11-19 | 1 | -1/+1 |
* | Remove stack programs, objcode, and the old VM....* libguile/Makefile.am:
* libguile/vm-i-loader.c:
* libguile/vm-i-scheme.c:
* libguile/vm-i-system.c: Remove the old VM files, and the rules to
build the .i files.
* libguile/vm-engine.c:
* libguile/vm.c: Remove the old VM. Woot!
* libguile/_scm.h (SCM_OBJCODE_COOKIE, SCM_OBJCODE_ENDIANNESS_OFFSET)
(SCM_OBJCODE_WORD_SIZE_OFFSET): Remove.
* libguile/evalext.c (scm_self_evaluating_p): Remove objcode and program
cases.
* libguile/frames.c (scm_frame_num_locals, scm_frame_previous): Remove
program cases.
* libguile/gc.c (scm_i_tag_name): Remove objcode case.
* libguile/goops.c (scm_class_of, create_standard_classes): Remove
objcode and program cases.
* libguile/instructions.h:
* libguile/instructions.c (scm_instruction_list, scm_instruction_p)
(scm_instruction_length, scm_instruction_pops, scm_instruction_pushes)
(scm_instruction_to_opcode, scm_opcode_to_instruction): Remove old VM
code.
* libguile/objcodes.h:
* libguile/objcodes.c: Remove the objcode data type, and handling for
objcode files.
* libguile/print.c: Remove objcode and program printers.
* libguile/procprop.c: Remove program cases.
* libguile/procs.c:
* libguile/programs.h:
* libguile/programs.c: Remove old program code.
* libguile/smob.c: Remove objcodes include.
* libguile/snarf.h: Remove static program defines.
* libguile/stacks.c: Remove program case.
* libguile/tags.h: Remove program and objcode tc7s.
* module/ice-9/session.scm (procedure-arguments)
* module/language/tree-il/analyze.scm (validate-arity)
* module/statprof.scm (get-call-data, procedure=?)
* module/system/vm/frame.scm (frame-bindings)
(frame-call-representation): Remove old program cases.
* module/system/repl/debug.scm (frame->module): Add a FIXME.
* module/system/vm/instruction.scm: Remove old exports.
* module/system/vm/program.scm: Remove old program code.
| Andy Wingo | 2013-11-08 | 1 | -2/+1 |
* | Avoid calling procedure-name when doing a make-procedure-with-setter...* libguile/procs.c (scm_make_procedure_with_setter): Don't set the name
of the procedure. Instead rely on procedure-name to look it up from
the wrapped procedure as needed.
* libguile/procprop.c (scm_procedure_name): If there was no override and
the procedure is a procedure-with-setter, recurse on the procedure.
| Andy Wingo | 2013-10-31 | 1 | -10/+2 |
* | procedure-documentation works on RTL procedures...* libguile/procprop.h:
* libguile/procprop.c (scm_procedure_documentation): Move here from
procs.c, and to make the logic more similar to that of procedure-name,
which allows RTL programs to dispatch to rtl-program-documentation.
* libguile/programs.c (scm_i_rtl_program_documentation):
* libguile/programs.h:
* module/system/vm/program.scm (rtl-program-documentation): New
plumbing.
* module/system/vm/debug.scm (find-program-docstring): New interface to
grovel ELF for a docstring.
| Andy Wingo | 2013-06-09 | 1 | -15/+0 |
* | add new rtl vm...* libguile/vm-engine.c (rtl_vm_engine): Add new VM.
(vm_engine): Add support for calling RTL programs.
* libguile/tags.h (scm_tc7_rtl_program): New type for procedures that
run on the new VM.
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of):
* libguile/print.c (iprin1):
* libguile/procprop.c (scm_i_procedure_arity):
* libguile/procs.c (scm_procedure_p): Add hooks for the new tc7.
* libguile/programs.h:
* libguile/programs.c (scm_make_rtl_program, scm_i_rtl_program_print)
(scm_rtl_program_p, scm_rtl_program_code):
* module/system/vm/program.scm: Add constructors and accessors for the
new "RTL programs".
* libguile/vm.c (rtl_boot_continuation): Define a boot program.
(rtl_apply, rtl_values): New static RTL programs.
* libguile/frames.c (scm_frame_num_locals): Adapt for frames of RTL
programs.
* libguile/frames.h: Add description of RTL frames.
* libguile/Makefile.am: Add rules to generate vm-operations.h.
* .gitignore: Ignore vm-operations.h.
* module/system/vm/instruction.scm:
* libguile/instructions.c:
* libguile/instructions.h: Use vm-operations.h to define enumerated
values for the new RTL opcodes. Define some helper macros to pack and
unpack 32-bit instruction words.
(rtl-instruction-list): New function, exported by (system vm
instruction).
* libguile/objcodes.c: Wire up the bits needed to detect the new RTL
bytecode and load it, as appropriate.
| Andy Wingo | 2013-05-31 | 1 | -1/+2 |
* | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
GUILE-VERSION
libguile/posix.c
module/ice-9/eval.scm
test-suite/tests/cse.test
| Mark H Weaver | 2013-01-07 | 1 | -4/+5 |
|\ |
|
| * | eval: Store docstrings for lambdas....Fixes <http://bugs.gnu.org/12173>.
Reported by Ian Price <ianprice90@googlemail.com>.
* libguile/memoize.c (MAKMEMO_LAMBDA): New `docstring' parameter. Add
it as the second argument of `SCM_M_LAMBDA'. Update caller.
(memoize)[SCM_M_LAMBDA]: Extract docstring from EXP; when `memoize'
returns, add the docstring to the lambda's arguments.
(unmemoize)[SCM_M_LAMBDA]: Adjust to new argument layout of
`SCM_M_LAMBDA'.
* libguile/eval.c (BOOT_CLOSURE_NUM_REQUIRED_ARGS,
BOOT_CLOSURE_HAS_REST_ARGS, BOOT_CLOSURE_IS_REST,
BOOT_CLOSURE_PARSE_FULL): Adjust to new argument layout of
`SCM_M_LAMBDA'.
* module/ice-9/eval.scm (primitive-eval)[make-general-closure]:
Likewise.
[eval]: When EXP is a lambda, match its docstring; when the docstring
is not #f, add it to the closures procedure properties.
* test-suite/tests/eval.test ("docstrings"): New test prefix.
* libguile/procs.c (sym_documentation): Rename to...
(scm_sym_documentation): ... this. Make it global.
* libguile/procs.h (scm_sym_documentation): New declaration.
| Ludovic Courtès | 2012-11-28 | 1 | -4/+5 |
* | | slight scm_procedure_p, scm_i_procedure_arity refactor...* libguile/procs.c (scm_procedure_p):
* libguile/procprop.c (scm_i_procedure_arity): Refactor.
| Andy Wingo | 2011-10-24 | 1 | -15/+4 |
* | | scm_wta_* procedures replace SCM_WTA_* macros...* libguile/__scm.h: Move all the SCM_WTA and SCM_GASSERT macros out of
here. Also remove the scm_call_generic declarations.
* libguile/deprecated.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1):
(SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N): Deprecate. See below for
their replacements.
(SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Deprecate
these too.
(SCM_WTA_DISPATCH_1_SUBR): Deprecate this strange thing.
(scm_call_generic_0, scm_call_generic_1, scm_call_generic_2):
(scm_call_generic_3, scm_apply_generic): Remove, indicating their
replacements.
* libguile/print.c (iprin1):
* libguile/eq.c (scm_equal_p): Use scm_call_2 instead of
scm_call_generic_2.
* libguile/goops.h:
* libguile/goops.c: Remove scm_{call,apply}_generic definitions.
(scm_wta_dispatch_0, scm_wta_dispatch_1, scm_wta_dispatch_2):
(scm_wta_dispatch_n): New procedures, replacing the SCM_WTA macros.
* libguile/numbers.c (scm_lcm):
* libguile/procs.c (scm_setter): Remove uses of SCM_GASSERT.
* libguile/numbers.c (scm_lcm):
* libguile/procs.c (scm_setter):
* libguile/vectors.c: Use the procedural scm_wta routines instead of the
SCM_WTA macros.
| Andy Wingo | 2011-05-15 | 1 | -2/+3 |
|/ |
|
* | fix scm_setter...* libguile/procs.c (scm_setter): Only get at the setter slot if the pure
generic actually has a setter. Needs test.
* test-suite/tests/goops.test ("defining generics"):
("defining accessors"): Add `setter' tests.
| Andy Wingo | 2011-03-08 | 1 | -1/+2 |
* | fix scm_procedure on non-structs...* libguile/procs.c (scm_procedure): Fix argument type check.
| Andy Wingo | 2011-02-08 | 1 | -2/+2 |
* | use scm_from_latin1_symboln for string literals and load-symbol...* libguile/bytevectors.c:
* libguile/eval.c:
* libguile/goops.c:
* libguile/i18n.c:
* libguile/load.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/ports.c:
* libguile/print.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/read.c:
* libguile/script.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/strings.c:
* libguile/throw.c:
* libguile/vm.c: Use scm_from_latin1_symboln to make symbols from string
literals, because they aren't in the user's locale -- they are in
ASCII, and we can optimize this case.
* libguile/vm-i-loader.c: Also use scm_from_latin1_symboln when loading
narrow symbols.
| Andy Wingo | 2011-01-07 | 1 | -2/+2 |
* | scm_i_program_properties is internal; just use procedure-properties...* libguile/programs.h:
* libguile/programs.c (scm_i_program_properties): Make internal.
(scm_program_name): Use scm_i_program_properties.
* libguile/procprop.c (scm_procedure_properties): Use
scm_i_program_properties, for programs.
* libguile/procs.c (scm_procedure_documentation): Use procedure-property
to get to 'documentation, not program-property.
* module/system/vm/program.scm (program-properties, program-property):
Remove from the exports list.
(program-documentation): Use procedure-property.
* module/texinfo/reflection.scm (macro-arguments)
(macro-additional-stexi)
(object-stexi-documentation): Use procedure-property, not
program-property.
| Andy Wingo | 2010-04-17 | 1 | -5/+2 |
* | remove scm_tc7_gsubr...* libguile/tags.h (scm_tc7_gsubr): Return to the pool of unused tc7s, as
there are no more gsubrs. Yay :)
* libguile/programs.h (SCM_F_PROGRAM_IS_PRIMITIVE):
(SCM_PROGRAM_IS_PRIMITIVE): New flag and accessor.
* libguile/gsubr.c (create_gsubr):
* libguile/snarf.h (SCM_STATIC_PROGRAM): Give subrs a PRIMITIVE flag.
* libguile/smob.h:
* libguile/smob.c (scm_i_smob_arity): New internal procedure. Uses the
old GSUBR type macros, local to the file.
* libguile/procprop.c (scm_i_procedure_arity): Call out to
scm_i_smob_arity, and remove a gsubr case.
* libguile/gc.c (scm_i_tag_name):
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of):
* libguile/vm.c (apply_foreign):
* libguile/hash.c (scm_hasher):
* libguile/debug.c (scm_procedure_name):
* libguile/print.c (iprin1): Remove gsubr cases.
* libguile/gsubr.h (SCM_PRIMITIVE_P): Fix to work with the new VM
program regimen.
(SCM_GSUBR_TYPE, SCM_GSUBR_MAKTYPE, SCM_GSUBR_MAX, SCM_GSUBR_REQ)
(SCM_GSUBR_OPT, SCM_GSUBR_REST): Remove these macros, that are no
longer useful.
* libguile/gsubr.c (scm_i_gsubr_apply, scm_i_gsubr_apply_list)
(scm_i_gsubr_apply_array): Remove internal gsubr application
functions.
| Andy Wingo | 2010-01-07 | 1 | -9/+1 |
* | move subr implementation details to gsubr.[ch]...* libguile/procs.h: Move subr macros to gsubr.h.
* libguile/procs.c (scm_c_make_subr, scm_c_make_subr_with_generic)
(scm_c_define_subr, scm_c_define_subr_with_generic): Remove these,
because they deal in subr types, and now there is only one subr type.
The body of this code is now in gsubr.c.
* libguile/deprecated.h (scm_subr_p): Remove from procs.[ch] and define
as a deprecated macro. Only used internally, but who knows who's out
there.
* libguile/goops.c (scm_generic_capability_p)
(scm_enable_primitive_generic_x, scm_set_primitive_generic_x)
(scm_primitive_generic_generic): Use the new SCM_PRIMITIVE_GENERIC_P
macro instead of calling scm_subr_p.
* libguile/gsubr.h (SCM_PRIMITIVE_P, SCM_PRIMITIVE_GENERIC_P): New
macros, to replace scm_subr_p and hacky checking for generic
capability.
(SCM_SUBR_META_INFO, SCM_SUBR_NAME, SCM_SUBRF, SCM_SUBR_PROPS)
(SCM_SUBR_GENERIC, SCM_SET_SUBR_GENERIC, SCM_SET_SUBR_GENERIC_LOC)
(SCM_SUBR_ARITY_TO_TYPE): Moved here from procs.h.
* libguile/gsubr.c (create_gsubr): Inline the
scm_c_make_subr definition here, and work for generics too. Removed a
scm_remember_upto_here_1 that was added earlier in the year when
meta_info was not being traced by the GC. Adapt callers.
| Andy Wingo | 2010-01-05 | 1 | -62/+0 |
* | use the new public metatables from struct.c...* libguile/procs.c (scm_init_procs): No need to lookup the
applicable-struct-with-setter vtable, as it is now exported.
| Andy Wingo | 2009-12-08 | 1 | -4/+5 |
* | procedures-with-setters implemented in terms of structs...* libguile/tags.h (scm_tc7_pws): No more.
* libguile/procs.c (scm_procedure_with_setter_p)
(scm_make_procedure_with_setter, scm_procedure, scm_setter): Implement
procedures-with-setters in terms of applicable structs with setters.
* libguile/procs.h: Remove a big, outdated comment, and the deprecated
macros.
* libguile/deprecated.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE)
(SCM_SETTER): Deprecate these. SCM_PROCEDURE and SCM_SETTER are bad
names.
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/gc.c (scm_i_tag_name):
* libguile/goops.c: (scm_class_of):
* libguile/print.c (iprin1):
* libguile/procprop.c (scm_i_procedure_arity):
* libguile/procs.c (scm_procedure_p):
* libguile/debug.c (scm_procedure_source): Remove a tc7_pws case.
* libguile/goops.h:
* libguile/goops.c (scm_class_procedure_with_setter): Remove this class;
it is subsumed by applicable_struct_with_setter.
* libguile/struct.h: Update a comment.
* libguile/vm-i-system.c (call, goto/args, mv-call): Remove PWS cases.
| Andy Wingo | 2009-12-07 | 1 | -36/+29 |
* | eval.c closures are now applicable smobs, not tc3s...* libguile/debug.c (scm_procedure_name): Remove a SCM_CLOSUREP case and
some dead code.
(scm_procedure_module): Remove. This was introduced a few months ago
for the hygienic expander, but now it is no longer needed, as the
expander keeps track of this information itself.
* libguile/debug.h: Remove scm_procedure_module.
* libguile/eval.c: Instead of using tc3 closures, define a "boot
closure" applicable smob type, and represent closures with that. The
advantage is that after eval.scm is compiled, boot closures take up no
address space (besides a smob number) in the runtime, and require no
special cases in procedure dispatch.
* libguile/eval.h: Remove the internal functions scm_i_call_closure_0
and scm_closure_apply, and the public function scm_closure.
* libguile/gc.c (scm_storage_prehistory): No tc3_closure displacement
registration.
(scm_i_tag_name): Remove closure case, and a dead cclo case.
* libguile/vm.c (apply_foreign):
* libguile/print.c (iprin1):
* libguile/procs.c (scm_procedure_p, scm_procedure_documentation);
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of): Remove tc3_closure/tcs_closure cases.
* libguile/hash.c (scm_hasher):
* libguile/hooks.c (scm_add_hook_x): Use new scm_i_procedure_arity.
* libguile/macros.c (macro_print): Print all macros using the same code.
(scm_macro_transformer): Return any procedure, not just programs.
* libguile/procprop.h:
* libguile/procprop.c (scm_i_procedure_arity): Instead of returning a
list that the caller has to parse, have the same prototype as
scm_i_program_arity. An incompatible change, but it's an internal
function anyway.
(scm_procedure_properties, scm_set_procedure_properties)
(scm_procedure_property, scm_set_procedure_property): Remove closure
cases, and use scm_i_program_arity for arity.
* libguile/procs.h (SCM_CLOSUREP, SCM_CLOSCAR, SCM_CODE)
(SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS)
(SCM_CLOSURE_BODY, SCM_PROCPROPS, SCM_SETPROCPROPS, SCM_ENV)
(SCM_TOP_LEVEL): Remove these macros that pertain to boot closures
only. Only eval.c should know abut boot closures.
* libguile/procs.c (scm_closure_p): Remove this function. There is a
simple stub in deprecated.scm now.
(scm_thunk_p): Use scm_i_program_arity.
* libguile/tags.h (scm_tc3_closure): Remove. Yay, another tc3 to play
with!
(scm_tcs_closures): Remove.
* libguile/validate.h (SCM_VALIDATE_CLOSURE): Remove.
* module/ice-9/deprecated.scm (closure?): Add stub.
* module/ice-9/documentation.scm (object-documentation)
* module/ice-9/session.scm (help-doc, arity)
* module/oop/goops.scm (compute-getters-n-setters)
* module/oop/goops/describe.scm (describe)
* module/system/repl/describe.scm (display-object, display-type):
Remove calls to closure?.
| Andy Wingo | 2009-12-04 | 1 | -52/+6 |
* | remove cxrs...* libguile/pairs.h:
* libguile/pairs.c: Previously scm_cdadr et al were implemented as
#defines that called scm_i_chase_pairs, and the Scheme-exposed
functions themselves were cxr subrs, which got special help in the
interpreter. Since now the special help is unnecessary (because the
compiler inlines and expands calls to car, cdadr, etc), the complexity
is a loss. So just implement cdadr etc using normal functions. There's
an advantage too, in that the compiler can unroll the cxring, reducing
branches.
* libguile/tags.h (scm_tc7_cxr): Remove this tag.
(scm_tcs_subrs): Now there's only one kind of subr, yay!
* libguile/debug.c (scm_procedure_name)
* libguile/evalext.c (scm_self_evaluating_p)
* libguile/gc.c (scm_i_tag_name)
* libguile/goops.c (scm_class_of)
* libguile/hash.c (scm_hasher)
* libguile/print.c (iprin1)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_procedure_p, scm_subr_p)
(scm_make_procedure_with_setter)
* libguile/vm.c (apply_foreign): Remove cxr cases. Replace uses of
scm_tcs_subrs with scm_tc7_gsubr.
| Andy Wingo | 2009-12-04 | 1 | -3/+3 |
* | remove rpsubrs...* libguile/tags.h: Remove rpsubrs (I chose to interpret the terse name
as "recursive predicate subrs"). Just use gsubrs with rest arguments,
or do a fold yourself.
* libguile/array-map.c (scm_i_array_equal_p): Do the comparison in
order, why not.
* libguile/chars.c:
* libguile/eq.c:
* libguile/numbers.c:
* libguile/strorder.c: Add 0,2,1 gsubr wrappers for rpsubrs like eq?, <,
etc.
* libguile/goops.c (scm_class_of)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_thunk_p)
* libguile/vm.c (apply_foreign): Remove rpsubr cases.
* test-suite/tests/numbers.test ("=", "<"): Turn a couple xfails into
passes.
| Andy Wingo | 2009-12-04 | 1 | -2/+0 |
* | remove asubrs...* libguile/tags.h (scm_tcs_subrs, scm_tc7_asubr): Remove definitions.
* libguile/goops.c (scm_class_of)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_thunk_p)
* libguile/vm.c (apply_foreign): Remove cases for asubrs.
* libguile/array-map.c: Gut all of the optimizations, because there are
no more asubrs, soon won't be rpsubrs, and all of this should happen
on the Scheme level, ideally.
| Andy Wingo | 2009-12-03 | 1 | -1/+0 |
* | remove tc7_subr_* and tc7_lsubr_*...* libguile/tags.h: Remove tc7 #defines for subrs, replacing them with
placeholders. These were public, but hopfully unused. I don't see how
to usefully deprecate them.
* libguile/array-map.c (scm_array_map_x): Remove special cases for
certain subr types. This might make things slower for the moment,
otoh, native compilation should moot that question.
* libguile/eval.i.c:
* libguile/eval.c: Remove subr-handling cases. To regain this speed and
more won't have to wait for native compilation, though -- this change
smooths the way for subr dispatch in the VM.
* libguile/gsubr.c (scm_i_gsubr_apply): Fix a bug in which we didn't
detect too-many-arguments. This would only show up when using ceval,
as only ceval called this function.
* test-suite/tests/ramap.test ("array-map!"): Change the expected
exception if passed a procedure of the wrong arity. It now gives
wrong-num-args.
more won't have to wait for native compilation, though -- this change
smooths the way for subr dispatch in the VM.
* libguile/goops.c (scm_class_of): Remove subr cases. No speed
implication.
* libguile/objects.c (scm_valid_object_procedure_p): Remove this public
but undocumented, and useless, function. I do not think this will
affect anyone at all.
(scm_set_object_procedure_x): Replace a call to
scm_valid_object_procedure_p with scm_procedure_p, and actually wrap
with a scm_is_true.
* module/oop/goops.scm (initialize-object-procedure): Don't call
valid-object-procedure?.
| Andy Wingo | 2009-12-03 | 1 | -3/+0 |
* | new evaluator, y'all...* libguile/eval.c: So, ladies & gents, a new evaluator. It's similar to
the old one, in that we memoize and then evaluate, but in this
incarnation, memoization of an expression happens before evaluation,
not lazily as the expression is evaluated. This makes the evaluation
itself much cleaner, in addition to being threadsafe. In addition,
since this C evaluator will in the future just serve to bootstrap the
Scheme evaluator, we don't have to pay much concern for debugging
conveniences. So the environment is just a list of values, and the
memoizer pre-computes where it's going to find each individual value
in the environment.
Interface changes are commented below, with eval.h.
(scm_evaluator_traps): No need to reset the debug mode after rnning te
traps thing. But really, the whole traps system needs some love.
* libguile/memoize.h:
* libguile/memoize.c: New memoizer, which runs before evaluation,
checking all syntax before evaluation begins. Significantly, no
debugging information is left for lexical variables, which is not so
great for interactive debugging; perhaps we should change this to have
a var list in the future as per the classic interpreters. But it's
quite fast, and the resulting code is quite good. Also note that it
doesn't produce ilocs, memoized code is a smob whose type is in the
first word of the smob itself.
* libguile/eval.h (scm_sym_and, scm_sym_begin, scm_sym_case)
(scm_sym_cond, scm_sym_define, scm_sym_do, scm_sym_if, scm_sym_lambda)
(scm_sym_let, scm_sym_letstar, scm_sym_letrec, scm_sym_quote)
(scm_sym_quasiquote, scm_sym_unquote, scm_sym_uq_splicing, scm_sym_at)
(scm_sym_atat, scm_sym_atapply, scm_sym_atcall_cc)
(scm_sym_at_call_with_values, scm_sym_delay, scm_sym_eval_when)
(scm_sym_arrow, scm_sym_else, scm_sym_apply, scm_sym_set_x)
(scm_sym_args): Remove public declaration of these symbols.
(scm_ilookup, scm_lookupcar, scm_eval_car, scm_eval_body)
(scm_eval_args, scm_i_eval_x, scm_i_eval): Remove public declaration
of these functions.
(scm_ceval, scm_deval, scm_ceval_ptr): Remove declarations of these
deprecated functions.
(scm_i_print_iloc, scm_i_print_isym, scm_i_unmemocopy_expr)
(scm_i_unmemocopy_body): Remove declarations of these internal
functions.
(scm_primitive_eval_x, scm_eval_x): Redefine as macros for their less
destructive siblings.
* libguile/Makefile.am: Add memoize.[ch] to the build.
* libguile/debug.h (scm_debug_mode_p, scm_check_entry_p)
(scm_check_apply_p, scm_check_exit_p, scm_check_memoize_p)
(scm_debug_eframe_size): Remove these vars that were tied to the old
evaluator's execution model.
(SCM_RESET_DEBUG_MODE): Remove, no more need for this.
(SCM_MEMOIZEDP, SCM_MEMOIZED_EXP, SCM_MEMOIZED_ENV): Remove macros
referring to old memoized code representation.
(scm_local_eval, scm_procedure_environment, scm_memoized_environment)
(scm_make_memoized, scm_memoized_p): Remove functions operating on old
memoized code representation.
(scm_memcons, scm_mem_to_proc, scm_proc_to_mem): Remove debug-only
code for old evaluator.
* libguile/debug.c: Remove code to correspond with debug.h removals.
(scm_debug_options): No need to set the debug mode or frame limit
here, as we don't have C stack limits any more. Perhaps this is a bug,
but as long as we can compile eval.scm, we should be fine.
* libguile/init.c (scm_i_init_guile): Init memoize.c.
* libguile/modules.c (scm_top_level_env, scm_env_top_level)
(scm_env_module, scm_system_module_env_p): Remove these functions.
* libguile/print.c (iprin1): No more need to handle isyms. Adapt to new
form of interpreted procedures.
* libguile/procprop.c (scm_i_procedure_arity): Adapt to new form of
interpreted procedures.
* libguile/procs.c (scm_thunk_p): Adapt to new form of interpreted
procedures.
* libguile/procs.h (SCM_CLOSURE_FORMALS): Removed, this exists no more.
(SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS): New
accessors.
* libguile/srcprop.c (scm_source_properties, scm_source_property)
(scm_set_source_property_x): Remove special cases for memoized code.
* libguile/stacks.c (read_frame): Remove a source-property case for
interpreted code.
(NEXT_FRAME): Remove a case that I don't fully understand, that seems
to be designed to skip over apply frames. Will be obsolete in the
futures.
(read_frames): Default source value for interpreted frames to #f.
(narrow_stack): Don't pay attention to the system_module thing.
* libguile/tags.h: Remove isyms and ilocs. Whee!
* libguile/validate.h (SCM_VALIDATE_MEMOIZED): Fix to use the new
MEMOIZED_P formulation.
* module/ice-9/psyntax-pp.scm (do, quasiquote, case): Adapt for these no
longer being primitive macros.
* module/ice-9/boot-9.scm: Whitespace change, but just a poke to force a
rebuild due to and/or/cond/... not being primitives any more.
* module/ice-9/deprecated.scm (unmemoize-expr): Deprecate, it's
unmemoize-expression now.
* test-suite/tests/eval.test ("define set procedure-name"): XFAIL a
couple of tests here; I don't know what to do about them. I reckon the
expander should ensure that defined values are named.
* test-suite/tests/chars.test ("basic char handling"): Fix expected
exception when trying to apply a char.
| Andy Wingo | 2009-12-01 | 1 | -1/+1 |
* | a very big commit cleaning up structs & goops. also applicable structs....I tried to split this one, and I know it's a bit disruptive, but this
stuff really is one big cobweb. So instead we'll pretend like these are
separate commits, by separating the changelog.
Applicable struct runtime support.
* libguile/debug.c (scm_procedure_source):
* libguile/eval.c (scm_trampoline_0, scm_trampoline_1)
(scm_trampoline_2):
* libguile/eval.i.c (CEVAL):
* libguile/goops.c (scm_class_of):
* libguile/procprop.c (scm_i_procedure_arity):
* libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Allow
for applicable structs. Whee!
* libguile/deprecated.h (scm_vtable_index_vtable): Define as a synonym
for scm_vtable_index_self.
(scm_vtable_index_printer): Alias scm_vtable_index_instance_printer.
(scm_struct_i_free): Alias scm_vtable_index_instance_finalize.
(scm_struct_i_flags): Alias scm_vtable_index_flags.
(SCM_STRUCTF_FLAGS): Be a -1 mask, we have a whole word now.
(SCM_SET_VTABLE_DESTRUCTOR): Implement by hand.
Hidden slots.
* libguile/struct.c (scm_make_struct_layout): Add support for "hidden"
fields, writable fields that are not visible to make-struct. This
allows us to add fields to vtables and not break existing make-struct
invocations.
(scm_struct_ref, scm_struct_set_x): Always get struct length from the
vtable. Support hidden fields.
* libguile/goops.c (scm_class_hidden, scm_class_protected_hidden): New
slot classes, to correspond to the new vtable slots.
(scm_sys_prep_layout_x): Turn hidden slots into 'h'.
(build_class_class_slots): Reorder the class slots to account for
vtable fields coming out of negative-land, for name as a vtable slot,
and for hidden fields.
(create_standard_classes): Define <hidden-slot> and
<protected-hidden-slot>.
Clean up struct.h.
* libguile/struct.h: Lay things out cleaner. There are no more hidden
(negative) words. Names are nicer. The exposition is nicer. But the
basics are the same. The incompatibilities are that <vtable> has more
slots now, and that scm_alloc_struct's signature has changed. The
former is ameliorated by the "hidden" slots mentioned before, and the
latter, well, it was always a very internal thing...
(scm_t_struct_finalize): New type, a finalizer function to be run when
instances of a vtable are collected.
(scm_t_struct_free): Removed, structs' data is managed by the GC now,
and not freed by vtable functions.
* libguile/struct.c: (scm_vtable_p): Now we keep flags on
vtable-vtables, so this check is cheaper.
(scm_alloc_struct): No hidden words. Yippee.
(struct_finalizer_trampoline): Entersify.
(scm_make_struct): No need to babysit extra words, though now we have
to babysit flags. Propagate the vtable, applicable, and setter flags
appropriately.
(scm_make_vtable_vtable): Update for new simplicity.
(scm_print_struct): A better printer.
(scm_init_struct): Define <applicable-struct-vtable>, a magical vtable
like CL's funcallable-standard-class. Also define
<applicable-struct-with-setter-vtable>.
Remove foreign object implementation.
* libguile/goops.h:
* libguile/goops.c (scm_make_foreign_object, scm_make_class)
(scm_add_slot, scm_wrap_object, scm_wrap_component): Remove, these
were undocumented and unworking.
Clean up goops.h, a little.
* libguile/goops.h:
* libguile/goops.c: Also clean up.
* module/oop/goops/dispatch.scm (hashset-index): Adapt for new hashset
index.
| Andy Wingo | 2009-11-26 | 1 | -7/+9 |
* | fold objects.[ch] into goops.[ch]...Remove objects.h #includes as appropriate.
| Andy Wingo | 2009-11-15 | 1 | -1/+0 |
* | remove support for "entities" -- a form of applicable struct...Entities were meant to be a form of applicable struct. Unfortunately,
the implementation is intertwingled with generics. Removing them, for
now, will make it possible to cleanly re-add applicable struct support.
* libguile/struct.h (SCM_STRUCTF_ENTITY): Remove.
(SCM_STRUCTF_GOOPS_HACK): New flag; sigh.
* libguile/struct.c (scm_make_struct): We make "entity" structs if the
GOOPS_HACK flag is set. This will be fixed when we rework flags and
remove hidden words.
* libguile/goops.c (scm_class_of): Structs are not applicable, for now
at least.
(scm_sys_inherit_magic_x, scm_basic_basic_make_class)
(scm_sys_allocate_instance, scm_sys_set_object_setter_x):
(make_struct_class): Adapt for no more entities (and thus no entity
flag).
(create_standard_classes): For some reason, generic functions were
getting the LIGHT flag set, after the ENTITY flag was removed; so for
now explicitly clear that flag.
* libguile/goops.h (SCM_GENERIC_SETTER, SCM_SET_GENERIC_SETTER): New
macros.
* libguile/objects.h:
* libguile/objects.c: Remove code for entities.
* libguile/debug.c: (scm_procedure_source): Only work with generics.
* libguile/eval.c (scm_trampoline_0, scm_trampoline_1)
(scm_trampoline_2): Only handle generics.
* libguile/eval.i.c (CEVAL): #ifdef out the pieces about entities.
* libguile/procprop.c (scm_i_procedure_arity): Remove support for
entities.
* libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Remove
entity support.
| Andy Wingo | 2009-11-15 | 1 | -4/+5 |
* | remove operators | Andy Wingo | 2009-11-15 | 1 | -6/+4 |
* | de-nargs struct scm_objcode; procedure-property refactor...* libguile/objcodes.h (struct scm_objcode): Remove nargs, nrest, and
nlocs, as they are no longer needed. Also obviates the need for a
padding word.
* libguile/procs.c (scm_thunk_p): Use scm_i_program_arity for programs.
* libguile/procprop.c (scm_i_procedure_arity): Use scm_i_program_arity
for programs.
(scm_procedure_properties, scm_set_procedure_properties_x)
(scm_procedure_property, scm_set_procedure_property_x): Rework so that
non-closure properties are stored directly in a weak hash, instead of
needing a weak hash of "stand-in" closures to hold the properties. Fix
docstrings also.
* libguile/root.h (scm_stand_in_procs): Remove from the scm_sys_protects
set. Actually with libGC, we should be able to store the elements of
scm_sys_protects directly as global variables.
* libguile/gc.c (scm_init_storage): Remove scm_stand_in_procs
initialization.
* libguile/programs.c (scm_i_program_arity): New private accessor, tries
to determine the "minimum arity" of a program.
* libguile/vm.c (really_make_boot_program): Adapt to changes in
struct scm_objcode.
* module/language/assembly.scm (*program-header-len*, byte-length):
* module/language/assembly/compile-bytecode.scm (write-bytecode):
* module/language/assembly/decompile-bytecode.scm (decode-load-program):
* module/language/assembly/disassemble.scm (disassemble-load-program):
Adapt to changes in objcode.
* module/system/xref.scm (program-callee-rev-vars): Adapt to changes in
assembly.
* module/language/glil.scm: Remove nargs, nrest, and nlocs from
glil-program.
* module/language/glil/compile-assembly.scm (make-meta, glil->assembly):
* module/language/glil/decompile-assembly.scm (decompile-toplevel):
(decompile-load-program): Adapt to changes in GLIL and assembly.
* module/language/tree-il/compile-glil.scm (flatten-lambda): Adapt to
changes in GLIL.
* test-suite/tests/asm-to-bytecode.test: Adapt to assembly and bytecode
changes.
* test-suite/tests/tree-il.test: Adapt to GLIL changes.
| Andy Wingo | 2009-10-23 | 1 | -6/+8 |
* | Merge branch 'master' into boehm-demers-weiser-gc...Conflicts:
libguile/Makefile.am
libguile/bytevectors.c
libguile/gc-card.c
libguile/gc-mark.c
libguile/programs.c
libguile/srcprop.c
libguile/srfi-14.c
libguile/symbols.c
libguile/threads.c
libguile/unif.c
libguile/vm.c
| Ludovic Courtès | 2009-08-28 | 1 | -0/+9 |
|\ |
|
| * | programs have their own tc7 now...* libguile/tags.h (scm_tc7_program):
* libguile/programs.h: Programs now have their own tc7 code. Fix up the
macros appropriately.
* libguile/programs.c: Remove smobby bits, leaving marking, printing,
and application for other parts of Guile.
* libguile/debug.c (scm_procedure_source):
* libguile/eval.c (scm_trampoline_0, scm_trampoline_1)
(scm_trampoline_2): Add cases for tc7_program.
* libguile/eval.i.c (CEVAL, SCM_APPLY):
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/gc-card.c (scm_i_sweep_card, scm_i_tag_name):
* libguile/gc-mark.c (1):
* libguile/print.c (iprin1):
* libguile/procs.c (scm_procedure_p, scm_thunk_p)
* libguile/vm-i-system.c (make-closure): Adapt to new procedure
representation.
* libguile/procprop.c (scm_i_procedure_arity): Do the right thing for
programs.
* test-suite/tests/procprop.test ("procedure-arity"): Arity test now
succeeds.
* libguile/goops.c (scm_class_of): Programs now belong to the class
<procedure>, not a smob class.
* libguile/vm.h (struct vm, struct vm_cont):
* libguile/vm-engine.c (vm_engine):
* libguile/frames.h (SCM_FRAME_BYTE_CAST, struct vm_frame):
* libguile/frames.c (scm_c_make_vm_frame): Fix usages of scm_byte_t,
changing them to scm_t_uint8.
| Andy Wingo | 2009-08-20 | 1 | -0/+5 |
| * | procedure-documentation works on vm procedures...* libguile/procs.c (scm_procedure_documentation): Add a hack so that
this function works for compiled procedures too.
| Andy Wingo | 2009-08-19 | 1 | -0/+4 |
* | | Merge branch 'master' into boehm-demers-weiser-gc...Conflicts:
lib/Makefile.am
libguile/Makefile.am
libguile/frames.c
libguile/gc-card.c
libguile/gc-freelist.c
libguile/gc-mark.c
libguile/gc-segment.c
libguile/gc_os_dep.c
libguile/load.c
libguile/macros.c
libguile/objcodes.c
libguile/programs.c
libguile/strings.c
libguile/vm.c
m4/gnulib-cache.m4
m4/gnulib-comp.m4
m4/inline.m4
| Ludovic Courtès | 2009-08-18 | 1 | -10/+15 |
|\| |
|
| * | rename SCM_SNAME to SCM_SUBR_NAME...* libguile/procs.h: Rename SCM_SNAME to SCM_SUBR_NAME.
* libguile/debug.c:
* libguile/eval.c:
* libguile/eval.i.c:
* libguile/goops.c:
* libguile/gsubr.c:
* libguile/print.c:
* libguile/procs.c: Update callers.
| Andy Wingo | 2009-06-19 | 1 | -3/+3 |
| * | Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
| Neil Jerram | 2009-06-17 | 1 | -6/+7 |
| * | fix a tricky GC bug in scm_c_make_subr...* libguile/procs.c (scm_c_make_subr): Fix a really tricky bug!!! If
scm_double_cell caused GC, the symbolic name wouldn't be marked. But
the symptom wouldn't appear until you accessed that symbol much later,
for example during tab completion / apropos grovelling. Not sure why we
didn't see this earlier.
| Andy Wingo | 2009-04-17 | 1 | -1/+5 |
* | | Merge branch 'master' into boehm-demers-weiser-gc...Conflicts:
libguile/continuations.c
libguile/gc-freelist.c
libguile/gc-mark.c
libguile/symbols.c
libguile/threads.c
module/ice-9/boot-9.scm
| Ludovic Courtès | 2009-03-22 | 1 | -4/+23 |
|\| |
|
| * | Merge commit 'e20d7001c3f7150400169fecb0bf0eefdf122fe2' into vm-check...Conflicts:
libguile/stacks.c
| Andy Wingo | 2009-03-17 | 1 | -45/+2 |
| |\ |
|
| * \ | Merge commit 'e092357058850a6f998bf462bdc5504c6379c96f' into vm-check | Andy Wingo | 2009-03-17 | 1 | -57/+12 |
| |\ \ |
|
| * \ \ | Merge commit 'feccd2d3100fd2964d4c2df58ab3da7ce4949a66' into vm-check | Andy Wingo | 2009-03-17 | 1 | -1/+1 |
| |\ \ \ |
|
| * \ \ \ | Merge commit 'cce8b2ce93703aff953750fb40cb53176ea66504' into vm-check | Andy Wingo | 2009-03-17 | 1 | -3/+3 |
| |\ \ \ \ |
|
| * \ \ \ \ | Merge commit 'e95d11110b7af0f528404d28209c3a464ab7074d' into vm-check | Andy Wingo | 2009-03-17 | 1 | -3/+3 |
| |\ \ \ \ \ |
|
| * | | | | | | static opcodes; refactor program/objcode division; use new assembly pipeline...* gdbinit: Untested attempts to get the stack fondling macros to deal
with the new program representation.
* libguile/frames.c (scm_vm_frame_arguments, scm_vm_frame_source)
(scm_vm_frame_local_ref, scm_vm_frame_local_set_x): SCM_PROGRAM_DATA is
a struct scm_objcode*.
* libguile/instructions.h:
* libguile/instructions.c: Hide the instruction table and the struct
scm_instruction structure; all access to instructions now goes through
procedures. This is because instructions are no longer in a packed
array indexed by opcode. Also, declare a mask that all instructions
should fit in.
* libguile/objcodes.h:
* libguile/objcodes.c: Rewrite so that object code directly maps its
arity and length from its bytecode. This makes it unnecessary to keep
this information in programs, allowing programs to be simple conses
between the code (objcodes) and data (the object table and the closure
variables).
* libguile/programs.c (scm_make_program): Rework so that make-program
takes objcode, an object table, and externals as arguments. It's much
clearer this way, and we avoid malloc().
* libguile/stacks.c (is_vm_bootstrap_frame): Update for program/objcode
changes.
* libguile/vm-engine.c (vm_run): Initialize the jump table on the first
run, with the opcodes declared in the instruction sources, and with bad
instructions raising an error instead of wandering off into the
Unknown.
* libguile/vm-engine.h (FETCH_LENGTH): Always represent lengths as 3
bytes. The old code was too error-prone.
(NEXT_JUMP): Mask the instruction with SCM_VM_INSTRUCTION_MASK.
(NEW_FRAME): Update for program/objcode changes.
* libguile/vm-expand.h (VM_DEFINE_FUNCTION, VM_DEFINE_INSTRUCTION)
(VM_DEFINE_LOADER): Update so that we explicitly specify opcodes, so
that we have a stable bytecode API.
* libguile/vm-i-loader.c: Update license to LGPLv2+. Explicitly declare
opcodes.
(load-integer): Use an int instead of a long as the accumulator; still
need to revisit this code at some point, I think.
(load-program): Simplify, thankfully!! Just creates the objcode slice
and rolls with it.
* libguile/vm-i-scheme.c: Number the opcodes explicitly.
* libguile/vm-i-system.c: Update license to LGPLv2+. Explicitly declare
opcodes.
(make-closure): Update for new program API.
* libguile/vm.c (vm_make_boot_program): Update for new program/objcode
API. Still a bit ugly.
(scm_load_compiled_with_vm): Update for new program/objcode API.
* module/language/assembly.scm (byte-length): Fix byte-length calculation
for loaders, and load-program.
(code-pack, code-unpack): Start to move things from (system vm conv)
here.
(object->code, code->object): More things from conv.scm.
* module/language/glil.scm (<glil-program>): Add a new field,
closure-level.
(make-glil-program, compute-closure-level): Calculate the "closure
level" when making a glil program. This is the maximum depth of
external binding refs in this closure.
(unparse-glil): Fix label serialization.
* module/language/glil/compile-assembly.scm (make-meta): Prepend #f for
the meta's object table, though maybe in the future we can avoid
creating assembly in the first place.
(assoc-ref-or-acons, object-index-and-alist): GRRR! Caught again by the
different sets of arguments to assoc and assoc-ref!
(glil->assembly): Attempt to make the <glil-program> case more
readable, and fix the bugs. Sorry I don't know how to comment this
change any more than this.
(glil->assembly): For <glil-module> serialize the whole key, not just
the name.
(dump-object): subprogram-code is already a list. Serialize integers as
strings, not u8vectors. Fix the order of lists and vectors.
* module/language/glil/spec.scm (glil): Switch orders, so we prefer glil
-> assembly -> objcode. Actually glil->objcode doesn't work any more,
needs to be removed I think.
* module/language/objcode/spec.scm (objcode->value):
s/objcode->program/make-program/.
* module/language/scheme/inline.scm: Add acons inline.
* module/system/vm/conv.scm (make-byte-decoder): Skip the first 8 bytes,
they are header. Handle subprograms properly. Still needs help though.
(decode-length): Lengths are always 3 bytes now.
* module/system/vm/disasm.scm: Superficial changes to keep things
working. I'd like to fix this better in the future.
* module/system/vm/frame.scm (bootstrap-frame?): Fixes for
program-bytecode.
* module/system/vm/program.scm: Export make-program. It's program-objcode
now, no more program-bytecode.
* module/system/vm/vm.scm (vm-load): Use make-program.
* test-suite/tests/asm-to-bytecode.test: New test, very minimal.
* module/system/vm/objcode.scm: Export word-size, byte-order, and
write-objcode.
| Andy Wingo | 2009-01-29 | 1 | -0/+1 |
| * | | | | | | make-procedure-with-setter inherits name from getter...* libguile/procs.c (scm_make_procedure_with_setter): Patch through the
getter's procedure name to the procedure-with-setter. Fixes part of the
srfi-17 test, as the VM doesn't set procedure-name on define -- but
perhaps that is the bug that should be fixed. In any case this patching
is cheap.
* test-suite/tests/eval.test: Change so that (define name pws) is
initially passed an anonymous procedure-with-setter, as was the case
before the procs.c change.
| Andy Wingo | 2008-11-01 | 1 | -3/+18 |
| * | | | | | | Merge commit 'origin/master' into vm...Conflicts:
doc/Makefile.am
ice-9/Makefile.am
libguile/gc.c
| Andy Wingo | 2008-09-30 | 1 | -1/+4 |
| |\ \ \ \ \ \ |
|
| * | | | | | | | make thunk? understand programs...* libguile/procs.c (thunk?): Return #t for thunk programs.
| Andy Wingo | 2008-09-07 | 1 | -1/+4 |
* | | | | | | | | Merge branch 'master' into boehm-demers-weiser-gc...Conflicts:
libguile/gc-card.c
libguile/gc-mark.c
| Ludovic Courtès | 2009-03-08 | 1 | -45/+2 |
|\ \ \ \ \ \ \ \
| | |_|_|_|_|_|/
| |/| | | | | | |
|
| * | | | | | | | Remove "compiled closures" ("cclos") in favor of a simpler mechanism....The idea is to introduce `gsubrs' whose arity is encoded in their type
(more precisely in the sizeof (void *) - 8 MSBs). This removes the
indirection introduced by cclos and simplifies the code.
* libguile/__scm.h (CCLO): Remove.
* libguile/debug.c (scm_procedure_source, scm_procedure_environment):
Remove references to `scm_tc7_cclo'.
* libguile/eval.c (scm_trampoline_0, scm_trampoline_1,
scm_trampoline_2): Replace `scm_tc7_cclo' with `scm_tc7_gsubr'.
* libguile/eval.i.c (CEVAL): Likewise. No longer make PROC the first
argument. Directly invoke `scm_gsubr_apply ()' instead of jump to the
`evap(N+1)' label or call to `SCM_APPLY ()'.
* libguile/evalext.c (scm_self_evaluating_p): Remove reference to
`scm_tc7_cclo'.
* libguile/gc-card.c (scm_i_sweep_card, scm_i_tag_name): Likewise.
* libguile/gc-mark.c (scm_gc_mark_dependencies): Likewise.
* libguile/goops.c (scm_class_of): Likewise.
* libguile/print.c (iprin1): Likewise.
* libguile/gsubr.c (create_gsubr): Use `unsigned int's for REQ, OPT and
RST. Use `scm_tc7_gsubr' instead of `scm_makcclo ()' in the default
case.
(scm_gsubr_apply): Remove calls to `SCM_GSUBR_PROC ()'.
(scm_f_gsubr_apply): Remove.
* libguile/gsubr.h (SCM_GSUBR_TYPE): New definition.
(SCM_GSUBR_MAX): Changed to 33.
(SCM_SET_GSUBR_TYPE, SCM_GSUBR_PROC, SCM_SET_GSUBR_PROC,
scm_f_gsubr_apply): Remove.
* libguile/procprop.c (scm_i_procedure_arity): Remove reference to
`scm_tc7_cclo'; add proper handling of `scm_tc7_gsubr'.
* libguile/procs.c (scm_makcclo, scm_make_cclo): Remove.
(scm_procedure_p): Remove reference to `scm_tc7_cclo'.
(scm_thunk_p): Likewise, plus add proper `scm_tc7_gsubr' handling.
* libguile/procs.h (SCM_CCLO_LENGTH, SCM_MAKE_CCLO_TAG,
SCM_SET_CCLO_LENGTH, SCM_CCLO_BASE, SCM_SET_CCLO_BASE, SCM_CCLO_REF,
SCM_CCLO_SET, SCM_CCLO_SUBR, SCM_SET_CCLO_SUBR, scm_makcclo,
scm_make_cclo): Remove.
* libguile/stacks.c (read_frames): Remove reference to `scm_f_gsubr_apply'.
* libguile/tags.h (scm_tc7_cclo): Remove.
(scm_tc7_gsubr): New.
(scm_tcs_subrs): Add `scm_tc7_gsubr'.
| Ludovic Courtès | 2009-03-02 | 1 | -45/+2 |
| | |_|_|_|_|/
| |/| | | | | |
|