* cont.c (cont_capture): add volatile.
On clang -O, it is needed to avoid the optimization. With this and llvm/clang's recent fix, clang 3.0 can build ruby-trunk with -O option. * cont.c (cont_capture): use for-loop. * array.c (rb_ary_each): add volatile and use it. * vm_insnhelper.c (vm_call_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d8af9c854d
commit
be953b4d1c
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
Wed Jun 22 19:47:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* cont.c (cont_capture): add volatile.
|
||||||
|
On clang -O, it is needed to avoid the optimization.
|
||||||
|
With this and llvm/clang's recent fix, clang 3.0 can
|
||||||
|
build ruby-trunk with -O option.
|
||||||
|
|
||||||
|
* cont.c (cont_capture): use for-loop.
|
||||||
|
|
||||||
|
* array.c (rb_ary_each): add volatile and use it.
|
||||||
|
|
||||||
|
* vm_insnhelper.c (vm_call_cfunc): ditto.
|
||||||
|
|
||||||
Wed Jun 22 18:20:46 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
|
Wed Jun 22 18:20:46 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
|
||||||
|
|
||||||
* ext/openssl/ossl_ssl.c (ossl_sslctx_session_remove_cb):
|
* ext/openssl/ossl_ssl.c (ossl_sslctx_session_remove_cb):
|
||||||
|
3
array.c
3
array.c
@ -1468,9 +1468,10 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_ary_each(VALUE ary)
|
rb_ary_each(VALUE array)
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
|
volatile VALUE ary = array;
|
||||||
|
|
||||||
RETURN_ENUMERATOR(ary, 0, 0);
|
RETURN_ENUMERATOR(ary, 0, 0);
|
||||||
for (i=0; i<RARRAY_LEN(ary); i++) {
|
for (i=0; i<RARRAY_LEN(ary); i++) {
|
||||||
|
7
cont.c
7
cont.c
@ -437,7 +437,7 @@ cont_capture(volatile int *stat)
|
|||||||
cont_save_machine_stack(th, cont);
|
cont_save_machine_stack(th, cont);
|
||||||
|
|
||||||
if (ruby_setjmp(cont->jmpbuf)) {
|
if (ruby_setjmp(cont->jmpbuf)) {
|
||||||
VALUE value;
|
volatile VALUE value;
|
||||||
|
|
||||||
value = cont->value;
|
value = cont->value;
|
||||||
if (cont->argc == -1) rb_exc_raise(value);
|
if (cont->argc == -1) rb_exc_raise(value);
|
||||||
@ -654,9 +654,10 @@ cont_restore_1(rb_context_t *cont)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (cont->machine_stack_src) {
|
if (cont->machine_stack_src) {
|
||||||
|
size_t i;
|
||||||
FLUSH_REGISTER_WINDOWS;
|
FLUSH_REGISTER_WINDOWS;
|
||||||
MEMCPY(cont->machine_stack_src, cont->machine_stack,
|
for (i = 0; i < cont->machine_stack_size; i++)
|
||||||
VALUE, cont->machine_stack_size);
|
cont->machine_stack_src[i] = cont->machine_stack[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __ia64
|
#ifdef __ia64
|
||||||
|
@ -386,11 +386,11 @@ call_cfunc(VALUE (*func)(), VALUE recv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline VALUE
|
static inline VALUE
|
||||||
vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp,
|
vm_call_cfunc(rb_thread_t *th, volatile rb_control_frame_t *reg_cfp,
|
||||||
int num, VALUE recv, const rb_block_t *blockptr,
|
int num, VALUE recv, const rb_block_t *blockptr,
|
||||||
const rb_method_entry_t *me)
|
const rb_method_entry_t *me)
|
||||||
{
|
{
|
||||||
VALUE val = 0;
|
volatile VALUE val = 0;
|
||||||
const rb_method_definition_t *def = me->def;
|
const rb_method_definition_t *def = me->def;
|
||||||
rb_control_frame_t *cfp;
|
rb_control_frame_t *cfp;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user