Skip to content

Instantly share code, notes, and snippets.

@sshao
sshao / _mri_1.8_results
Last active August 29, 2015 14:09
lsof vs ruby's IO#closed?
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin13.4.0]
# then we execute "ruby close_and_redirect.rb", and lsof at select points
# (see the two ruby scripts in this gist) during execution:
$ lsof -p 10623
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ruby 10623 Sophia 0u CHR 16,3 0t1427 663 /dev/ttys003
ruby 10623 Sophia 1u CHR 16,3 0t1427 663 /dev/ttys003
diff --git a/vm/llvm/jit_builder.cpp b/vm/llvm/jit_builder.cpp
index c479aab..6e6c90f 100644
--- a/vm/llvm/jit_builder.cpp
+++ b/vm/llvm/jit_builder.cpp
@@ -646,8 +646,14 @@ namespace jit {
cint((sizeof(CallFrame) / sizeof(Object*)) + machine_code_->stack_size),
"cfstk");
+ size_t upper = machine_code_->number_of_locals;
+
def method_yield(arg)
yield(6, 7)
end
50_000.times do
shadow = 2
method_yield([]) { |shadow, k| }
end
/* call-seq:
* stylesheet.apply(document, {params}) -> XML::Document
*
* Apply this stylesheet transformation to the provided document.
* This method may be invoked multiple times.
*
* Params:
* * document - An instance of an XML::Document
* * params - An optional hash table that specifies the values for xsl:param values embedded in the stylesheet.
*
@sshao
sshao / _system
Last active August 29, 2015 14:06
looks like same issue as https://github.com/rubinius/rubinius/issues/2920
trying to build rbx-1.3.3 (but same issue occurs when trying to build rbx master)
using chruby as switcher, ruby-2.1.2 installed via ruby-install
OSX 10.9.4, same issue with both gcc and clang
@sshao
sshao / _system
Last active August 29, 2015 14:06
ruby -v
rubinius 1.3.3.n245 (1.8.7 2bcef791 2014-09-02) [x86_64-linux-gnu]
uname -a
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
cat /etc/debian_version
7.4
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;