Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
dc9ce32
test/ruby/test_optimization.rb: fix compile kwarg
Feb 14, 2018
7606806
compile.c: drop freezestring insn on String#-@
Feb 14, 2018
8df47f8
configure.ac: Use `pthread_create` to determine if pthread is available
mame Feb 15, 2018
50700c4
thread_pthread.c: Use `getpagesize()` when `pthread_attr_getguardsize…
mame Feb 15, 2018
b4b4b94
gc.c: force STACK_GROW_DIRECTION for emscripten
mame Feb 15, 2018
0efd8bb
test/io/console/test_io_console.rb (test_oflush): Avoid race condition
mame Feb 15, 2018
9a9a4e8
Benchmarks for Array#values_at
nobu Feb 15, 2018
41e9e19
Array#values_at optimization
nobu Feb 15, 2018
d6db2d9
Avoid using `@` in macro substitution that confuses FreeBSD make
knu Feb 15, 2018
80c850e
Iterate over the catch table, and mark iseq in the table
tenderlove Jan 12, 2018
881ea05
Disasm instruction sequences and mark things managed by the GC
tenderlove Jan 12, 2018
969ccfd
Only add objects to the compile time mark array
tenderlove Jan 12, 2018
aaaffa4
Only de-reference when we need to check the object type
tenderlove Jan 17, 2018
5fa1733
Private function should be static, no return in `void`
tenderlove Jan 18, 2018
d3f6c51
CDHASH needs to stay in the mark array until compilation finishes
tenderlove Jan 18, 2018
9bed499
Fix bug when marking iseq before instruction have been translated
tenderlove Jan 19, 2018
8aeb2b8
Directly mark `once` instruction values
tenderlove Feb 2, 2018
65c9fc9
stop using a mark array
tenderlove Feb 2, 2018
6649dc4
Set a compile time flag so iseq marking knows about markables
tenderlove Feb 5, 2018
d6ca1ce
Introduce TS_ISE operand
tenderlove Feb 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Iterate over the catch table, and mark iseq in the table
This commit iterates over the catch table, marking instruction sequences
stored in the catch table.  This allows us to avoid adding the catch
table instruction sequence object to the mark array
  • Loading branch information
tenderlove committed Feb 15, 2018
commit 80c850e2243c6cd290e6393da9b72208e8df6d3f
5 changes: 0 additions & 5 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2209,11 +2209,6 @@ iseq_set_exception_table(rb_iseq_t *iseq)
entry->end = label_get_position((LABEL *)(ptr[2] & ~1));
entry->iseq = (rb_iseq_t *)ptr[3];

/* register iseq as mark object */
if (entry->iseq != 0) {
iseq_add_mark_object(iseq, (VALUE)entry->iseq);
}

/* stack depth */
if (ptr[4]) {
LABEL *lobj = (LABEL *)(ptr[4] & ~1);
Expand Down
13 changes: 13 additions & 0 deletions iseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,21 @@ rb_iseq_mark(const rb_iseq_t *iseq)
rb_gc_mark(body->location.base_label);
rb_gc_mark(body->location.pathobj);
RUBY_MARK_UNLESS_NULL((VALUE)body->parent_iseq);

if (body->catch_table) {
const struct iseq_catch_table *table = body->catch_table;
unsigned int i;
for(i = 0; i < table->size; i++) {
const struct iseq_catch_table_entry *entry;
entry = &table->entries[i];
if (entry->iseq) {
rb_gc_mark((VALUE)entry->iseq);
}
}
}
}


if (FL_TEST(iseq, ISEQ_NOT_LOADED_YET)) {
rb_gc_mark(iseq->aux.loader.obj);
}
Expand Down