[#15846] Ruby M17N request — "K.Kosako" <kosako@...>

今書いているライブラリを、あらかじめRuby M17Nに対応させておこうとして、

62 messages 2002/02/04
[#15847] Re: Ruby M17N request — matz@... (Yukihiro Matsumoto) 2002/02/04

まつもと ゆきひろです

[#15854] Re: Ruby M17N request — "K.Kosako" <kosako@...> 2002/02/05

Yukihiro Matsumotoさんの<1012831868.125952.28017.nullmailer@ev.netlab.jp>から

[#16070] Re: Ruby M17N request — "K.Kosako" <kosako@...> 2002/02/25

<20020205045749.0AAA015B@helium.ruby-lang.org>から

[#16072] Re: Ruby M17N request — "Akinori MUSHA" <knu@...> 2002/02/25

At Mon, 25 Feb 2002 19:57:05 +0900,

[#16073] Re: Ruby M17N request — "Akinori MUSHA" <knu@...> 2002/02/25

At Mon, 25 Feb 2002 21:00:46 +0900,

[#16173] Re: Ruby M17N request — "Akinori MUSHA" <knu@...> 2002/03/02

At Mon, 25 Feb 2002 19:57:05 +0900,

[#16196] Oni Guruma imported into our repository — "Akinori MUSHA" <knu@...> 2002/03/04

At Sun, 3 Mar 2002 07:15:40 +0900,

[#16275] Re: Oni Guruma imported into our repository — matz@... (Yukihiro Matsumoto) 2002/03/08

まつもと ゆきひろです

[#16222] Re: Oni Guruma(Re: Ruby M17N request) — nobu.nakada@... 2002/03/05

なかだです。

[#16228] Re: Oni Guruma(Re: Ruby M17N request) — "K.Kosako" <kosako@...> 2002/03/06

nobu.nakada@nifty.ne.jpさんの

[#16237] Re: Oni Guruma(Re: Ruby M17N request) — nobu.nakada@... 2002/03/06

なかだです。

[#16241] Re: Oni Guruma(Re: Ruby M17N request) — "K.Kosako" <kosako@...> 2002/03/07

nobu.nakada@nifty.ne.jpさんの

[#16242] Re: Oni Guruma(Re: Ruby M17N request) — nobu.nakada@... 2002/03/07

なかだです。

[#16442] Re: Oni Guruma(Re: Ruby M17N request) — nobu.nakada@... 2002/03/17

なかだです。

[#15867] [BUG?] include after module definition and extend module — keiju@... (Keiju ISHITSUKA)

けいじゅ@日本ラショナルソフトウェアです.

15 messages 2002/02/08
[#15869] Re: [BUG?] include after module definition and extend module — matz@... (Yukihiro Matsumoto) 2002/02/08

まつもと ゆきひろです

[#15932] Re: [BUG?] include after module definition and extend module — keiju@... (石塚圭樹) 2002/02/18

けいじゅ@日本ラショナルソフトウェアです.

[#15938] Re: [BUG?] include after module definition and extend module — matz@... (Yukihiro Matsumoto) 2002/02/18

まつもと ゆきひろです

[#15914] making net/*.rb grok URI — "Akinori MUSHA" <knu@...>

 net/*.rb モジュール群をぜひとも標準添付となった URI クラスに

30 messages 2002/02/17
[#15915] Re: making net/*.rb grok URI — "Akinori MUSHA" <knu@...> 2002/02/17

At Mon, 18 Feb 2002 04:33:42 +0900,

[#15931] Re: making net/*.rb grok URI — Minero Aoki <aamine@...> 2002/02/18

あおきです。

[#15934] Re: making net/*.rb grok URI — "Akinori MUSHA" <knu@...> 2002/02/18

At Mon, 18 Feb 2002 15:24:22 +0900,

[#15937] Re: making net/*.rb grok URI — Minero Aoki <aamine@...> 2002/02/18

あおきです。

[#15958] Re: making net/*.rb grok URI — TAKAHASHI Masayoshi <maki@...> 2002/02/19

高橋征義です。

[#15978] Re: making net/*.rb grok URI — Tanaka Akira <akr@...17n.org> 2002/02/19

In article <200202190432.NAA18796@mx.inac.co.jp>,

[#16002] Re: making net/*.rb grok URI — TAKAHASHI Masayoshi <maki@...> 2002/02/20

高橋征義です。

[#16013] Re: making net/*.rb grok URI — Tanaka Akira <akr@...17n.org> 2002/02/20

In article <20020221020159R.maki@rubycolor.org>,

[#15988] Re: [rubyist:1097] Re: % 記法 — nobu.nakada@...

なかだです。

21 messages 2002/02/20
[#17594] Re: [rubyist:1097] Re: % 記法 — nobu.nakada@... 2002/06/26

なかだです。

[#16049] defined? autoload constant — Kazuhiro NISHIYAMA <zn@...>

西山和広です。

35 messages 2002/02/24
[#16058] Re: defined? autoload constant — matz@... (Yukihiro Matsumoto) 2002/02/25

まつもと ゆきひろです

[#16298] Re: defined? autoload constant — nobu.nakada@... 2002/03/09

なかだです。

[#16304] Re: defined? autoload constant — matz@... (Yukihiro Matsumoto) 2002/03/09

まつもと ゆきひろです

[#16375] Re: defined? autoload constant — keiju@... (石塚圭樹) 2002/03/14

けいじゅ@日本ラショナルソフトウェアです.

[#16380] Re: defined? autoload constant — nobu.nakada@... 2002/03/14

なかだです。

[#16398] Re: defined? autoload constant — keiju@... (石塚圭樹) 2002/03/14

けいじゅ@日本ラショナルソフトウェアです.

[#16399] Re: defined? autoload constant — nobu.nakada@... 2002/03/14

なかだです。

[#16400] Re: defined? autoload constant — keiju@... (石塚圭樹) 2002/03/14

けいじゅ@日本ラショナルソフトウェアです.

[#16403] Re: defined? autoload constant — matz@... (Yukihiro Matsumoto) 2002/03/14

まつもと ゆきひろです

[#16407] Re: defined? autoload constant — nobu.nakada@... 2002/03/15

なかだです。

[#16409] Re: defined? autoload constant — matz@... (Yukihiro Matsumoto) 2002/03/15

まつもと ゆきひろです

[#16481] Re: defined? autoload constant — keiju@... (石塚圭樹) 2002/03/19

けいじゅ@日本ラショナルソフトウェアです.

[#16482] Re: defined? autoload constant — matz@... (Yukihiro Matsumoto) 2002/03/19

まつもと ゆきひろです

[#16082] Array#select without block — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

14 messages 2002/02/25

[#16102] No trace_func event at if-elsif-else line — "NAKAMURA, Hiroshi" <nakahiro@...>

なひです。

21 messages 2002/02/26
[#16103] Re: No trace_func event at if-elsif-else line — matz@... (Yukihiro Matsumoto) 2002/02/26

まつもと ゆきひろです

[#16109] Re: No trace_func event at if-elsif-else line — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/02/26

なひです。

[#16110] Re: No trace_func event at if-elsif-else line — matz@... (Yukihiro Matsumoto) 2002/02/26

まつもと ゆきひろです

[#16117] Re: No trace_func event at if-elsif-else line — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/02/26

なひです。

[#16127] Re: No trace_func event at if-elsif-else line — matz@... (Yukihiro Matsumoto) 2002/02/26

まつもと ゆきひろです

[#16133] Re: No trace_func event at if-elsif-else line — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/02/27

なひです。

[#16135] Re: No trace_func event at if-elsif-else line — matz@... (Yukihiro Matsumoto) 2002/02/27

まつもと ゆきひろです

[#16256] Rite debug API (was Re: No trace_func event at if-elsif-else line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/03/07

なひです。どうせ一年も先の話なのでのんびりと。

[#16258] Re: Rite debug API (was Re: No trace_func event at if-elsif-else line) — matz@... (Yukihiro Matsumoto) 2002/03/07

まつもと ゆきひろです

[#16134] Defining (Python) Source Code Encoding — TAKAHASHI Masayoshi <maki@...>

高橋征義です。ruby-list の「localized document」ともやや関係あり?

13 messages 2002/02/27

[ruby-dev:15894] Re: GC after load

From: nobu.nakada@...
Date: 2002-02-15 10:50:39 UTC
List: ruby-dev #15894
なかだです。

At Fri, 15 Feb 2002 11:58:06 +0900,
Nobuyoshi-Nakada wrote:
> あるいは、parse.yのmalloc()とかを置き換えてマークするとか。

激しく使い物にならなかったので、parse.yだけ再度。byaccでmake
testとrubiconまでは一応確認済み。


Index: parse.y
===================================================================
RCS file: /cvs/ruby/src/ruby/parse.y,v
retrieving revision 1.153
diff -u -2 -p -r1.153 parse.y
--- parse.y	2002/02/14 08:47:58	1.153
+++ parse.y	2002/02/15 10:29:44
@@ -149,4 +149,87 @@ static void top_local_init();
 static void top_local_setup();
 
+#if !(defined YYBISON && defined HAVE_ALLOCA)
+
+static struct {
+    void **ptr;
+    int count;
+} stacks;
+
+static void **
+stack_holder(ptr)
+    void *ptr;
+{
+    int i;
+    if (!stacks.ptr) {
+	stacks.count = 4;
+	stacks.ptr = ALLOC_N(void*, stacks.count);
+	MEMZERO(stacks.ptr, void*, stacks.count);
+	return stacks.ptr;
+    }
+    for (i = 0; i < stacks.count; ++i) {
+	if (stacks.ptr[i] == ptr) return &stacks.ptr[i];
+    }
+    if (ptr) {
+	for (i = 0; i < stacks.count; ++i) {
+	    if (!stacks.ptr[i]) return &stacks.ptr[i];
+	}
+    }
+    i = stacks.count << 1;
+    REALLOC_N(stacks.ptr, void*, i);
+    MEMZERO(stacks.ptr + stacks.count, void*, i - stacks.count);
+    stacks.count = i;
+    return &stacks.ptr[i];
+}
+
+static inline void *
+parser_malloc(size)
+    int size;
+{
+#if defined YYBISON && defined YYSTACK_USE_ALLOCA
+    return xmalloc(size);
+#else
+    void **holder = stack_holder(0);
+    VALUE *p = (VALUE *)xmalloc(size + sizeof(VALUE));
+    memset(p + 1, 0, size);
+    *holder = p;
+    *p = size;
+    return p + 1;
+#endif
+}
+
+static inline void *
+parser_realloc(ptr, size)
+    void *ptr;
+    int size;
+{
+#if defined YYBISON && defined YYSTACK_USE_ALLOCA
+    return xrealloc(ptr, size);
+#else
+    void **holder = stack_holder(ptr);
+    VALUE oldsize = *holder ? *(VALUE *)*holder : 0;
+    VALUE *p = (VALUE *)xrealloc(ptr, size + sizeof(VALUE));
+    if (size > oldsize) memset(p + 1 + oldsize, 0, size - oldsize);
+    *holder = p;
+    *p = size;
+    return p + 1;
+#endif
+}
+
+static inline void
+parser_free(ptr)
+    void *ptr;
+{
+#if !(defined YYBISON && defined YYSTACK_USE_ALLOCA)
+    *stack_holder(ptr) = 0;
+#endif
+    xfree(ptr);
+}
+
+#define malloc(size) parser_malloc(size)
+#define calloc(size) parser_calloc(size)
+#define realloc(ptr, size) parser_realloc(ptr, size)
+#define free(ptr) parser_free(ptr)
+#endif
+
 %}
 
@@ -2115,4 +2198,22 @@ int ruby__end__seen;
 static VALUE ruby_debug_lines;
 
+void
+rb_gc_mark_parser()
+{
+#if defined YYBISON && defined HAVE_ALLOCA
+    if (!ruby_in_compile) return;
+    rb_gc_mark_maybe(yylval.val);
+#else
+    int i;
+    if (!ruby_in_compile || !stacks.ptr) return;
+    rb_gc_mark_maybe(yylval.val);
+    for (i = 0; i < stacks.count; ++i) {
+	VALUE *p = stacks.ptr[i];
+	if (!p || !*p) continue;
+	rb_gc_mark_locations(p + 1, (VALUE *)((char *)p + *p));
+    }
+#endif
+}
+
 static NODE*
 yycompile(f, line)
@@ -2162,4 +2263,6 @@ yycompile(f, line)
     cur_mid = 0;
 
+    rb_gc_finalize_deferred();
+
     if (n == 0) node = ruby_eval_tree;
     return node;
@@ -2890,5 +2993,5 @@ here_document(term, indent)
 	    ruby_sourceline = linesave;
 	    rb_compile_error("can't find string \"%s\" anywhere before EOF", eos);
-		free(eos);
+		xfree(eos);
 		return 0;
 	}
@@ -2941,5 +3044,5 @@ here_document(term, indent)
 	}
     }
-    free(eos);
+    xfree(eos);
     lex_lastline = lastline_save;
     lex_pbeg = RSTRING(lex_lastline)->ptr;
@@ -4915,8 +5018,8 @@ local_pop()
 
     if (lvtbl->tbl) {
-	if (!lvtbl->nofree) free(lvtbl->tbl);
+	if (!lvtbl->nofree) xfree(lvtbl->tbl);
 	else lvtbl->tbl[0] = lvtbl->cnt;
     }
-    free(lvtbl);
+    xfree(lvtbl);
     lvtbl = local;
 }
@@ -5026,5 +5139,5 @@ top_local_setup()
 	    }
 	    if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) {
-		free(ruby_scope->local_tbl);
+		xfree(ruby_scope->local_tbl);
 	    }
 	    ruby_scope->local_vars[-1] = 0;


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread