Commit graph

26 commits

Author SHA1 Message Date
yugui
6cf27fcf3b merges r24726 from trunk into ruby_1_9_1.
--
* vm_eval.c (eval_string_with_cref): fix to check local_table_size.
  [ruby-dev:39205] [Bug #2024]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 16:12:03 +00:00
yugui
b3260dbefc merges r23675 from trunk into ruby_1_9_1.
--
* vm_eval.c (rb_f_catch): updated rdoc about generalized argument,
  and the case without arguments.  [ruby-core:23827]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:15:04 +00:00
yugui
b7a195462a merges r23673 from trunk into ruby_1_9_1.
--
* vm_eval.c (rb_f_throw): fixed rdoc about execption.
  [ruby-core:23824]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:14:52 +00:00
yugui
8d5f3471b0 merges r23371 from trunk into ruby_1_9_1.
--
* vm_eval.c (rb_f_catch): gets rid of issue with gcc 4.4.  a patch
  from Alexey Froloff in [ruby-core:23398].  [ruby-core:22924]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 14:47:27 +00:00
yugui
4c38814d0b merges r23097 from trunk into ruby_1_9_1.
--
* vm_eval.c (eval_string_with_cref): replaces the message if
  frozen.  [ruby-dev:38208]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19 13:35:19 +00:00
yugui
41031667c9 merges r22494 and r22495 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@22551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:05:31 +00:00
yugui
174eed3541 merges r22275 from trunk into ruby_1_9_1.
* vm_eval.c (eval_string_with_cref): use rb_vm_get_ruby_level_next_cfp()
  instead of vm_get_ruby_level_caller_cfp().  checking a upper frame
  is not enough.  [ruby-dev:37984]
* proc.c, vm_core.h: declare rb_vm_get_ruby_level_next_cfp()
  on vm_core.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 12:49:28 +00:00
yugui
33379025f8 merges r21660 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 11:09:51 +00:00
yugui
3c000eab7c merges r21659 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 11:09:42 +00:00
yugui
3929773eef merges r21653 from trunk into ruby_1_9_1.
* iseq.c:
  rename ruby_iseq_disasm_insn() -> rb_iseq_disasm_insn().
  rename ruby_iseq_disasm() -> rb_iseq_disasm().
* compile.c:
  rename ruby_iseq_compile() -> rb_iseq_compile_node().
  rename ruby_iseq_translate_threaded_code() ->
  rb_iseq_translate_threaded_code().
  rename ruby_insns_name_array() -> rb_insns_name_array().
  rename ruby_iseq_build_from_ary() -> rb_iseq_build_from_ary().
* iseq.c, compile.c: remove ruby_insn_make_insn_table() and make
  static function insn_make_insn_table().
* iseq.h, ruby.c, vm.c, vm_core.h, vm_eval.c, vm_dump.c,
  blockinlining.c: ditto.
  Rename strange "ruby_" prefix to "rb_" prefix.
  This changes may affect only core because renamed functions
  require a pointer of rb_iseq_t which is not exposed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 11:09:24 +00:00
yugui
e6b9c72d63 merges r21651 from trunk into ruby_1_9_1.
* eval.c, vm_eval.c (rb_f_local_variables): move definition from eval.c
  to vm_eval.c because vm_collect_local_variables_in_heap() should
  be static function.
* vm.c (vm_collect_local_variables_in_heap): make it static.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 11:09:14 +00:00
yugui
1e8a6745b0 merges r21084 from trunk into ruby_1_9_1.
* vm_insnhelper.c (vm_call_method, vm_call_cfunc): use original id instead of
  calling id when NODE_CFUNC or NODE_BMETHOD.
  fixes Bug #632 [ruby-core:19282].
* vm_eval.c (vm_call0, vm_call_super): ditto.
* vm_method.c (rb_add_method, rb_alias): store original id
  in nd_file field of NODE_METHOD.
* test/stringio/test_stringio.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 09:39:43 +00:00
yugui
74bbac68df merges r20967 from trunk into ruby_1_9_1.
* vm_insnhelper.c (vm_call_method): use class of method defined
  instead of receiver's class on bmethod.  fixes [ruby-core:20786]
* bootstraptest/test_method.rb: add a test for above.
* vm_insnhelper.c (vm_setup_method): remove unused parameter klass.
* vm_insnhelper.h (CALL_METHOD): ditto.
* insns.def, vm_eval.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 09:55:35 +00:00
yugui
97d6c93b98 merges r20744 from trunk into ruby_1_9_1.
* vm_eval.c (vm_call0): NODE_ZSUPER supported.  [ruby-core:20480]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:15:16 +00:00
yugui
237ad3e163 mreges r20743 from trunk into ruby_1_9_1.
* vm_eval.c (vm_call_super): uses method_missing().

* vm_eval.c (method_missing): get rid of too large alloca.

* vm_eval.c (rb_call0, method_missing): uses idMethodMissing.

* vm_method.c (rb_add_method, remove_method, rb_undef): uses
  id__send__.

* vm_method.c (Init_eval_method): removed IDs which are defined as
  immediate values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:15:08 +00:00
yugui
2e52bda3c8 merges r20593 from trunk into ruby_1_9_1.
* compile.c (iseq_compile_each), gc.c (assign_heap_slot),
  (gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add),
  proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all),
  (thread_start_func_2, blocking_region_begin, blocking_region_end),
  (rb_thread_kill), thread_pthread.c (native_thread_create),
  (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c
  (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state),
  (vm_call0): use void pointer for %p.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 01:01:02 +00:00
akr
4efc3f78b0 * vm_eval.c (Init_vm_eval): define module_eval, class_eval and eval
here for rdoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25 18:04:34 +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
nobu
bcf9324e68 * vm_eval.c (vm_call_super): fixed typo, and get rid of too large
alloca.  [ruby-core:17922]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04 08:37:48 +00:00
mame
5874de95e8 * Add coverage measurement constant COVERAGE__. This constant is not
for casual use.  Usage: (1) assign {} to COVERAGE__, (2) require or
  load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will
  return an array whose elements represent number of executions per
  line of source code.

* vm_core.h: add field of coverage array to iseq.

* iseq.c (prepare_iseq_build): ditto.

* insns.def (trace): update coverage array.

* parse.y (coverage): create and initialize coverage array.

* compile.h (ADD_TRACE): add trace instruction to update covearge
  array.

* thread.c (clear_coverage): delete coverage array when forking.
  Otherwise, double count of coverage may occur.

* lib/coverage.rb: sample coverage measurement tool.

* error.c: distinguish explicitly between parse_in_eval and
  mild_compile_error.

* load.c: ditto.

* vm_eval.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 16:55:30 +00:00
ko1
d4cddaaa4c * vm_eval.c (vm_call_super): fix to call method_missing.
[ruby-core:15719], [ruby-core:17340]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-26 21:52:44 +00:00
mame
f32f40cc49 * vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if
exception raised.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-24 13:16:44 +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
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
nobu
74ae098a5d * vm_eval.c: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-25 01:12:12 +00:00
ko1
ed68367f9e * vm_eval.c: added. Some codes are moved from "eval.c"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24 18:25:26 +00:00