diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-09 05:33:54 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-09 05:33:54 +0000 |
commit | 7ea3edc409dc6d383df9bc10d0034a6ecddb84dc (patch) | |
tree | cafccae4237491cdb82afeaa1e07dbe330907fab /vm_core.h | |
parent | 4be0c562a4b3e1bc6f185cf8fbd636b9e8ebb7f4 (diff) | |
download | ruby-7ea3edc409dc6d383df9bc10d0034a6ecddb84dc.tar.gz |
* vm_core.h (rb_call_info_t): add new type `rb_call_inf_t'.
This data structure contains information including inline method
cache. After that, `struct iseq_inline_cache_entry' does not
need to contain inline cache for method invocation.
Other information will be added to this data structure.
* vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
members to `rb_iseq_t'.
* insns.def, compile.c: Use CALL_INFO instead of IC.
* tool/instruction.rb: support CALL_INFO as operand type.
* vm_insnhelper.c, vm_insnhelper.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -134,14 +134,21 @@ struct iseq_inline_cache_entry { VALUE ic_class; union { VALUE value; - rb_method_entry_t *method; long index; } ic_value; - union { - VALUE defined_class; - } ic_value2; }; +/* rb_call_info_t contains calling information including inline cache */ +typedef struct rb_call_info_struct { + /* inline cache: keys */ + VALUE ic_vmstat; + VALUE ic_class; + + /* inline cache: values */ + rb_method_entry_t *method; + VALUE defined_class; +} rb_call_info_t; + #if 1 #define GetCoreDataFromValue(obj, type, ptr) do { \ (ptr) = (type*)DATA_PTR(obj); \ @@ -201,6 +208,9 @@ struct rb_iseq_struct { struct iseq_inline_cache_entry *ic_entries; int ic_size; + rb_call_info_t *callinfo_entries; + int callinfo_size; + /** * argument information * @@ -661,6 +671,7 @@ enum vm_special_object_type { /* inline cache */ typedef struct iseq_inline_cache_entry *IC; +typedef rb_call_info_t *CALL_INFO; void rb_vm_change_state(void); |