yarv-diff:367
From: ko1 atdot.net
Date: 17 Aug 2006 14:45:01 +0900
Subject: [yarv-diff:367] r534 - in trunk: . yarvtest
Author: ko1
Date: 2006-08-17 14:45:00 +0900 (Thu, 17 Aug 2006)
New Revision: 534
Modified:
trunk/
trunk/ChangeLog
trunk/eval.c
trunk/insns.def
trunk/thread_pthread.h
trunk/yarvcore.c
trunk/yarvtest/test_class.rb
trunk/yarvtest/test_opts.rb
Log:
r831@lermite: ko1 | 2006-08-17 12:28:27 +0900
* eval.c : change initilize routine order ([yarv-dev:1067])
* yarvcore.c (Init_yarv) : init th->machine_stack_start
* thread_pthread.h : add malloc value check ([yarv-dev:1066])
* insns.def (opt_eq) : fix typo ([yarv-dev:1072])
* yarvtest/test_opts.rb : add a test for above
* yarvtest/test_class.rb : add a test for last commit
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:830
+ 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:831
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/ChangeLog 2006-08-17 05:45:00 UTC (rev 534)
@@ -4,9 +4,24 @@
# from Mon, 03 May 2004 01:24:19 +0900
#
+2006-08-17(Thu) 12:23:52 +0900 Koichi Sasada <ko1 atdot.net>
+
+ * eval.c : change initilize routine order ([yarv-dev:1067])
+
+ * yarvcore.c (Init_yarv) : init th->machine_stack_start
+
+ * thread_pthread.h : add malloc value check ([yarv-dev:1066])
+
+ * insns.def (opt_eq) : fix typo ([yarv-dev:1072])
+
+ * yarvtest/test_opts.rb : add a test for above
+
+ * yarvtest/test_class.rb : add a test for last commit
+
+
2006-08-17(Thu) 11:02:16 +0900 Koichi Sasada <ko1 atdot.net>
- * class.c (clone_method) : check undef-ed method
+ * class.c (clone_method) : check undef-ed method ([yarv-dev:1068])
2006-08-15(Tue) 15:07:43 +0900 Koichi Sasada <ko1 atdot.net>
Modified: trunk/eval.c
===================================================================
--- trunk/eval.c 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/eval.c 2006-08-17 05:45:00 UTC (rev 534)
@@ -108,8 +108,8 @@
rb_origenviron = environ;
#endif
+ Init_stack((void *)&state);
Init_yarv();
- Init_stack((void *)&state);
Init_heap();
PUSH_TAG(PROT_NONE);
Modified: trunk/insns.def
===================================================================
--- trunk/insns.def 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/insns.def 2006-08-17 05:45:00 UTC (rev 534)
@@ -1941,7 +1941,7 @@
if (0) {
}
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
- HEAP_CLASS_OF(recv) == rb_cFloat &&
+ HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_EQ)) {
double a = RFLOAT(recv)->value;
double b = RFLOAT(obj)->value;
Modified: trunk/thread_pthread.h
===================================================================
--- trunk/thread_pthread.h 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/thread_pthread.h 2006-08-17 05:45:00 UTC (rev 534)
@@ -345,6 +345,12 @@
FGLOCK(&signal_thread_list_lock, {
struct yarv_signal_thread_list *list =
malloc(sizeof(struct yarv_signal_thread_list));
+
+ if (list == 0) {
+ fprintf(stderr, "fatal error: malloc error outside ruby system\n");
+ exit(1);
+ }
+
list->th = th;
list->prev = &signal_thread_list_anchor;
Modified: trunk/yarvcore.c
===================================================================
--- trunk/yarvcore.c 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/yarvcore.c 2006-08-17 05:45:00 UTC (rev 534)
@@ -1019,5 +1019,7 @@
th_init2(th);
th->vm = vm;
+ th->machine_stack_start = rb_gc_stack_start;
+
yarv_set_current_running_thread_raw(th);
}
Modified: trunk/yarvtest/test_class.rb
===================================================================
--- trunk/yarvtest/test_class.rb 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/yarvtest/test_class.rb 2006-08-17 05:45:00 UTC (rev 534)
@@ -723,5 +723,16 @@
[c.methods.include?('foo'), c.methods.include?('bar')]
}
end
+
+ def test_dup
+ ae %q{
+ ObjectSpace.each_object{|obj|
+ if Module === obj && (obj.respond_to? :dup)
+ obj.dup
+ end
+ }
+ :ok
+ }
+ end
end
Modified: trunk/yarvtest/test_opts.rb
===================================================================
--- trunk/yarvtest/test_opts.rb 2006-08-17 05:44:15 UTC (rev 533)
+++ trunk/yarvtest/test_opts.rb 2006-08-17 05:45:00 UTC (rev 534)
@@ -98,6 +98,21 @@
end
}
end
+
+ def test_eq
+ ae %q{
+ class Foo
+ def ==(other)
+ true
+ end
+ end
+ foo = Foo.new
+ [1.0 == foo,
+ 1 == foo,
+ "abc" == foo,
+ ]
+ }
+ end
end
--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml