Commit Graph

1799 Commits (941c9fabd428b39089256af251ba358a7a4c1f00)

Author SHA1 Message Date
Björn Lindqvist 08c2e3a32d VM: better logic in factor_vm::set_sampling_profiler
It avoids the double-negation.
2016-05-19 01:25:53 +02:00
Björn Lindqvist 8ae6e8e23d VM: safe_strdup needs to be called in vm_executable_path 2016-05-14 19:00:20 +02:00
Björn Lindqvist 335615a025 VM: more destruction needed in the destructor
Console needs to be closed, special objects free'd and code heap
deleted.
2016-05-14 18:21:50 +02:00
Björn Lindqvist 7342d97e6d VM: add destructor to vm_parameters so that executable and image_path is
free'd

Valgrind complained that those were leaking
2016-05-14 18:21:49 +02:00
Björn Lindqvist 9555915e7b VM: more stuff to deallocate in the destructor 2016-05-14 18:21:49 +02:00
Björn Lindqvist e2b133e291 VM: return value of vm_executable_path() should be free'd 2016-05-14 18:21:49 +02:00
Björn Lindqvist 63791bf90e VM: move some logic from factor_vm to the vm_parameters class
It's good because the factor_vm class is to fat.
2016-05-14 18:21:49 +02:00
Björn Lindqvist 83ce08487e VM: initialize the ctx member in the construction
To make valgrind happy because it complains that it is uninitialized.
2016-05-14 18:21:49 +02:00
Björn Lindqvist 340ad8b8d9 VM: removes the delete_contexts method 2016-05-14 18:21:49 +02:00
Björn Lindqvist 7f8d5cbef4 VM: when starting the sampling profiler, the data needs to be cleared 2016-05-06 19:56:13 +02:00
Doug Coleman 10164b6af8 GNUMakefile: Explicitly ask for stdlib=libc++ because clang downgrades the version silently if you use backward compatibility mode with OSX 10.5 and then shrink_to_fit() doesn't work.
Config.macosx: Support for shrink_to_fit() is claimed to be in 10.7 and later, but 10.7 and 10.8 both throw this huge error:
https://paste.factorcode.org/paste?id=3872

Fixes #1624.
2016-05-05 16:48:40 -07:00
Björn Lindqvist 9824be8714 VM: The C++11 method shrink_to_fit() can be used to release memory 2016-05-05 14:22:57 +02:00
Björn Lindqvist 5826394573 VM: the (clear-samples) primitive is unused 2016-05-05 02:33:35 +02:00
Björn Lindqvist bc9f62efde VM: using a c++ lambda over a struct 2016-05-05 01:57:52 +02:00
Björn Lindqvist 8911ad2a16 VM: don't end the gc event in start_gc_again, fixes #659 2016-05-04 22:47:50 +02:00
Björn Lindqvist 583fb5825b VM: removes the collector class
The cheneys_algorithm() method can be moved to slot_visitor (because it
kind of visists objects), and then there is no need for the collector
class.
2016-05-04 17:52:04 +02:00
Björn Lindqvist f629a95b03 VM: moving collector methods to slot_visitor methods
collector::trace_cards moved to slot_visitor::visit_cards and
collector::trace_code_heap_roots moved to
slot_visitor::visit_code_heap_roots. Both those methods are pointer visitors
2016-05-04 00:32:17 +02:00
Björn Lindqvist 4cc5e90605 VM: SNPRINTF macro is not used 2016-05-02 15:01:49 +02:00
Björn Lindqvist 2035eb91fe VM: method compute_identity_hashcode is not needed 2016-05-02 14:05:01 +02:00
Björn Lindqvist eb8b7f02bf VM: the start_factor method isn't needed 2016-05-01 23:36:41 +02:00
Björn Lindqvist 58ad5fb4ce VM: all the started_<blah>() replaced with reset_timer() 2016-04-24 15:21:17 +02:00
Björn Lindqvist 82e2de5e12 VM: oops, fix compilation error i caused 2016-04-24 15:18:45 +02:00
Björn Lindqvist c55af9b957 VM: object_size, compute_entry_point_address, code_block_owner made into
functions

It is to make the vm class less heavy
2016-04-24 14:45:03 +02:00
Björn Lindqvist 82658e184f VM: make return_takes_param() a function 2016-04-24 14:19:35 +02:00
Björn Lindqvist 28b5378196 VM: merge of fixup_data & fixup_code into a new method fixup_heaps 2016-04-24 12:42:22 +02:00
Björn Lindqvist c8d648f3f2 VM: the factor_vm::code_blocks() method isn't needed 2016-04-22 12:01:26 +02:00
Björn Lindqvist bcc32291e8 VM: merge of free_list_allocator.hpp into free_list.hpp
It's better if all the free list stuff is in a single header.
2016-04-22 12:01:26 +02:00
Björn Lindqvist a23bb8cf16 VM: nr of code blocks scanned always = points_to_<gen>.size() 2016-04-22 12:01:26 +02:00
Björn Lindqvist 70e7bad921 VM: parent and code attrs in collector struct is not used 2016-04-22 12:01:26 +02:00
Björn Lindqvist da4812ba21 VM: refactoring which removes two not useful short methods 2016-04-04 23:32:23 +02:00
Doug Coleman b324c30cc7 vm: Fix four compile warnings reported by gcc with -pedantic flag. 2016-03-30 15:39:42 -07:00
Björn Lindqvist 10ac4da0f6 VM: fixes to make some if-else statements read better 2016-03-31 00:37:59 +02:00
John Benediktsson 02956a25ce vm: compact-gc was checked twice. 2016-03-28 22:28:57 -07:00
Björn Lindqvist 9a531076f0 VM: improved vm_executable_path which works for arbitrary long paths 2016-03-23 16:15:30 +01:00
Björn Lindqvist 83e1ee5084 VM: fix string copying to not use PATH_MAX here 2016-03-23 16:15:29 +01:00
Björn Lindqvist 4f33f22b56 VM: on errors, only dump the heap if it has been initialized 2016-03-23 01:56:40 +01:00
Björn Lindqvist 579875821b VM: removes the OBJ-ERROR special object in favor of a constant
The special object contained the string "kernel-error" which were used
to tag VM errors. But it is simplier and removes a little complexity to
just tag them with a fixnum constant.
2016-03-22 17:52:19 +01:00
Björn Lindqvist 2f1e963587 Build: never dynlink with gui libs 2016-03-11 05:17:04 +01:00
Doug Coleman 7488e54825 math.cpp: Fix two warnings. Fixes #1549. 2016-03-08 10:02:28 -08:00
Jon Harper 13ba081ac8 primitive_format_float, return empty string on bad locale instead of C++ exception 2016-03-08 07:55:25 -08:00
Jon Harper 19fadb6c96 prettyprinter, locale independant float printing 2016-03-08 07:55:25 -08:00
Doug Coleman 5813e8384e command-line.startup: document more command line flags. we already have -nosignals, but it was hidden in the source code. Fix spacing for default image. Closes #1514. 2016-03-03 17:16:39 -08:00
Doug Coleman 67eb64cf00 vm/contexts.cpp: We are only deleting half the contexts because we increment the iter twice per loop! Fixes #1534. Thanks clang! 2016-03-01 00:19:43 -08:00
Björn Lindqvist 44b9b26baa VM: nitpick fix of filenames in comments 2016-02-28 01:23:59 +01:00
Björn Lindqvist 2db1e7e6a5 VM: simplifies factor_vm::determine_inline_cache_type 2016-02-28 01:10:12 +01:00
Björn Lindqvist 0c9c0b2f82 VM: removes a few methods related to relocation handling
They are only used once, so it is simpler to "inline" them
2015-12-13 13:56:36 +01:00
Björn Lindqvist 7da72ac77c VM: the compute_vm_address method can be removed 2015-12-13 13:56:36 +01:00
Björn Lindqvist 08766090d3 VM: more fine-grained control over which special objects to save
It removes a few roots that doesn't need to be saved in the image and
can save a few hundred bytes.
2015-12-13 13:56:36 +01:00
Björn Lindqvist 46bfcbf3a2 VM: the rel_type() and rel_offset() accessors in instruction_operand can be removed 2015-12-13 13:56:36 +01:00
Björn Lindqvist 1a72f731e0 VM: now special-objects is used for -1, 0, 1 and t
The fields in the image_header aren't read or written to but I haven't
changed the format yet.
2015-12-10 10:22:38 +01:00