2 Copyright (C) 2017 Keziah Wesley
4 You can redistribute and/or modify this file under the terms of the
5 GNU Affero General Public License as published by the Free Software
6 Foundation, either version 3 of the License, or (at your option) any
9 This file is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Affero General Public License for more details.
14 You should have received a copy of the GNU Affero General Public
15 License along with this file. If not, see
16 <http://www.gnu.org/licenses/>.
22 // TODO: "print" into buffer
28 print_vector_body (const vector_object * o)
30 const object *p = OBJECT_OF_HEAP_PTR (o->body);
35 for (uint32_t i = 1; i < o->len; i++)
43 print_list_body (const list_object * o)
45 const pool_object *p = POOL_OBJECT (o->head);
48 print_object ((const object *) p);
49 while ((p = POOL_OBJECT (p->rest)))
52 print_object ((const object *) p);
57 print_object (const object * o)
62 printf ("%d", o->fix32.val);
65 printf ("%ld", o->fix64.val);
69 print_list_body (&o->list);
74 print_list_body (&o->list);
79 print_vector_body (&o->vector);
83 assert (0 && "I don't know how to print that");