Skip to content
Permalink
Browse files

* expand tabs.

  • Loading branch information...
matzbot committed Jun 11, 2019
1 parent 6db2d6d commit 23e3c1704b344819fcea907a67aafd1e6be8a9df
Showing with 22 additions and 22 deletions.
  1. +3 −3 cont.c
  2. +3 −3 proc.c
  3. +16 −16 vm.c
6 cont.c
@@ -493,18 +493,18 @@ void
rb_fiber_update_self(rb_fiber_t *fib)
{
if (fib->cont.self) {
fib->cont.self = rb_gc_location(fib->cont.self);
fib->cont.self = rb_gc_location(fib->cont.self);
}
else {
rb_execution_context_update(&fib->cont.saved_ec);
rb_execution_context_update(&fib->cont.saved_ec);
}
}

void
rb_fiber_mark_self(const rb_fiber_t *fib)
{
if (fib->cont.self) {
rb_gc_mark_no_pin(fib->cont.self);
rb_gc_mark_no_pin(fib->cont.self);
}
else {
rb_execution_context_mark(&fib->cont.saved_ec);
6 proc.c
@@ -64,7 +64,7 @@ block_mark(const struct rb_block *block)
RUBY_MARK_NO_PIN_UNLESS_NULL(captured->self);
RUBY_MARK_NO_PIN_UNLESS_NULL((VALUE)captured->code.val);
if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) {
RUBY_MARK_NO_PIN_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep));
RUBY_MARK_NO_PIN_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep));
}
}
break;
@@ -87,9 +87,9 @@ block_compact(struct rb_block *block)
struct rb_captured_block *captured = &block->as.captured;
captured->self = rb_gc_location(captured->self);
captured->code.val = rb_gc_location(captured->code.val);
if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) {
if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) {
UPDATE_REFERENCE(captured->ep[VM_ENV_DATA_INDEX_ENV]);
}
}
}
break;
case block_type_symbol:
32 vm.c
@@ -2480,24 +2480,24 @@ rb_execution_context_update(const rb_execution_context_t *ec)
{
/* update VM stack */
if (ec->vm_stack) {
rb_control_frame_t *cfp = ec->cfp;
rb_control_frame_t *limit_cfp = (void *)(ec->vm_stack + ec->vm_stack_size);
rb_control_frame_t *cfp = ec->cfp;
rb_control_frame_t *limit_cfp = (void *)(ec->vm_stack + ec->vm_stack_size);

while (cfp != limit_cfp) {
const VALUE *ep = cfp->ep;
while (cfp != limit_cfp) {
const VALUE *ep = cfp->ep;
cfp->self = rb_gc_location(cfp->self);
cfp->iseq = (rb_iseq_t *)rb_gc_location((VALUE)cfp->iseq);
cfp->block_code = (void *)rb_gc_location((VALUE)cfp->block_code);

if (!VM_ENV_LOCAL_P(ep)) {
VALUE *prev_ep = (VALUE *)VM_ENV_PREV_EP(ep);
if (VM_ENV_FLAGS(prev_ep, VM_ENV_FLAG_ESCAPED)) {
if (!VM_ENV_LOCAL_P(ep)) {
VALUE *prev_ep = (VALUE *)VM_ENV_PREV_EP(ep);
if (VM_ENV_FLAGS(prev_ep, VM_ENV_FLAG_ESCAPED)) {
prev_ep[VM_ENV_DATA_INDEX_ENV] = rb_gc_location(prev_ep[VM_ENV_DATA_INDEX_ENV]);
}
}
}
}

cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
}
#if VM_CHECK_MODE > 0
void rb_ec_verify(const rb_execution_context_t *ec); /* cont.c */
@@ -2525,14 +2525,14 @@ rb_execution_context_mark(const rb_execution_context_t *ec)
while (cfp != limit_cfp) {
const VALUE *ep = cfp->ep;
VM_ASSERT(!!VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) == vm_ep_in_heap_p_(ec, ep));
rb_gc_mark_no_pin(cfp->self);
rb_gc_mark_no_pin((VALUE)cfp->iseq);
rb_gc_mark_no_pin((VALUE)cfp->block_code);
rb_gc_mark_no_pin(cfp->self);
rb_gc_mark_no_pin((VALUE)cfp->iseq);
rb_gc_mark_no_pin((VALUE)cfp->block_code);

if (!VM_ENV_LOCAL_P(ep)) {
const VALUE *prev_ep = VM_ENV_PREV_EP(ep);
if (VM_ENV_FLAGS(prev_ep, VM_ENV_FLAG_ESCAPED)) {
rb_gc_mark_no_pin(prev_ep[VM_ENV_DATA_INDEX_ENV]);
rb_gc_mark_no_pin(prev_ep[VM_ENV_DATA_INDEX_ENV]);
}
}

@@ -2659,7 +2659,7 @@ const rb_data_type_t ruby_threadptr_data_type = {
thread_mark,
thread_free,
thread_memsize,
thread_compact,
thread_compact,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};

0 comments on commit 23e3c17

Please sign in to comment.
You can’t perform that action at this time.