1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

11 commits

Author SHA1 Message Date
mame
727ceb2a95 Fix a bug of peephole optimization
```
  if   L1
L0:
  jump L2
L1:
  ...
L2:
```

was wrongly optimized to:

```
  unless L2
L0:
L1:
  ...
L2:
```

To make it conservative, this optimization is now disabled when there is
any label between `if` and `jump` instructions.
Fixes [Bug #14897].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06 04:52:33 +00:00
nobu
f7894e422a vm.c: rewrite all catch points
* vm.c (rb_vm_rewrite_ep_in_errinfo): rewrite all catch points in
  errinfo, not only the topmost frame.  based on the patch by
  ktsj (Kazuki Tsujimoto) in [ruby-dev:45656]. [Bug #6460]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-02 19:14:24 +00:00
ktsj
66f9d5fe11 * test/ruby/test_object.rb (test_send_with_block): moved from
bootstraptest/test_flow.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-02 06:25:01 +00:00
ktsj
db9657a8bf * bootstraptest/test_flow.rb: remove an unused parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-23 16:39:11 +00:00
ktsj
dd834c683d * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed
just before calling rb_call0.

* bootstraptest/test_flow.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-23 16:23:13 +00:00
ktsj
a09e7139a3 * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.
[Bug #5234] [ruby-core:39125]
  This code will be removed after changing throw mechanism (see r33064).

* vm.c (rb_vm_rewrite_dfp_in_errinfo): new function.

* vm.c (vm_make_env_each): changed accordingly.

* vm_core.h: ditto.

* bootstraptest/test_flow.rb: add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27 09:59:48 +00:00
ko1
ef039de560 * vm.c (vm_make_env_each): work around to solve Bug #2729.
fixes: Bug #2729
  a patch from Kazuki Tsujimoto <kazuki@callcc.net>
  This problem is caused by changing dfp (dynamic env pointer)
  from saved dfp.  Saved dfp is pointed env in VM stack.  However,
  the dfp can be moved because VM copies env from VM stack to
  the heap.  At this copying, dfp was also changed.  To solve this
  problem, I'll try to change throw mechanism (not save target dfp,
  but save target cfp).
* bootstraptest/test_flow.rb: add a test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24 23:37:56 +00:00
nobu
3a47cf3395 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
nobu
09205cf2c3 * vm.c (vm_exec): reset thread state before starting vm loop.
[ruby-core:28129]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-09 19:06:39 +00:00
ko1
c9e4dc308f * compile.c: fix to add "ensure" codes across "while" clause
before "return" expression.  [ruby-dev:37967]
* bootstraptest/test_flow.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-16 20:54:58 +00:00
ko1
caa535286d * bootstraptest/runner.rb: fix to show file name.
* bootstraptest/test_*.rb: add bootstarp tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27 16:26:31 +00:00