Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port gen_send_iseq to the new backend IR #381

Merged
merged 3 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ yjit_task:
bootstraptest/test_struct.rb \
bootstraptest/test_syntax.rb \
bootstraptest/test_thread.rb \
bootstraptest/test_yjit_30k_ifelse.rb \
bootstraptest/test_yjit_30k_methods.rb \
bootstraptest/test_yjit_new_backend.rb \
bootstraptest/test_yjit_rust_port.rb

# These are the btests we can't run yet on arm:
#bootstraptest/test_yjit.rb (out of executable memory not handled)
#bootstraptest/test_yjit_30k_ifelse.rb (missing opt_send)
#bootstraptest/test_yjit_30k_methods.rb (missing opt_send)

# full_build_script: make -j
4 changes: 2 additions & 2 deletions .github/workflows/yjit-new-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ jobs:
bootstraptest/test_struct.rb \
bootstraptest/test_syntax.rb \
bootstraptest/test_thread.rb \
bootstraptest/test_yjit_30k_ifelse.rb \
bootstraptest/test_yjit_30k_methods.rb \
bootstraptest/test_yjit_new_backend.rb \
bootstraptest/test_yjit_rust_port.rb

# These are the btests we can't run yet on x86:
#bootstraptest/test_yjit.rb (out of executable memory not handled)
#bootstraptest/test_yjit_30k_ifelse.rb (missing iseq-to-iseq calls)
#bootstraptest/test_yjit_30k_methods.rb (missing iseq-to-iseq calls)

# Check that we can do a full build
#- run: make -j
32 changes: 32 additions & 0 deletions bootstraptest/test_yjit_new_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,28 @@ def foo()
foo()
}

# opt_send_without_block (VM_METHOD_TYPE_ISEQ)
assert_equal '1', %q{
def foo = 1
def bar = foo
bar
}
assert_equal '[1, 2, 3]', %q{
def foo(a, b) = [1, a, b]
def bar = foo(2, 3)
bar
}
assert_equal '[1, 2, 3, 4, 5, 6]', %q{
def foo(a, b, c:, d:, e: 0, f: 6) = [a, b, c, d, e, f]
def bar = foo(1, 2, c: 3, d: 4, e: 5)
bar
}
assert_equal '[1, 2, 3, 4]', %q{
def foo(a, b = 2) = [a, b]
def bar = foo(1) + foo(3, 4)
bar
}

# opt_send_without_block (VM_METHOD_TYPE_CFUNC)
assert_equal 'nil', %q{
def foo
Expand Down Expand Up @@ -428,6 +450,16 @@ def foo()
assert_equal '["1", "2"]', %q{def foo = [1, 2].map(&:to_s); foo}
assert_equal '["1", "2"]', %q{def foo = [1, 2].map { |i| i.to_s }; foo}
assert_equal '["bar"]', %q{def foo = ["foo/bar"].map(&File.method(:basename)); foo}
assert_equal '1', %q{
def foo(a) = a
def bar = foo(1) { 2 }
bar
}
assert_equal '[1, 2]', %q{
def foo(a, &block) = [a, block.call]
def bar = foo(1) { 2 }
bar
}

# getglobal
assert_equal '333', %q{
Expand Down
Loading