Last active
August 29, 2015 14:05
-
-
Save sshao/7eecc87458d3e55d7f5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/vm/llvm/jit_visit.hpp b/vm/llvm/jit_visit.hpp | |
| index ad91132..fdeebb7 100644 | |
| --- a/vm/llvm/jit_visit.hpp | |
| +++ b/vm/llvm/jit_visit.hpp | |
| @@ -2517,7 +2517,6 @@ use_send: | |
| void visit_cast_for_multi_block_arg() { | |
| JITStackArgs* inline_args = incoming_args(); | |
| if(inline_args) { | |
| - if(inline_args->size() == 1) { | |
| std::vector<Type*> types; | |
| types.push_back(ctx_->ptr_type("State")); | |
| types.push_back(CallFrameTy); | |
| @@ -2541,10 +2540,6 @@ use_send: | |
| check_for_exception(ary); | |
| stack_push(ary); | |
| - } else { | |
| - stack_push(constant(cUndef)); // holder | |
| - set_hint(cHintLazyBlockArgs); | |
| - } | |
| } else { | |
| Signature sig(ctx_, ObjType); | |
| sig << StateTy; | |
| sig << CallFrameTy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this repro yields the correct result with and without the jit_visit changes | |
| def m | |
| yield [1, 2, 3] | |
| end | |
| def work | |
| m { |a, b, c| [a, b, c] } | |
| end | |
| i = 0 | |
| while i < 500_000 do | |
| work | |
| i += 1 | |
| end | |
| p work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this repro yielded the wrong result without the jit_visit changes | |
| # but yields the correct result with the changes | |
| def m | |
| yield 1, 2, 3 | |
| end | |
| def work | |
| m { |a, b, c| [a, b, c] } | |
| end | |
| i = 0 | |
| while i < 500_000 do | |
| work | |
| i += 1 | |
| end | |
| p work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment