[前][次][番号順一覧][スレッド一覧]

ruby-changes:73198

From: Noah <ko1@a...>
Date: Tue, 30 Aug 2022 01:00:24 +0900 (JST)
Subject: [ruby-changes:73198] cbf7a7cd23 (master): Fix dupn (https://github.com/Shopify/ruby/pull/330)

https://git.ruby-lang.org/ruby.git/commit/?id=cbf7a7cd23

From cbf7a7cd23e03c47274ed2755ef5ba1ca099bd50 Mon Sep 17 00:00:00 2001
From: Noah Gibbs <the.codefolio.guy@g...>
Date: Wed, 20 Jul 2022 15:54:39 +0100
Subject: Fix dupn (https://github.com/Shopify/ruby/pull/330)

* get_dupn was allocating and throwing away an Assembler object instead of using the one passed in

* Uncomment remaining tests in codegen.rs, which seem to work now
---
 yjit/src/backend/ir.rs | 1 -
 yjit/src/codegen.rs    | 6 ------
 2 files changed, 7 deletions(-)

diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs
index 13a5c5c3d3..8d58da88f2 100644
--- a/yjit/src/backend/ir.rs
+++ b/yjit/src/backend/ir.rs
@@ -7,7 +7,6 @@ use std::convert::From; https://github.com/ruby/ruby/blob/trunk/yjit/src/backend/ir.rs#L7
 use crate::cruby::{VALUE};
 use crate::virtualmem::{CodePtr};
 use crate::asm::{CodeBlock, uimm_num_bits, imm_num_bits};
-use crate::asm::x86_64::{X86Opnd, X86Imm, X86UImm, X86Reg, X86Mem, RegType};
 use crate::core::{Context, Type, TempMapping};
 use crate::codegen::{JITState};
 
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index d8f663fa05..d2f483c79d 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -943,8 +943,6 @@ fn gen_dupn( https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L943
     _ocb: &mut OutlinedCb,
 ) -> CodegenStatus {
 
-    let mut asm = Assembler::new();
-
     let nval: VALUE = jit_get_arg(jit, 0);
     let VALUE(n) = nval;
 
@@ -6401,7 +6399,6 @@ mod tests { https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L6399
         assert!(ocb.unwrap().get_write_pos() > 0);
     }
 
-    /*
     #[test]
     fn test_gen_exit() {
         let (_, ctx, mut asm, mut cb, _) = setup_codegen();
@@ -6416,7 +6413,6 @@ mod tests { https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L6413
          get_side_exit(&mut jit, &mut ocb, &ctx);
         assert!(ocb.unwrap().get_write_pos() > 0);
     }
-    */
 
     #[test]
     fn test_gen_check_ints() {
@@ -6462,7 +6458,6 @@ mod tests { https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L6458
         assert!(cb.get_write_pos() > 0); // Write some movs
     }
 
-    /*
     #[test]
     fn test_gen_dupn() {
         let (mut jit, mut context, mut asm, mut cb, mut ocb) = setup_codegen();
@@ -6486,7 +6481,6 @@ mod tests { https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L6481
         asm.compile(&mut cb);
         assert!(cb.get_write_pos() > 0); // Write some movs
     }
-    */
 
     #[test]
     fn test_gen_swap() {
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]