Граф коммитов

83 Коммитов

Автор SHA1 Сообщение Дата
nobu 3e8bba2fc1 vm_core.h: move jmpbuf between tag and prev
* vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to
  be accessible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18 06:49:19 +00:00
nobu f7624d984b eval_intern.h: jmpbuf must be accessible
* eval_intern.h (TH_PUSH_TAG): ensure jmpbuf to be accessible before
  pushing tag to get rid of unaccessible tag by stack overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-17 02:07:00 +00:00
akr 4ddce7a68b * configure.in: Check mblen().
* eval_intern.h (CharNext): Don't use mblen() is not available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 12:52:26 +00:00
charliesome af35f2a61d * configure.in: check for the whether crt_externs.h is present when compiling
for darwin (this header is missing in the iOS SDK)
* eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
  not defined, include missing/crt_externs.h instead
* hash.c: ditto
* missing/setproctitle.c: ditto
* missing/crt_externs.h: declare _NSGetEnviron() function and define environ
  for iOS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 14:23:25 +00:00
ko1 270fbd9c05 * vm_core.h, eval_intern.h (CHECK_STACK_OVERFLOW): move
CHECK_STACK_OVERFLOW() to vm_core.h and rename to
  CHECK_VM_STACK_OVERFLOW().
  This change is only move and rename.
* tool/instruction.rb: catch up above changes.
* vm.c, vm_insnhelper.c: ditto.
* vm_insnhelper.c (vm_stackoverflow): add a function to unify
  raising vm stackoverflow exception.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25 09:57:07 +00:00
nagachika 26221584a9 * vm.c (rb_vm_jump_tag_but_local_jump): remove unnessesary 2nd
argument.

* load.c (rb_load_internal): ditto.

* eval_intern.h (rb_vm_jump_tag_but_local_jump): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-18 17:04:05 +00:00
knu 1c0323adbc Fix build when gcc is used and the platform's libc lacks alloca().
* include/ruby/ruby.h (alloca), eval_intern.h (alloca), gc.c
  (alloca): Make alloca() globally available by moving the
  ultimate ifdef's to ruby/ruby.h.  Gcc hides its builtin alloca()
  when compiling with -ansi, and linking thus fails on platforms
  that lack their own alloca() implementation in libc, which
  include OpenBSD and some ports of NetBSD.  We use alloca()
  everywhere including from within third party C extentions, so
  alloca() must be made globally available. [Bug #7307]

* addr2line.c (alloca): Replace the alloca() part with the
  ultimate ifdef's. [Bug #7307]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 03:34:08 +00:00
ko1 0a71db8a74 * vm_core.h: remove lfp (local frame pointer) and rename
dfp (dynamic frame pointer) to ep (environment pointer).
  This change make VM `normal' (similar to other interpreters).
  Before this commit:
  Each frame has two env pointers lfp and dfp.  lfp points
  local environment which is method/class/toplevel frame.
  lfp[0] is block pointer.
  dfp is block local frame. dfp[0] points previous (parent)
  environment pointer.
  lfp == dfp when frame is method/class/toplevel.
  You can get lfp from dfp by traversing previous environment
  pointers.
  After this commit:
  Each frame has only `ep' to point respective enviornoment.
  If there is parent environment, then ep[0] points parent
  envioenment (as dfp).  If there are no more environment,
  then ep[0] points block pointer (as lfp).  We call such ep
  as `LEP' (local EP).  We add some macros to get LEP and to
  detect LEP or not.
  In short, we replace dfp and lfp with ep and LEP.
  rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
  and member `ep' is added.
  rename rb_thread_t's member `local_lfp' and `local_svar' to
  `root_lep' and `root_svar'.
  (VM_EP_PREV_EP(ep)): get previous environment pointer.  This macro
  assume that ep is not LEP.
  (VM_EP_BLOCK_PTR(ep)): get block pointer.  This macro assume
  that ep is LEP.
  (VM_EP_LEP_P(ep)): detect ep is LEP or not.
  (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
  (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
  (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
  (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
* vm.c: apply above changes.
  (VM_EP_LEP(ep)): get LEP.
  (VM_CF_LEP(cfp)): get LEP of cfp->ep.
  (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
  (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
* vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
  apply above changes.
* cont.c: ditto.
* eval.c, eval_intern.h: ditto.
* proc.c: ditto.
* thread.c: ditto.
* vm_dump.c: ditto.
* vm_exec.h: fix function name (on vm debug mode).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 03:14:59 +00:00
nobu 8603c5934a * eval_error.c (rb_print_undef_str): new function to raise
NameError for undefined method.
* load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
  variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
  (rb_mod_{remove,undef,alias}_method, set_method_visibility):
  remove inadvertent symbol creation.  based on the first patch by
  Jeremy Evans at [ruby-core:38447].  [Feature #5089]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 16:05:35 +00:00
kosaki 74b339e938 * thread_pthread.c (rb_thread_create_timer_thread): removed
rb_disable_interrupt()/rb_enable_interrupt().
* vm_core.h: ditto.
* process.c (static void before_exec): ditto.
* process.c (static void after_exec): ditto.
  [Bug #4765] [ruby-dev:43571]

* eval_intern.h: removed rb_trap_restore_mask().
* vm_eval.c (rb_throw_obj): ditto.
* eval.c (setup_exception): ditto.

* signal.c: removed trap_last_mask.
* signal.c (trap_restore_mask): removed.
* signal.c (init_sigchld): comment clarification why signal block
  is needed. and removed trap_last_mask operation.
* signal.c (trap_ensure): removed trap_last_mask operation.

* signal.c (rb_disable_interrupt, rb_enable_interrupt): made
  static and removed sigdelset(SIGVTALARM) and sigdelset(SIGSEGV).

* process.c (rb_syswait): removed implicit signal handler change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 17:04:40 +00:00
nobu 685444569c * fix for build on solaris 10.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 00:12:55 +00:00
nobu 2082417a48 * eval.c (setup_exception): internal exception should be hidden
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 13:36:46 +00:00
akr c8e22ee12c * eval_intern.h: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17 22:54:29 +00:00
mame 9ffd060b30 * eval_intern.h (CHECK_STACK_OVERFLOW): it was not intended to add
size_t to a pointer typed VALUE*.  Coverity Scan found this defect.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15 14:57:18 +00:00
mame 2db572514c * load.c (rb_load_internal): remove call to rb_realpath_internal
within rb_load_internal which caused big performance degradation.
  Instead, call rb_realpath_internal in the caller of
  rb_load_internal.  [ruby-dev:41502] [ruby-dev:41610]

* vm.c (rb_vm_call_cfunc): ditto.

* eval_intern.h (rb_vm_call_cfunc): ditto.

* ruby.c (process_options): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-17 14:32:20 +00:00
nobu 7336f32c3b * load.c (ruby_init_ext): statically linked extensions have no
real path.  [ruby-dev:41526]

* vm.c (rb_vm_call_cfunc): add filepath argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-03 09:58:32 +00:00
nobu 04daf205b6 * vm_core.h (rb_vm_get_sourceline): moved from eval_intern.h for
vm_dump.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13 04:09:26 +00:00
nobu fbe5ce6ca7 * eval_intern.h (rb_vm_get_sourceline): add prototype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-11 00:57:09 +00:00
nobu e6a8408c2c * iseq.c (iseq_s_disasm): return nil for native methods.
[ruby-core:27226], [Bug#2499]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 06:22:48 +00:00
marcandre a77a9bb20c * thread.c: Revert changes to Thread#raise made in r25278 [ruby-core:25367]
* eval_intern.h: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 23:53:48 +00:00
nobu 478d3535ef * eval.c (rb_threadptr_errinfo): renamed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 08:57:02 +00:00
marcandre 8571bdbd67 * thread.c (rb_threadptr_execute_interrupts_rec, rb_threadptr_raise): Thread#raise with no argument will now re-raise the current exception if there is one [ruby-core:25367]
* eval.c (get_errinfo, rb_rubylevel_thread_errinfo): Getter for current exception for a given thread

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 05:13:08 +00:00
ko1 c8c6fde56f * eval_intern.h: use rb_node_newnode() directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-17 06:44:28 +00:00
ko1 79b62da9b4 * thread.c: rename functions which require a parameter
"rb_thread_t *", the prefix to be rb_threadptr_ instead of
  rb_thread_.
* thread.c (rb_thread_add_event_hook(), rb_thread_remove_event_hook):
  change the parameter type from rb_thread_t * to VALUE.
* eval.c, eval_error.c, eval_intern.h, signal.c, vm_core.h, vm_eval.c:
  ditto.
* include/ruby/intern.h: remove decl of rb_thread_signal_raise() and
  rb_thread_signal_exit().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08 16:14:06 +00:00
nobu 589ec2beb5 * ruby.c (ruby_script): sets also VM toplevel program name.
* ruby.c (process_options): no longer needs additional frame.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-17 05:02:58 +00:00
nobu 35899279e8 * eval_intern.h (_longjmp): never return. see [ruby-core:23241]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-01 04:18:02 +00:00
nobu 19bbab6140 * vm_eval.c (method_missing): should not pop cfp if missing method
is method_missing.  [ruby-core:22298]

* vm_eval.c (rb_raise_method_missing): new function to directly
  raise NoMethodError.

* vm_insnhelper.c (vm_call_method): fixed the case method_missing
  is missing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 01:43:59 +00:00
nobu f35308b3ef * eval_intern.h (translit_char): moved from ruby.c.
* load.c (load_ext): transliterates file separators and back if
  needed.

* symbian/setup (DLN_NEEDS_ALT_SEPARATOR): defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 06:11:41 +00:00
ko1 9b520ddcec * vm_eval.c, eval.c (rb_f_block_given_p): move definition of
"iterator?" and "block_given?" to make static.
* vm.c (vm_get_ruby_level_caller_cfp): make it static.
* eval_intern.h, vm_insnhelper.c: move decl. of
  vm_get_ruby_level_caller_cfp()
  from eval_intern.h to vm_insnhelper.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 03:03:09 +00:00
ko1 cf23d0f0f0 * vm.c: add a prefix "rb_" to exposed functions
vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(),
  vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(),
  vm_get_sourceline(), vm_cref(), vm_localjump_error(),
  vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump().
  This changes may affect only core because most of renamed functions
  require a pointer of not-exposed struct such as rb_thread_t or NODE.
  In short, they are core functions.
* cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c,
  vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c:
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 02:38:11 +00:00
yugui e8ee99ff1a * dln.c: Ruby no longer supports VMS.
* error.c: ditto.

* eval.c: ditto.

* eval_intern.h: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/ruby.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* vms/config.h: removed.

* vms/vms.h: ditto.

* vms/vmsruby_private.c: ditto.

* vms/vmsruby_private.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:57:06 +00:00
yugui 642e081879 * dln.c: Ruby no longer supports MacOS 9 or before.
* eval.c: ditto.

* eval_intern.h: ditto.

* ext/extmk.rb: ditto.

* ext/tk/sample/tkextlib/treectrl/demo.rb: ditto.

* ext/tk/stubs.c: ditto.

* file.c: ditto.

* hash.c: ditto.

* include/ruby/defines.h: ditto.

* ruby.c: ditto.

* signal.c: ditto.

* vm_core.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:42:00 +00:00
shyouhei 705b8b41eb * vm_core.h: ruby/ruby.h should be included at the very first
place in an entire compilation unit, as it includes
 	  ruby/config.h


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 22:43:53 +00:00
ko1 7f7834abf7 * include/ruby/node.h, vm_core.h: move definition of
RUBY_VM_METHOD_NODE to node.h.
* class.c, common.mk: remove useless inclusion.
* compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h.
  move some definitions from vm_core.h to iseq.h.
* compile.c, iseq.c, vm.c: ditto.
* eval.c, compile.c: move some functions for parser
  from eval.c to compile.c.
* eval_intern.h, vm_core.h: move va_init_list() macro to
  vm_core.h.
* iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added.
* load.c, ruby.c: use rb_iseq_new_top() instead of
  rb_iseq_new() with ISEQ_TYPE_TOP constant directly.
* proc.c: use rb_iseq_first_lineno() instead of accessing
  iseq structure.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 07:49:45 +00:00
ko1 8cd252ac6f * common.mk: clean up
- remove blockinlining.$(OBJEXT) to built
  - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h)
  - make VM_CORE_H_INCLUDES variable (vm_core.h)
  - simplify rules.
  - make depends rule to output depend status using gcc -MM.
* include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h.
* include/ruby.h: ditto.
* load.c: add inclusion explicitly.
* enumerator.c, object.c, parse.y, thread.c, vm_dump.c:
  remove useless inclusion.
* eval_intern.h: cleanup inclusion.
* vm_core.h: rb_thread_t should be defined in this file.
* vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c.
* vm.h, vm_exec.h: rename vm.h to vm_exec.h.
* insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h.
* vm.c, vm_insnhelper.c, vm_insnhelper.h:
  - rename vm_eval() to vm_exec_core().
  - rename vm_eval_body() to vm_exec().
  - cleanup include order.
* vm_method.c: fix comment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 00:20:28 +00:00
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 1c22ef1705 * configure.in (shutdown, sched_yield, pthread_attr_setinheritsched):
check for Haiku.

* eval_intern.h, io.c, thread_pthread.c: use autoconfisticated results.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 08:03:19 +00:00
naruse 48e21d2051 * eval_intern.h: Add support to Haiku. see [ruby-core:18110]
* include/ruby/defines.h: ditto.

* configure.in: ditto.

* thread_pthread.c: ditto.

* io.c: ditto.

* lib/mkmf.rb: ditto.

* ext/socket/getaddrinfo.c: ditto.

* ext/socket/extconf.rb: ditto.

* ext/socket/socket.c: ditto.

* ext/socket/addrinfo.h: ditto.

* ext/socket/getnameinfo.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 20:52:44 +00:00
shyouhei 3e69e83a62 * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbids
comma at end of enumerator list

 	* include/ruby/ruby.h (enum ruby_value_type): ditto.

	* eval_intern.h (enum): ditto.

	* vm_core.h (enum rb_thread_status): ditto.

	* parse.y (enum lex_state_e): ditto.

	* parse.y (enum string_type): ditto.

	* process.c (enum): ditto.

	* ruby.c (enum dump_flag_bits): ditto.

	* ruby.c (enum disable_flag_bits): ditto.

	* compile.c (iseq_link_element): ditto

	* debug.c (union): ditto.

	* cont.c (enum context_type): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:27:58 +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
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
nobu 571883a217 * vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 09:55:36 +00:00
usa 477c0db2bd * eval_intern.h, vm_core.h, include/ruby/intern.h, include/ruby/ruby.h,
vm.c: need to add const to prototypes, of course.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 06:22:41 +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
nobu 9f48c67236 * eval_intern.h (enum ruby_tag_type): enum for debug.
* debug.c (dummy_gdb_enums.value_type): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08 06:56:59 +00:00
mame 2de3f18319 * eval_intern.h: speficy the values of the enumeration constants
explicitly.  [ruby-dev:34489]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 07:12:37 +00:00
nobu b39676f6a9 * configure.in (RUBY_SETJMP, RUBY_LONGJMP, RUBY_JMP_BUF): prefers
__builtin_setjmp, _setjmp over setjmp and sigsetjmp.
  [ruby-core:16023], [ruby-core:16086]

* configure.in (--with-setjmp-type): new option to override the
  default rule in the above.

* eval_intern.h (ruby_setjmp, ruby_longjmp), gc.c (rb_setjmp),
  vm_core.h (rb_jmpbuf_t): use RUBY_SETJMP, RUBY_LONGJMP and
  RUBY_JMP_BUF.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-31 17:58:41 +00:00
matz 1ee96f7709 * eval_intern.h (TH_EXEC_TAG): need not to FLUSH_REGISTER_WINDOWS.
[ruby-core:15871], [ruby-dev:34088]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-19 08:32:30 +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