* vm_core.h (struct iseq_compile_data): moved label_no from
new_label_body(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
36f984b65e
commit
64a16b9ede
@ -1,4 +1,7 @@
|
|||||||
Sun Apr 20 15:00:48 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Apr 20 15:01:25 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* vm_core.h (struct iseq_compile_data): moved label_no from
|
||||||
|
new_label_body().
|
||||||
|
|
||||||
* compile.c (iseq_set_exception_table): allocates catch_table only
|
* compile.c (iseq_set_exception_table): allocates catch_table only
|
||||||
when entries exist.
|
when entries exist.
|
||||||
|
@ -625,12 +625,11 @@ static LABEL *
|
|||||||
new_label_body(rb_iseq_t *iseq, int line)
|
new_label_body(rb_iseq_t *iseq, int line)
|
||||||
{
|
{
|
||||||
LABEL *labelobj = compile_data_alloc_label(iseq);
|
LABEL *labelobj = compile_data_alloc_label(iseq);
|
||||||
static int label_no = 0;
|
|
||||||
|
|
||||||
labelobj->link.type = ISEQ_ELEMENT_LABEL;
|
labelobj->link.type = ISEQ_ELEMENT_LABEL;
|
||||||
labelobj->link.next = 0;
|
labelobj->link.next = 0;
|
||||||
|
|
||||||
labelobj->label_no = label_no++;
|
labelobj->label_no = iseq->compile_data->label_no++;
|
||||||
labelobj->sc_state = 0;
|
labelobj->sc_state = 0;
|
||||||
labelobj->sp = -1;
|
labelobj->sp = -1;
|
||||||
return labelobj;
|
return labelobj;
|
||||||
|
@ -162,6 +162,7 @@ struct iseq_compile_data {
|
|||||||
struct iseq_compile_data_storage *storage_current;
|
struct iseq_compile_data_storage *storage_current;
|
||||||
int last_line;
|
int last_line;
|
||||||
int flip_cnt;
|
int flip_cnt;
|
||||||
|
int label_no;
|
||||||
int node_level;
|
int node_level;
|
||||||
const rb_compile_option_t *option;
|
const rb_compile_option_t *option;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user