Commit graph

7 commits

Author SHA1 Message Date
Jan Nieuwenhuizen 40593ac218 Bugfixes bytevectors.
* math.c (modulo): Modulo of negative value correctly.
* module/mes/bytevectors.mes (bytevector-u32-native-set!):
  (bytevector-u16-native-set!): Use ash instead of quotient.
2017-01-04 21:44:38 +01:00
Jan Nieuwenhuizen c2bfeffe96 core: Remove make_number.
* mes.c (MAKE_NUMBER): New macro.
  (tmp_num_, tmp_num_2): New function.
  (make_number): Remove.  Update callers.
2016-12-23 16:22:19 +01:00
Jan Nieuwenhuizen e97d99c03a Add ash.
* math.c (ash): New function.
* tests/scm.test (ash, ash -1): New tests.
2016-12-20 20:10:43 +01:00
Jan Nieuwenhuizen e6a0257a79 core: Cleanup cells.
* mes.c: Use accessors rather than g_cell[] access throughout.
2016-12-12 20:35:19 +01:00
Jan Nieuwenhuizen 61e42e8527 core: Number based cells.
* mes.c (scm_t): Change car, string, ref, cdr, macro, vector into g_cell index
  [WAS]: scm_t pointer.
* define.c: Update.
* lib.c: Update.
* math.c: Update.
* posix.c: Update.
* quasiquote.c: Update.
* string.c: Update.
* type.c: Update.
* build-aux/mes-snarf.mes Update.
* tests/gc-4.test: New test.
* tests/gc-5.test: New test.
* tests/gc-6.test: New test.
2016-12-12 20:35:18 +01:00
Jan Nieuwenhuizen 7e8341d76c core: One SCM type for function.
* mes.c (function_t): New struct.
  (type): One type for function.
  (call): Refactor.
* build-aux/mes-snarf.mes: Use arity annotation.  WAS: args.  Update
  annotations.
2016-12-12 20:33:50 +01:00
Jan Nieuwenhuizen be2f3bc274 Move arithmetic functions to math.c.
* mes.c (greater_p, less_p, is_p, minus, divide, modulo, multiply,
  logior): Move to math.c.
* math.c: New file.
* GNUmakefile (mes.o): Depend on math snarf output.
2016-10-22 20:07:12 +02:00