1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

3884 commits

Author SHA1 Message Date
Andy Wingo
e8b883035d Tweak optimization order
* module/language/cps/optimize.scm (optimize-first-order-cps): Move up
  the simplify-primcalls pass, to allow DCE to take away unneeded
  constants.  An incremental step
2017-11-05 15:00:16 +01:00
Andy Wingo
1160690fde reify-primitives reifies constants for out-of-range imm params
* module/language/cps/reify-primitives.scm (reify-primitives): Add pass
  to re-reify constant arguments for primcalls with immediate parameters
  that can't be encoded as bytecode.
2017-11-05 15:00:16 +01:00
Andy Wingo
cc1b23ffe8 Remaining /immediate instructions take primcall imm param
* module/language/cps/compile-bytecode.scm (compile-function): Update
  add/immediate, etc.
* module/language/cps/slot-allocation.scm (compute-needs-slot):
  Simplify.
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
  Rework for add/immediate, etc.
* module/language/cps/types.scm (define-unary-result!)
  (define-binary-result!): Take types as params instead of variables, so
  we can share this code with /imm variants.
  (add/immediate, sub/immediate, uadd/immediate, usub/immediate)
  (umul/immediate, ulsh/immediate, ursh/immediate): Update type
  inferrers.
2017-11-05 15:00:16 +01:00
Andy Wingo
56d639bfe5 builtin-ref takes immediate parameter
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/reify-primitives.scm (builtin-ref):
* module/language/cps/slot-allocation.scm (compute-needs-slot):
  Builtin-ref uses immediate parameter.
2017-11-05 15:00:16 +01:00
Andy Wingo
d7ecf35d70 Immediate parameter for struct-ref et al
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/cse.scm (compute-equivalent-subexpressions):
* module/language/cps/effects-analysis.scm:
* module/language/cps/slot-allocation.scm (compute-needs-slot):
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
* module/language/cps/types.scm (allocate-struct/immediate)
  (struct-ref/immediate, struct-set!/immediate): Immediate struct
  constructor and accessor use immediate primcall parameters.
2017-11-05 15:00:16 +01:00
Andy Wingo
f9b8763921 Immediate variants of vector-ref, etc use immediate param
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/cse.scm (compute-equivalent-subexpressions):
* module/language/cps/effects-analysis.scm:
* module/language/cps/slot-allocation.scm (compute-needs-slot):
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
* module/language/cps/types.scm (make-vector/immediate):
  (vector-ref/immediate, vector-set!/immediate): Use immediate primcall
  param.
2017-11-05 15:00:16 +01:00
Andy Wingo
2f45cfcb9c free-ref, free-set take immediate parameters
* module/language/cps/closure-conversion.scm (convert-one):
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm (define-primitive-effects*)
  (expression-effects, primitive-effects): Only fall back to passing
  constant table if the immediate parameter is false.  Adapt closure
  effects analysis.
* module/language/cps/slot-allocation.scm (compute-needs-slot): Remove
  special cases for free-ref/free-set!.
2017-11-05 15:00:16 +01:00
Andy Wingo
6be04684e6 load-f64, etc take immediate parameters
* module/language/cps/compile-bytecode.scm (compile-function): Make
  load-f64, load-s64, and load-u64 take an immediate parameter instead
  of a CPS value.
* module/language/cps/effects-analysis.scm: Remove CPS argument from
  immediate load instructions.
* module/language/cps/slot-allocation.scm (compute-needs-slot): Remove
  special case for load-64 etc.
* module/language/cps/specialize-numbers.scm
  (specialize-u64-scm-comparison): Adapt.
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
  Adapt.
* module/language/cps/types.scm (define-type-inferrer*): Also take param
  argument.
  (define-type-inferrer, define-predicate-inferrer): Adapt.
  (define-type-inferrer/param): New helper.
  (load-f64, load-s64, load-u64): Adapt inferrers to pass on value from
  param.
* module/language/cps/utils.scm (compute-constant-values): Adapt.
2017-11-05 15:00:16 +01:00
Andy Wingo
4fb538e90e cache-current-module, etc use immediate primcall parameters
* module/language/bytecode.scm (*macro-instruction-arities*):
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm (current-module):
* module/language/cps/primitives.scm (*macro-instruction-arities*):
* module/language/cps/prune-top-level-scopes.scm (compute-used-scopes):
  (prune-top-level-scopes):
* module/language/cps/reify-primitives.scm (module-box):
* module/language/cps/slot-allocation.scm (compute-needs-slot):
* module/language/tree-il/compile-cps.scm (toplevel-box):
  (module-box, capture-toplevel-scope): Move the primcalls that deal
  with top-level references to use immediate parameters.
2017-11-05 15:00:16 +01:00
Andy Wingo
c54c151eb6 $primcall has a "param" member
* module/language/cps.scm ($primcall): Add "param" member, which will be
  a constant parameter to the primcall.  The idea is that constants used
  by primcalls as immediates don't need to participate in optimizations
  in any way -- they should not participate in CSE, have the same
  lifetime as the primcall so not part of DCE either, and don't need
  slot allocation.  Indirecting them through a named $const binding is
  complication for no benefit.  This change should eventually improve
  compilation time and memory usage, once we fully take advantage of it,
  as the number of labels and variables will go down.
* module/language/cps/closure-conversion.scm:
* module/language/cps/compile-bytecode.scm:
* module/language/cps/constructors.scm:
* module/language/cps/contification.scm:
* module/language/cps/cse.scm:
* module/language/cps/dce.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/elide-values.scm:
* module/language/cps/handle-interrupts.scm:
* module/language/cps/licm.scm:
* module/language/cps/peel-loops.scm:
* module/language/cps/prune-bailouts.scm:
* module/language/cps/prune-top-level-scopes.scm:
* module/language/cps/reify-primitives.scm:
* module/language/cps/renumber.scm:
* module/language/cps/rotate-loops.scm:
* module/language/cps/self-references.scm:
* module/language/cps/simplify.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/specialize-numbers.scm:
* module/language/cps/specialize-primcalls.scm:
* module/language/cps/split-rec.scm:
* module/language/cps/type-checks.scm:
* module/language/cps/type-fold.scm:
* module/language/cps/types.scm:
* module/language/cps/utils.scm:
* module/language/cps/verify.scm:
* module/language/tree-il/compile-cps.scm: Adapt all users.
2017-11-05 15:00:16 +01:00
Daniel Llorens
e0bcda4ad9 Fix bitvectors and non-zero lower bound arrays in truncated-print
* module/ice-9/arrays.scm (array-print-prefix): New private function.
* libguile/arrays.c (scm_i_print_array): Reuse (array-print-prefix) from
  (ice-9 arrays). Make sure to release the array handle.
* module/ice-9/pretty-print.scm (truncated-print): Support
  bitvectors.
  Don't try to guess the array prefix but call array-print-prefix from
  (ice-9 arrays) instead.
  Fix call to print-sequence to support non-zero lower bound arrays.
* test-suite/tests/arrays.test: Test that arrays print properly.
* test-suite/tests/print.test: Test truncated-print with bitvectors,
  non-zero lower bound arrays.
2017-10-31 13:23:44 +01:00
Daniel Llorens
3bfd4aaa6e Fix sort, sort! for arrays with nonzero lower bound
* module/ice-9/arrays.scm (array-copy): New function, export.
* module/Makefile.am: Install (ice-9 arrays).
* doc/ref/api-data.texi: Add documentation for (ice-9 arrays).
* libguile/quicksort.i.c: Use signed bounds throughout.
* libguile/sort.c (scm_restricted_vector_sort_x): Fix error calls. Fix
  calls to quicksort.
* test-suite/tests/sort.test: Actually test that the sorted results
  match the original data. Test cases for non-zero base index arrays for
  sort, sort!, and stable-sort!.
2017-10-31 13:23:17 +01:00
Andy Wingo
9ceab9962a Simplify special immediate predicate inferrer.
* module/language/cps/types.scm
  (define-special-immediate-predicate-inferrer): Simplify.
2017-10-30 12:06:11 +01:00
Andy Wingo
9d62724c08 Remove disassembler support for old-style jump instructions
* module/system/vm/disassembler.scm (code-annotation, compute-labels)
  (instruction-has-fallthrough?, define-jump-parser): Remove
  disassembler support for old-style jump instructions.
2017-10-30 12:06:11 +01:00
Andy Wingo
c92b80be2d Emit new instructions in function preludes
* module/system/vm/assembler.scm (standard-prelude, opt-prelude):
  (kw-prelude): Emit new instructions in function preludes.  Now all
  branches are via the new instructions.  Remove exports for old
  branches.
2017-10-30 12:06:07 +01:00
Andy Wingo
5fb9b7d542 Remove assembler exports for old-style predicates and branches
* module/system/vm/assembler.scm: Remove emit-br, emit-br-if-true, etc,
  as these all now use new-style instructions.
2017-10-30 11:55:27 +01:00
Andy Wingo
0d42f5467f Lower logtest branches to instead be 'zero? logand'
* module/language/cps/compile-bytecode.scm (compile-function): Rename
  the binary* helper back to binary, update uses, and remove logtest
  branch as we no longer put logtest in test context.
* module/language/cps/primitives.scm (*comparisons*): Remove logtest.
* module/language/cps/type-fold.scm: Remove logtest folder.
  (logbit?): Fold to logand.
* module/language/cps/types.scm (logtest): Update to be a type inferrer
  and not a predicate inferrer.
* module/language/tree-il/peval.scm (peval): Transform logtest and
  logbit? to (zero? (logand _ _)).
2017-10-30 11:50:45 +01:00
Andy Wingo
d1c69b5c95 Remove compiler support for u64-scm comparisons
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm:
* module/language/cps/primitives.scm (*comparisons*):
* module/language/cps/type-fold.scm:
* module/language/cps/types.scm: Remove compiler support for u64-scm
  comparisons, as this is now inlined.
2017-10-29 21:02:56 +01:00
Andy Wingo
6bb0a96fa1 Inline u64/scm comparisons
* module/language/cps/specialize-numbers.scm
  (specialize-u64-scm-comparison): Inline comparisons against fixnums.
2017-10-29 20:35:30 +01:00
Andy Wingo
f34abbc396 Add hacks around lack of allocation sinking
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/cse.scm (compute-equivalent-subexpressions):
* module/language/cps/effects-analysis.scm:
* module/language/cps/primitives.scm (*macro-instruction-arities*):
* module/language/cps/specialize-numbers.scm (compute-specializable-vars):
* module/language/cps/types.scm: Add new variants of u64->scm and
  s64->scm that can't be replaced by CSE's auxiliary definitions, so we
  can sink unlikely allocations to side branches.  This is a hack until
  we can get allocation sinking working
2017-10-29 20:33:35 +01:00
Andy Wingo
c9ec866ef9 Add untag-fixnum instruction
* libguile/vm-engine.c (untag-fixnum): New instruction.
* module/language/cps/compile-bytecode.scm (compile-function):
* module/system/vm/assembler.scm (untag-fixnum):
* module/language/cps/slot-allocation.scm (compute-var-representations):
* module/language/cps/types.scm (untag-fixnum): Add compiler support for
  untag-fixnum.
2017-10-29 19:56:51 +01:00
Andy Wingo
31e7f44340 Add compiler support for fixnum? primcall predicate
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/type-fold.scm (fixnum?):
* module/language/cps/types.scm (fixnum?):
* module/system/vm/assembler.scm (system): Add cases for fixnum?
  primcall predicate.
2017-10-29 19:42:50 +01:00
Andy Wingo
79a2748f83 Add compiler support for s64 comparisons.
* module/language/cps/compile-bytecode.scm (compile-function): Add
  emitters for s64 comparisons.
* module/language/cps/effects-analysis.scm: Add entries.
* module/language/cps/primitives.scm (*comparisons*):
* module/language/cps/type-fold.scm (s64-<, s64-<=, s64-=, s64->=)
  (s64->): Add folders.
* module/language/cps/types.scm (s64-<, s64-<=, s64-=, s64->=, s64->):
  Add type checkers and inferrers.
2017-10-29 19:42:14 +01:00
Andy Wingo
73d1502630 Lower eqv? and equal? to new instructions.
* libguile/numbers.h:
* libguile/eq.c (scm_i_heap_numbers_equal_p): New helper, factored out
  of scm_eqv_p.
  (scm_eqv_p): Use new helper.
* libguile/vm-engine.c (heap-numbers-equal?): New op.
* module/language/cps/compile-bytecode.scm (compile-function): Add
  support for heap-number? and heap-numbers-equal?.  Remove case for
  eqv?.
* module/language/cps/effects-analysis.scm: Add heap-numbers-equal?.
* module/language/cps/primitives.scm (*comparisons*): Add
  heap-numbers-equal?.
* module/language/cps/type-fold.scm (heap-numbers-equal?): Update.
* module/language/cps/types.scm (heap-numbers-equal?): Update.
* module/language/tree-il/compile-cps.scm (canonicalize): Completely
  inline eqv?, and partially inline equal?.
* module/system/vm/assembler.scm (system): Export emit-heap-numbers-equal?.
2017-10-29 15:47:25 +01:00
Andy Wingo
c2fa345093 Add missing compiler support for heap-object? primcall et al.
* module/language/cps/effects-analysis.scm: Reorder effect-free
  primitives.  Add immediate predicates and heap-number?.
* module/language/cps/primitives.scm (*heap-type-predicates*): Add
  heap-number?.
* module/language/cps/type-fold.scm (heap-number?): New folder.
* module/language/cps/types.scm (heap-number?): New inferrer.
2017-10-29 14:35:19 +01:00
Andy Wingo
587842d874 Simplify lowering of branching primcalls to CPS
* module/language/tree-il/compile-cps.scm (canonicalize, convert):
  Simplify handling of branching primcalls so that `convert' only ever
  sees branching primcalls in a test context.
2017-10-29 14:31:36 +01:00
Andy Wingo
b4db70854b Rename "number" tag to "heap-number"
* module/system/base/types/internal.scm (heap-tags): Rename number to
  heap-number.
* module/system/vm/assembler.scm: Adapt for emit-heap-number?.
* module/system/base/types.scm (%tc7-heap-number): Rename from
  %tc7-number.
2017-10-29 14:07:25 +01:00
Andy Wingo
3ae245bc98 Minor optimization compiling 'and'
* module/language/tree-il/compile-cps.scm (convert): Fold test of
  constants directly to their branches without reifying booleans, to
  simplify "and" chains early.
2017-10-29 14:07:23 +01:00
Andy Wingo
9d1235af96 Use new instructions for f64 comparisons
* module/language/cps/compile-bytecode.scm (compile-function): Use new
  instructions for f64 comparisons.
2017-10-29 10:05:24 +01:00
Andy Wingo
8a96b5d085 Use new instructions for u64 comparisons.
* module/language/cps/compile-bytecode.scm (compile-function): Compile
  new instructions for u64 comparisons.
2017-10-29 10:05:24 +01:00
Andy Wingo
f8ac680965 Use new instructions for less-than, etc
* module/language/cps/compile-bytecode.scm (compile-function): Use new
  instructions for generic numeric comparisons (< <= = >= >).
2017-10-29 10:05:24 +01:00
Andy Wingo
056914b555 Emit new eq? instruction
* module/language/cps/compile-bytecode.scm (compile-function): Emit
  new-style eq? instruction.
2017-10-29 10:05:24 +01:00
Andy Wingo
c119623e45 Simplify $branch to always take a $primcall
* module/language/tree-il/compile-cps.scm (convert): Lower (if foo A B)
  to (if (false? foo) B A).
* module/language/cps/specialize-numbers.scm:
* module/language/cps/closure-conversion.scm:
* module/language/cps/contification.scm:
* module/language/cps/cse.scm:
* module/language/cps/dce.scm:
* module/language/cps/peel-loops.scm:
* module/language/cps/rotate-loops.scm:
* module/language/cps/self-references.scm:
* module/language/cps/simplify.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/split-rec.scm:
* module/language/cps/type-fold.scm:
* module/language/cps/types.scm:
* module/language/cps/verify.scm: Adapt.
* module/language/cps/compile-bytecode.scm: Add support for new-style
  false? instruction for false? primcall.
2017-10-29 10:05:24 +01:00
Andy Wingo
c74b2257c7 Use new instructions for null?, nil?
* module/language/cps/compile-bytecode.scm (compile-function): Use new
  instructions for branches on null? and nil?.
2017-10-29 10:05:24 +01:00
Andy Wingo
e3c062dce6 Emit char? instead of br-if-char
* module/language/cps/compile-bytecode.scm (compile-function): Use new
  instructions for char? test.
2017-10-29 10:05:24 +01:00
Andy Wingo
29b8e32ffe Emit new instructions for heap object type tests
* module/language/cps/compile-bytecode.scm (compile-function): Compile
  heap object tests to use the new instructions.
2017-10-29 10:05:24 +01:00
Andy Wingo
1139c10e09 Heap type predicates preceded by heap-object?
* module/language/cps/compile-bytecode.scm (compile-function): Add
  support for heap-object? in test context.
* module/language/cps/primitives.scm (*immediate-predicates*):
  (*heap-type-predicates*, *comparisons*): New sets of predicates for
  which the VM has branching operations.
  (heap-type-predicate?): New predicate.
  (*branching-primcall-arities*): Make a hash table.
  (branching-primitive?, prim-arity): Adapt
  to *branching-primcall-arities* being a hash table.
* module/language/cps/type-fold.scm (heap-object?): Add folder.
* module/language/tree-il/compile-cps.scm (convert): Precede heap type
  checks with a heap-object? guard.
2017-10-29 10:05:24 +01:00
Andy Wingo
6dd30920eb Use tag visitors to generate assemblers, disassembly annotations
* module/system/vm/disassembler.scm (immediate-tag-annotations)
  (heap-tag-annotations): Generate using tag visitors.
* module/system/vm/assembler.scm
  (define-immediate-tag=?-macro-assembler)
  (define-heap-tag=?-macro-assembler): New helpers.  Use these to
  generate immediate-tag=? and heap-tag=? macro assemblers.
2017-10-29 10:05:24 +01:00
Andy Wingo
0a9fa88a85 Refactor (system base types internal) to use more macros
* module/system/base/types/internal.scm (visit-immediate-tags)
  (visit-heap-tags): New helpers.
* module/system/base/types/internal.scm (define-tags, define-tag): New
  helpers.
  (immediate-tags, heap-tags): Use define-tags to define all of the tag
  values.  For consistency some names are changed:
  (%tc2-fixnum): Renamed from %tc2-inum.
  (%tc8-flag): Removed.
  (%tc16-null): Renamed from %tc16-eol.
  (%tc7-weak-vector): Renamed from %tc7-wvect.
  (%tc7-hash-table): Renamed from %tc7-hashtable.
  (%tc7-flonum): Renamed from %tc7-real.
  (visit-heap-tags, visit-immediate-tags): New exports.
* module/system/base/types.scm (cell->object): Adapt to renamings.
  (match-bit-pattern): Add a case to match immediate SCM bits
  literally.
  (scm->object): Adapt to use the special immediate values directly.
* module/system/vm/disassembler.scm (immediate-tag-annotations):
  (heap-tag-annotations): Adapt to new names.
2017-10-29 10:05:20 +01:00
Andy Wingo
cd947a1161 Model all special immediates under one type bit (with range)
* module/language/cps/types.scm (&special-immediate): Model all special
  immediates (iflags) under this type bit.  This makes type analysis
  less precise on these values as we have to use ranges instead of sets
  to represent the values, but it frees up bits for other purposes,
  allowing us to totally model all types in Guile.
  (&eof): New &special-immediate value.
  (&other-heap-object): New type bit.
  Adapt inferrers.
* module/language/cps/type-fold.scm
  (define-special-immediate-predicate-folder): New helper, used for
  iflag comparisons.
  (local-type-fold): Adapt scalar-value for &special-immediate change.
  Delegate branch on $values to a primcall to `false?'.
2017-10-26 15:51:28 +02:00
Andy Wingo
2ca88789b1 Type inference distinguishes &fixnum and &bignum types
This will allow heap-object? / inum? predicates to do something useful.

* module/language/cps/types.scm (&fixnum, &bignum): Split &exact-integer
  into these types.  Keep &exact-integer as a union type.
  (type<=?): New helper.
  (constant-type): Return &fixnum or &bignum as appropriate.
  (define-exact-integer!): New helper, tries to make exact integer
  results be &fixnum if they are within range.  Adapt users.
  (restricted-comparison-ranges, define-binary-result!): Use type<=?
  instead of = for &exact-integer.
* module/language/cps/type-fold.scm (logtest, mul, logbit?): Use
  type<=?.
* module/language/cps/specialize-numbers.scm (inferred-sigbits):
  (specialize-operations): Use type<=?.
2017-10-26 15:23:16 +02:00
Ludovic Courtès
bf060d2aff 'frame-matcher' doesn't crash when the last IP is unknown.
This fixes a bug when using ",break":

  system/vm/traps.scm:127:31: system/vm/traps.scm:127:31: In procedure <: Wrong type: #f

* module/system/vm/traps.scm (frame-matcher): Check whether END is
true.
2017-10-25 10:48:50 -07:00
Andy Wingo
3d848f22f8 First step towards emitting new instructions: "j" instead of "br"
* module/language/cps/compile-bytecode.scm (compile-function): Emit "j"
  instructions instead of "br".
2017-10-25 16:53:18 +02:00
Andy Wingo
258c59b4cc Add assembler and disassembler support for new instructions
* module/system/vm/assembler.scm: Export assemblers for the new
  instructions.
* module/system/vm/disassembler.scm (immediate-tag-annotations)
  (heap-tag-annotations, code-annotation): Add support for disassembling
  the new instructions, with good annotations.
  (compute-labels, instruction-has-fallthrough?, define-jump-parser):
  Add support for new branching instructions.
2017-10-25 16:53:14 +02:00
Andy Wingo
38c6f6fabf Add (system base types internal).
* module/system/base/types/internal.scm: New file, extracted
  from (system base types).
* module/system/base/types.scm: Use (system base types internal) and
  adapt to %tc1-pair, %tc2-inum, and %tc3-heap-object name changes.
* module/Makefile.am (SOURCES):
* am/bootstrap.am (SOURCES): Add new file.
2017-10-25 12:55:30 +02:00
Andy Wingo
808000034e Add support for C16_C16 instruction words
* module/language/bytecode.scm (compute-instruction-arity):
* module/system/vm/assembler.scm (pack-u16-u16, expand):
* module/system/vm/disassembler.scm (disassembler):
* libguile/instructions.c (FOR_EACH_INSTRUCTION_WORD_TYPE): Add C16_C16.
2017-10-24 21:11:20 +02:00
Andy Wingo
f32500acca Add new vtable reserved unboxed field
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT)
  (scm_vtable_index_reserved_6): Add a reserved field.
* module/oop/goops.scm (fold-class-slots, unboxed-slot?): Reserve a new
  unboxed field.
2017-09-26 20:47:27 +02:00
Andy Wingo
c3a8112847 Fix GOOPS class redefinition type error.
* module/oop/goops.scm (allocate-instance): Fix error introduced in
  recent merge.
2017-09-25 22:37:38 +02:00
Andy Wingo
84259f54e3 Merge 'stable-2.2'
Resolve conflicts by removing capability of struct-ref / struct-set! to
access unboxed slots.
2017-09-25 22:18:13 +02:00
Andy Wingo
a74d4ee4f6 Add struct-ref/unboxed, struct-set!/unboxed
* NEWS: Add news entry.
* doc/ref/api-data.texi (Vtables, Structure Basics): Update
  documentation.
* libguile/struct.c (scm_i_struct_equalp): Avoid using struct-ref on
  unboxed fields.
  (scm_struct_ref, scm_struct_set_x_unboxed): Issue deprecation warning
  when accessing unboxed fields.
  (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions.
* libguile/struct.h (scm_struct_ref_unboxed, scm_struct_set_x_unboxed):
  New functions.
* module/oop/goops.scm (class-add-flags!, class-clear-flags!):
  (class-has-flags?, <class>, %allocate-instance, <slot>):
  (compute-get-n-set, unboxed-get, unboxed-set, unboxed-slot?):
  (allocate-slots, %prep-layout!, make-standard-class, initialize):
  Adapt to access unboxed nfields and flags fields via the new
  accessors.
2017-09-25 21:54:36 +02:00