summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2025-06-18 00:57:01 +0900
committerAlan Wu <[email protected]>2025-06-19 23:29:37 +0900
commit34eaa6418e5c5b8639add323dbfd531b32a7d4a3 ()
treedd32e72ba87fc45555032023182d0229efbf9181
parent82dfd44f937616ff31971f2d1e12a35bd022612c (diff)
ZJIT: Add `dupn` support
Notes: Merged: https://.com/ruby/ruby/pull/13641
-rw-r--r--test/ruby/test_zjit.rb10
-rw-r--r--zjit/src/hir.rs30
2 files changed, 40 insertions, 0 deletions
@@ -714,6 +714,16 @@ class TestZJIT < Test::Unit::TestCase
end
end
def test_send_backtrace
backtrace = [
"-e:2:in 'Object#jit_frame1'",
@@ -2405,6 +2405,14 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
}
YARVINSN_pop => { state.stack_pop()?; }
YARVINSN_dup => { state.stack_push(state.stack_top()?); }
YARVINSN_swap => {
let right = state.stack_pop()?;
let left = state.stack_pop()?;
@@ -4314,6 +4322,28 @@ mod tests {
Return v8
"#]]);
}
}
#[cfg(test)]