summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-20 06:01:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-20 06:01:28 +0000
commit64a16b9ede4dfc72f8c4b486ebce148f519e60dc (patch)
tree7371b472e166e28be02da5b93ffc29c4ecfe3699
parent36f984b65eaa2f78130cb6435c6498fa727dd0cf (diff)
downloadruby-64a16b9ede4dfc72f8c4b486ebce148f519e60dc.tar.gz
* 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
-rw-r--r--ChangeLog5
-rw-r--r--compile.c3
-rw-r--r--vm_core.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 70aa279fbf..36903bfe7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
when entries exist.
diff --git a/compile.c b/compile.c
index 0853863feb..dc26a4c1cf 100644
--- a/compile.c
+++ b/compile.c
@@ -625,12 +625,11 @@ static LABEL *
new_label_body(rb_iseq_t *iseq, int line)
{
LABEL *labelobj = compile_data_alloc_label(iseq);
- static int label_no = 0;
labelobj->link.type = ISEQ_ELEMENT_LABEL;
labelobj->link.next = 0;
- labelobj->label_no = label_no++;
+ labelobj->label_no = iseq->compile_data->label_no++;
labelobj->sc_state = 0;
labelobj->sp = -1;
return labelobj;
diff --git a/vm_core.h b/vm_core.h
index ab5240ed30..4451cb3fa9 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -162,6 +162,7 @@ struct iseq_compile_data {
struct iseq_compile_data_storage *storage_current;
int last_line;
int flip_cnt;
+ int label_no;
int node_level;
const rb_compile_option_t *option;
};