Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion doc/jit/zjit.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ Note that this disables profiling. To inject interpreter profiles into ZJIT, con
```bash
./miniruby --zjit --zjit-dump-hir -e "30.times { 1 + 1 }"
```
```

### Viewing HIR in Iongraph

Expand Down
30 changes: 0 additions & 30 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,36 +198,6 @@ rb_gc_initialize_vm_context(struct rb_gc_vm_context *context)
context->ec = GET_EC();
}

#if USE_MODULAR_GC
void
rb_gc_worker_thread_set_vm_context(struct rb_gc_vm_context *context)
{
rb_native_mutex_lock(&context->lock);

GC_ASSERT(rb_current_execution_context(false) == NULL);

#ifdef RB_THREAD_LOCAL_SPECIFIER
rb_current_ec_set(context->ec);
#else
native_tls_set(ruby_current_ec_key, context->ec);
#endif
}

void
rb_gc_worker_thread_unset_vm_context(struct rb_gc_vm_context *context)
{
rb_native_mutex_unlock(&context->lock);

GC_ASSERT(rb_current_execution_context(true) == context->ec);

#ifdef RB_THREAD_LOCAL_SPECIFIER
rb_current_ec_set(NULL);
#else
native_tls_set(ruby_current_ec_key, NULL);
#endif
}
#endif

bool
rb_gc_event_hook_required_p(rb_event_flag_t event)
{
Expand Down
2 changes: 0 additions & 2 deletions gc/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ MODULAR_GC_FN bool rb_gc_obj_needs_cleanup_p(VALUE obj);
MODULAR_GC_FN bool rb_gc_event_hook_required_p(rb_event_flag_t event);
MODULAR_GC_FN void *rb_gc_get_ractor_newobj_cache(void);
MODULAR_GC_FN void rb_gc_initialize_vm_context(struct rb_gc_vm_context *context);
MODULAR_GC_FN void rb_gc_worker_thread_set_vm_context(struct rb_gc_vm_context *context);
MODULAR_GC_FN void rb_gc_worker_thread_unset_vm_context(struct rb_gc_vm_context *context);
MODULAR_GC_FN void rb_gc_move_obj_during_marking(VALUE from, VALUE to);
MODULAR_GC_FN void rb_gc_print_backtrace();
#endif
Expand Down
4 changes: 4 additions & 0 deletions include/ruby/internal/attr/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
*/
#include "ruby/internal/has/attribute.h"

#if defined(__MINGW32__)
#include <stdio.h> /* for __MINGW_PRINTF_FORMAT */
#endif

/** Wraps (or simulates) `__attribute__((format))` */
#if RBIMPL_HAS_ATTRIBUTE(format)
# define RBIMPL_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z)))
Expand Down
3 changes: 3 additions & 0 deletions scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,9 @@ VALUE rb_fiber_scheduler_blocking_operation_wait(VALUE scheduler, void* (*functi
operation->data2 = NULL;
operation->unblock_function = NULL;

// Ensure that the blocking operation remains visible until this point:
RB_GC_GUARD(blocking_operation);

// If the blocking operation was never executed, return Qundef to signal the caller to use rb_nogvl instead
if (current_status == RB_FIBER_SCHEDULER_BLOCKING_OPERATION_STATUS_QUEUED) {
return Qundef;
Expand Down
2 changes: 1 addition & 1 deletion shape.c
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ Init_default_shapes(void)
}

if (heaps_count > SHAPE_ID_HEAP_INDEX_MAX) {
rb_bug("Init_default_shapes initialized with %lu heaps, only up to %u are supported", heaps_count, SHAPE_ID_HEAP_INDEX_MAX);
rb_bug("Init_default_shapes initialized with %zu heaps, only up to %u are supported", heaps_count, SHAPE_ID_HEAP_INDEX_MAX);
}

size_t index;
Expand Down