mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* insns.def (defineclass): suppress a warning.
* insns.def (opt_call_c_function): should raise the thrown exception instead of returning it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c708baa2d
commit
0a75feb94a
2 changed files with 27 additions and 20 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Mon Jul 2 11:59:34 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* insns.def (defineclass): suppress a warning.
|
||||||
|
|
||||||
|
* insns.def (opt_call_c_function): should raise the thrown exception
|
||||||
|
instead of returning it.
|
||||||
|
|
||||||
Mon Jul 2 08:53:47 2007 Koichi Sasada <ko1@atdot.net>
|
Mon Jul 2 08:53:47 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* eval_intern.h, yarvcore.h: move declaration of sysstack_error
|
* eval_intern.h, yarvcore.h: move declaration of sysstack_error
|
||||||
|
|
22
insns.def
22
insns.def
|
@ -1,5 +1,4 @@
|
||||||
/** ##skip
|
/** ##skip -*- mode:c; style:ruby -*-
|
||||||
-*-c-*-
|
|
||||||
insns.def - YARV instruction definitions
|
insns.def - YARV instruction definitions
|
||||||
|
|
||||||
$Author: $
|
$Author: $
|
||||||
|
@ -1042,7 +1041,8 @@ defineclass
|
||||||
{
|
{
|
||||||
VALUE klass;
|
VALUE klass;
|
||||||
|
|
||||||
if (define_type == 0) {
|
switch ((int)define_type) {
|
||||||
|
case 0:
|
||||||
/* val is dummy. classdef returns class scope value */
|
/* val is dummy. classdef returns class scope value */
|
||||||
|
|
||||||
if (super == Qnil) {
|
if (super == Qnil) {
|
||||||
|
@ -1078,13 +1078,13 @@ defineclass
|
||||||
rb_const_set(cbase, id, klass);
|
rb_const_set(cbase, id, klass);
|
||||||
rb_class_inherited(super, klass);
|
rb_class_inherited(super, klass);
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else if (define_type == 1) {
|
case 1:
|
||||||
/* val is dummy. classdef returns class scope value */
|
/* val is dummy. classdef returns class scope value */
|
||||||
/* super is dummy */
|
/* super is dummy */
|
||||||
klass = rb_singleton_class(cbase);
|
klass = rb_singleton_class(cbase);
|
||||||
}
|
break;
|
||||||
else if (define_type == 2) {
|
case 2:
|
||||||
/* val is dummy. classdef returns class scope value */
|
/* val is dummy. classdef returns class scope value */
|
||||||
/* super is dummy */
|
/* super is dummy */
|
||||||
if (cbase == Qnil) {
|
if (cbase == Qnil) {
|
||||||
|
@ -1105,9 +1105,9 @@ defineclass
|
||||||
rb_set_class_path(klass, cbase, rb_id2name(id));
|
rb_set_class_path(klass, cbase, rb_id2name(id));
|
||||||
rb_const_set(cbase, id, klass);
|
rb_const_set(cbase, id, klass);
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else {
|
default:
|
||||||
rb_bug("unknown defineclass type: %d", define_type);
|
rb_bug("unknown defineclass type: %d", (int)define_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
COPY_CREF(klass_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC));
|
COPY_CREF(klass_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC));
|
||||||
|
@ -2342,7 +2342,7 @@ opt_call_c_function
|
||||||
if (reg_cfp == 0) {
|
if (reg_cfp == 0) {
|
||||||
VALUE err = th->errinfo;
|
VALUE err = th->errinfo;
|
||||||
th->errinfo = Qnil;
|
th->errinfo = Qnil;
|
||||||
return err;
|
THROW_EXCEPTION(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
NEXT_INSN();
|
NEXT_INSN();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue