1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* proc.c (proc_call): get rid of optimazation-out by clang.

* proc.c (rb_proc_call, rb_proc_call_with_block): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-12-24 03:38:56 +00:00
parent 1dec79c324
commit 8af67e3072
2 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,9 @@
Sat Dec 24 12:38:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* proc.c (proc_call): get rid of optimazation-out by clang.
* proc.c (rb_proc_call, rb_proc_call_with_block): ditto.
Sat Dec 24 10:56:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/readline/readline.c (readline_readline): check if outstream

17
proc.c
View file

@ -544,6 +544,7 @@ proc_lambda(void)
static VALUE
proc_call(int argc, VALUE *argv, VALUE procval)
{
VALUE vret;
rb_proc_t *proc;
rb_block_t *blockptr = 0;
rb_iseq_t *iseq;
@ -560,8 +561,10 @@ proc_call(int argc, VALUE *argv, VALUE procval)
}
}
return rb_vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
vret = rb_vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
argc, argv, blockptr);
RB_GC_GUARD(procval);
return vret;
}
#if SIZEOF_LONG > SIZEOF_INT
@ -581,15 +584,20 @@ check_argc(long argc)
VALUE
rb_proc_call(VALUE self, VALUE args)
{
VALUE vret;
rb_proc_t *proc;
GetProcPtr(self, proc);
return rb_vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
vret = rb_vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
check_argc(RARRAY_LEN(args)), RARRAY_PTR(args), 0);
RB_GC_GUARD(self);
RB_GC_GUARD(args);
return vret;
}
VALUE
rb_proc_call_with_block(VALUE self, int argc, VALUE *argv, VALUE pass_procval)
{
VALUE vret;
rb_proc_t *proc;
rb_block_t *block = 0;
GetProcPtr(self, proc);
@ -600,8 +608,11 @@ rb_proc_call_with_block(VALUE self, int argc, VALUE *argv, VALUE pass_procval)
block = &pass_proc->block;
}
return rb_vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
vret = rb_vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
argc, argv, block);
RB_GC_GUARD(self);
RB_GC_GUARD(pass_procval);
return vret;
}
/*