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

* proc.c (rb_method_location): return attr's location if it is setup.

[Feature #2084]

* NEWS: follow above.

* vm_method.c (rb_add_method): save attr's location.

* gc.c (mark_method_entry): mark attr's location.

* method.h (rb_method_definition_t): add member to save attr's location.

* vm_eval.c (vm_call0): follow above.

* vm_insnhelper.c (vm_call_method): ditto.

* vm_method.c (rb_method_definition_eq): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
wanabe 2010-03-22 11:44:01 +00:00
parent 5d8f695032
commit c46f71399a
8 changed files with 71 additions and 12 deletions

View file

@ -49,6 +49,11 @@ typedef struct rb_method_cfunc_struct {
int argc;
} rb_method_cfunc_t;
typedef struct rb_method_attr_struct {
ID id;
VALUE location;
} rb_method_attr_t;
typedef struct rb_iseq_struct rb_iseq_t;
typedef struct rb_method_definition_struct {
@ -57,7 +62,7 @@ typedef struct rb_method_definition_struct {
union {
rb_iseq_t *iseq; /* should be mark */
rb_method_cfunc_t cfunc;
ID attr_id;
rb_method_attr_t attr;
VALUE proc; /* should be mark */
enum method_optimized_type {
OPTIMIZED_METHOD_TYPE_SEND,