[#43284] [Ruby 1.9 - Bug #4456] [Open] Time#strftime で %F 指定子に大きな幅を指定した際の不具合 — tadayoshi funaba <redmine@...>
14 messages
2011/03/02
[#43285] [Ruby 1.9 - Bug #4457] [Open] Time#strftime で %z 指定子などに大きな幅を指定した際の不具合 — tadayoshi funaba <redmine@...>
6 messages
2011/03/02
[#43296] [Ruby 1.9 - Bug #3990] [Assigned]tests of rexml/rss reports many errors and failures without iconv — Yui NARUSE <redmine@...>
5 messages
2011/03/03
[#43297] Re: [Ruby 1.9 - Bug #3990] [Assigned]tests of rexml/rss reports many errors and failures without iconv
— SASADA Koichi <ko1@...>
2011/03/03
(2011/03/03 18:56), Yui NARUSE wrote:
[#43298] Re: [Ruby 1.9 - Bug #3990] [Assigned]tests of rexml/rss reports many errors and failures without iconv
— "U.Nakamura" <usa@...>
2011/03/03
こんにちは、なかむら(う)です。
[#43317] [Ruby 1.9 - Bug #4474][Open] 複数のスレッドからトランザクションに入ろうとした場合のPStoreの挙動 — Masaki Matsushita <redmine@...>
9 messages
2011/03/06
[#43346] [BUG] lib/irb/locale.rb — keiju@... (Keiju ISHITSUKA)
けいじゅ@いしつかです.
8 messages
2011/03/24
[#43347] Re: [BUG] lib/irb/locale.rb
— Yugui <yugui@...>
2011/03/24
2011/3/24 Keiju ISHITSUKA <keiju@ishitsuka.com>:
[#43355] [Ruby 1.9 - Feature #4529][Assigned] date_core と long 型 — Yui NARUSE <redmine@...>
10 messages
2011/03/25
[#43359] [Ruby 1.9 - Feature #4529][Rejected] date_core と long 型
— tadayoshi funaba <redmine@...>
2011/03/26
[#43360] Re: [ruby-dev:43359] [Ruby 1.9 - Feature #4529][Rejected] date_core と long 型
— "NARUSE, Yui" <naruse@...>
2011/03/26
(2011/03/26 19:21), tadayoshi funaba wrote:
[#43365] [Ruby 1.9 - Bug #4536][Open] 定数参照について1.8と1.9の違い — Yukihiro Matsumoto <matz@...>
11 messages
2011/03/29
[#43366] Re: [ruby-dev:43365] [Ruby 1.9 - Bug #4536][Open] 定数参照について1.8と1.9の違い
— SASADA Koichi <ko1@...>
2011/03/29
ささだです.
[ruby-dev:43316] Re: iseq_compile_each()でのマジックナンバ
From:
きたざわけんいち <peisunstar@...>
Date:
2011-03-06 11:45:49 UTC
List:
ruby-dev #43316
きたざわです。
何度もすいません。
こんなんで、どうでしょうか?
loopval_poppedの件は、一カ所を除いてまだ入れてません。
Index: vm_core.h
===================================================================
--- vm_core.h (リビジョン 31028)
+++ vm_core.h (作業コピー)
@@ -583,6 +583,11 @@
#define RUBYVM_CFUNC_FRAME_P(cfp) \
(VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
+/* vm_throw state */
+#define VM_THROW_NO_DFP 0x8000
+#define VM_THROW_STATE_MASK 0xff
+#define VM_THROW_LEVEL_SHIFT 16
+
/* inline cache */
typedef struct iseq_inline_cache_entry *IC;
Index: compile.c
===================================================================
--- compile.c (リビジョン 31028)
+++ compile.c (作業コピー)
@@ -14,6 +14,7 @@
#define USE_INSN_STACK_INCREASE 1
#include "vm_core.h"
+#include "eval_intern.h"
#include "iseq.h"
#include "insns.inc"
#include "insns_info.inc"
@@ -3355,11 +3356,7 @@
level++;
if (ip->compile_data->redo_label != 0) {
- level = 0x8000;
- if (ip->compile_data->loopval_popped == 0) {
- /* need value */
- level |= 0x4000;
- }
+ level = VM_THROW_NO_DFP;
goto break_by_insn;
}
else if (ip->type == ISEQ_TYPE_BLOCK) {
@@ -3419,7 +3416,7 @@
break;
}
- level = 0x8000 | 0x4000;
+ level = VM_THROW_NO_DFP;
if (ip->compile_data->redo_label != 0) {
/* while loop */
break;
@@ -3481,7 +3478,7 @@
else {
rb_iseq_t *ip;
unsigned long level;
- level = 0x8000 | 0x4000;
+ level = VM_THROW_NO_DFP;
ip = iseq;
while (ip) {
if (!ip->compile_data) {
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c (リビジョン 31028)
+++ vm_insnhelper.c (作業コピー)
@@ -1432,9 +1432,9 @@
vm_throw(rb_thread_t *th, rb_control_frame_t *reg_cfp,
rb_num_t throw_state, VALUE throwobj)
{
- int state = (int)(throw_state & 0xff);
- int flag = (int)(throw_state & 0x8000);
- rb_num_t level = throw_state >> 16;
+ int state = (int)throw_state & VM_THROW_STATE_MASK;
+ int flag = (int)throw_state & VM_THROW_NO_DFP;
+ rb_num_t level = (rb_num_t)(throw_state >> VM_THROW_LEVEL_SHIFT);
if (state != 0) {
VALUE *pt = 0;
--
---
ぺーさん(peisunstar@gmail.com)