ko1
204929af9d
* include/ruby/signal.h: removed.
...
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c,
io.c, process.c, signal.c: vm_core.h: ditto.
Some unused external global variables are also removed.
(rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending,
rb_thread_critical)
* ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c,
ext/readline/readline.c, ext/socket/depend,
ext/socket/socket.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 08:00:05 +00:00
nobu
1aa2d2976f
* eval.c (Init_eval): typo fixed in r17833.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03 12:06:22 +00:00
nobu
bb350b04e5
* eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze
...
messages of preallocated special exceptions also.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-02 22:02:58 +00:00
shyouhei
982450e24f
* eval.c (rb_interrupt): trick to suppress GCC warning.
...
* sprintf.c (rb_str_format): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 11:59:50 +00:00
ko1
faa93e847d
* eval.c (rb_f_block_given_p): fix to skip class frame.
...
[ruby-core:14813]
* KNOWNBUGS.rb, bootstraptest/test_method.rb: move solved test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15 16:50:37 +00:00
nobu
9b45b336ee
* vm_core.h (rb_vm_t), vm.c (rb_vm_mark): moved preallocated special
...
exceptions.
* eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze
preallocated special exceptions.
* eval.c (rb_longjmp): duplicate the thrown exception to set backtrace
if it was frozen.
* gc.c (rb_memerror): raise nomem_error without backtrace if failed to
make backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15 09:17:06 +00:00
ko1
9e324fdd3e
* vm.c, eval_intern.h (PASS_PASSED_BLOCK):
...
set a VM_FRAME_FLAG_PASSED flag to skip this frame when
searching ruby-level-cfp.
* eval.c, eval_intern.h, proc.c: fix to check cfp. if there is
no valid ruby-level-cfp, cause RuntimeError exception.
[ruby-dev:34128]
* vm_core.h, vm_evalbody.c, vm.c, vm_dump.c, vm_insnhelper.c,
insns.def: rename FRAME_MAGIC_* to VM_FRAME_MAGIC_*.
* KNOWNBUGS.rb, bootstraptest/test*.rb: move solved bugs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 21:46:43 +00:00
akr
5849668694
* eval.c (Init_stack): don't declare. it is a macro now.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 14:25:39 +00:00
nobu
5a647a3f5f
* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.
...
* *.c: no cache in init functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 09:25:32 +00:00
mame
cbbc06dcf7
* eval.c (ruby_finalize_0): clear trace_func after executing END
...
procs.
* thread.c: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05 14:27:09 +00:00
nobu
075530a685
* suppress warnings with -Wwrite-string.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31 09:28:20 +00:00
ko1
59c061235f
* eval_method.c: renamed from vm_method.c. "vm_method.c" is included
...
by "vm.c".
* vm_eval.c: added. Some codes are moved from "eval.c"
* common.mk: fix for above changes.
* compile.c: make a vm_eval(0)
* eval.c, eval_error.c, eval_intern.h, eval_jump.c, proc.c, vm.c,
id.c, id.h, vm_core.h, vm_dump.c, vm_evalbody.c, vm_insnhelper.c,
blockinlining.c: fix for above changes. and do some refactoring.
this changes improve rb_yield() performance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24 17:50:17 +00:00
ko1
a45cd8a01c
* eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,
...
vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 16:19:14 +00:00
ko1
559d021d20
* eval.c, vm.c, vm_core.h, vm_insnhelper.c: specify "const".
...
* vm_opts.h: add a OPT_TOKEN_THREADED_CODE macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 04:28:13 +00:00
ko1
d457fdad2d
* eval.c, vm_insnhelper.c: fix cref in instance_eval
...
and cvar_base search protocol.
* bootstraptest/test_knownbug.rb, test_eval.rb: move soleved test
and add new tests.
* test/ruby/test_eval.rb: fix tests for spec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 18:47:56 +00:00
ko1
385f0e8af6
* vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.
...
VM value stack frame of block contains cref information.
(dfp[-1] points CREF)
* compile.c, eval_intern.h, eval_method.c, load.c, proc.c,
vm_dump.h, vm_core.h: ditto.
* include/ruby/ruby.h, gc.c: remove T_VALUES because of above
changes.
* bootstraptest/test_eval.rb, test_knownbug.rb: move solved test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 03:08:50 +00:00
matz
0e0229f302
* eval.c (rb_call0): defer calling of rb_frame_self() until it
...
become really necessary.
* eval.c (rb_call): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-13 22:53:01 +00:00
akr
50c2a48b85
* eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF to
...
avoid SEGV by at_exit { Fiber.new{}.resume } on IA64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 08:19:35 +00:00
akr
f587eab23c
* eval.c (rb_obj_respond_to): check the result of respond_to? method
...
by RTEST.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 05:30:08 +00:00
nobu
7b4a171158
* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):
...
use iseq instead of NODE.
* gc.c (source_filenames): removed.
* include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free,
ripper_initialize): rb_source_filename() is no longer used.
* compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos,
parser_warn, e_option_supplied, warn_unless_e_option, range_op,
cond0): nd_file is no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12 03:41:51 +00:00
knu
b93bb68a3a
* eval.c (rb_f_loop): Mention StopIteration in the document.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 10:42:14 +00:00
matz
a4d6f2265a
* include/ruby/node.h: add new constants for rb_call()'s scope.
...
* eval.c (iterate_method): use CALL_* scope constant to specify
proper scope value.
* eval.c (rb_each, rb_apply, rb_funcall, rb_funcall2, rb_funcall3):
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-01 21:30:36 +00:00
nobu
d728efc96d
* eval.c (rb_obj_instance_eval): invalid comment syntax.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-21 06:51:21 +00:00
nobu
96240c6d2d
* eval_intern.h (rb_thread_raised_set): use generic flags.
...
* eval.c (rb_longjmp): clear all raised flags.
* eval.c (stack_check): leave clearing flag to rb_longjmp.
* gc.c (rb_memerror): use thread raised flag instead of static flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12 05:47:10 +00:00
matz
eb1f89015e
* eval.c (rb_f_local_variables): local_variables should return an
...
array of symbols. [ruby-dev:34008]
* vm.c (collect_local_variables_in_env): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-10 15:48:35 +00:00
akr
861219ce4a
fix doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 01:04:46 +00:00
nobu
ecd35c0d96
* eval.c (stack_check): made flag per threads.
...
* thread.c (rb_thread_set_raised, rb_thread_reset_raised): prefixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28 04:52:01 +00:00
nobu
e4021207fb
* eval.c (rb_raise_jump): moved adjustment for control frame.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-19 11:49:51 +00:00
nobu
b81a66d1ef
* eval.c (ruby_exec_node): no thread starts inside iseq compilation.
...
* eval.c (rb_f_raise): skip current control frame. [ruby-core:15589]
* insns.def (opt_div): raise as the ordinary method. [ruby-core:15589]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-19 02:14:14 +00:00
mame
a707f6249f
* eval.c (eval): allow to eval in a binding that has a singleton method.
...
[ruby-dev:33763]
* test/ruby/test_proc.rb: add tests to achieve over 70% test coverage
of time.c.
* test/ruby/test_method.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-13 15:03:59 +00:00
nobu
1c5640855f
* eval.c (eval): check if backtrace is empty. [ruby-core:15040]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-14 18:41:44 +00:00
akr
6cdef2dc7e
* $Date$ keyword removed to avoid inclusion of locale dependent
...
string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
matz
373d43f61e
* eval.c (Init_eval): move instance_eval and instance_exec to
...
BasicObject. [ruby-core:14747]
* lib/delegate.rb: should preserve new methods in BasicObject.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-04 16:51:16 +00:00
matz
3410fd6812
* README.EXT.ja, dir.c, eval.c, eval_intern.h, lex.c.src,
...
lex.c.blt, keywords, load.c, thread.c: more ANSI'ize.
a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp>
in [ruby-dev:32725]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25 04:17:06 +00:00
akr
96438d2bd8
* eval.c (rb_exc_raise): ANSI style.
...
(rb_exc_fatal): ditto.
(rb_raise_jump): ditto.
(rb_jump_tag): ditto.
(rb_block_given_p): ditto.
* variable.c (original_module): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 09:25:27 +00:00
akr
c332266ee0
* eval_method.c (Init_eval_method): extracted from Init_eval
...
for rdoc to find rb_mod_remove_method, rb_mod_undef_method and
rb_mod_alias_method.
* eval.c (Init_eval): call Init_eval_method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 09:07:20 +00:00
akr
dc18845c23
* eval.c (function_call_may_return_twice_jmp_buf): removed.
...
(function_call_may_return_twice_false): removed.
[ruby-core:14335]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 08:51:38 +00:00
akr
e01c045a8b
enable several rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 07:52:39 +00:00
akr
e8b7ad0f5c
enable documents for raise and local_variables.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23 15:43:00 +00:00
ko1
85143195da
* eval.c (rb_obj_instance_eval): use class of immediate objects.
...
* test/ruby/test_eval.rb: fix a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 02:52:27 +00:00
matz
d65ae590d0
* eval.c (rb_f_method_name): now __method__ and __callee__ are
...
aliases. [ruby-core:14244]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 01:20:57 +00:00
ko1
c334a09f7a
* common.mk, *.ci: renamed to *.c.
...
* eval_laod.c: renamed to load.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 09:29:46 +00:00
ko1
9bd91ea3b0
* eval.c (errinfo_place): skip if error is Fixnum. [ruby-dev:32608]
...
* bootstraptest/test_exception.rb, test_known_bug.rb: move fixed bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19 08:02:03 +00:00
akr
30c5d612c2
* eval.c (rb_protect): restore root_jmpbuf even if proc exits by
...
break such as dbm.delete_if { break }.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-13 23:19:14 +00:00
akr
719841ca37
* eval.c (rb_protect): restore root_jmpbuf to avoid SEGV by
...
'IO.pipe; [].each.next' with gcc version 3.3.5 (Debian 1:3.3.5-13)
on IA64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-13 11:10:46 +00:00
matz
2db98d937a
* object.c (Init_Object): singleton_method_{added,removed,undefined}
...
hooks should be defined for BasicObject. [ruby-dev:32531]
* eval.c (Init_eval): method_missing should be defined for all
objects; moved to BasicObject.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11 06:23:21 +00:00
matz
0dd39db036
* eval.c (rb_method_missing): RDoc update patch from Hugh Sasse
...
<hgs AT dmu.ac.uk>. [ruby-core:12932]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10 17:24:52 +00:00
matz
5ee029f62c
* eval.c (rb_f_public_send): rename invoke_method to public_send.
...
it now invokes public method only no matter how it's called.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10 05:34:50 +00:00
ko1
6fafbfd63e
* insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on third
...
parameter of IFUNC. [ruby-dev:32329]
* enumerator.c: fix to pass exact number of argument.
* eval.c (rb_yield_values2): added.
* include/ruby/ruby.h: ditto.
* bootstraptest/test_knownbug.rb: move a fixed test.
* bootstraptest/test_block.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 04:30:19 +00:00
matz
29c7c72e09
* signal.c (trap_signm): SIGVTALRM no longer used for green
...
thread. [ruby-talk:281318]
* signal.c (ruby_sig_finalize): do not install SIG_DFL handler if
previous handler is sighandler().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 14:08:58 +00:00