@@ -26,11 +26,10 @@ use crate::vm::native::{
2626 shared_string_from_buffer_entry_address, sparse_restore_exit_signature,
2727 string_binary_transform_signature, string_contains_entry_address, string_contains_signature,
2828 string_lower_ascii_entry_address, string_replace_literal_entry_address,
29- string_replace_literal_many_entry_address, string_replace_signature,
30- string_split_literal_entry_address, string_unary_transform_signature, to_string_entry_address,
31- type_of_entry_address, value_eq_entry_address, value_eq_signature, value_len_entry_address,
32- value_len_signature, value_slot_signature, write_heap_value_to_slot_entry_address,
33- zero_bytes_entry_address,
29+ string_replace_signature, string_split_literal_entry_address, string_unary_transform_signature,
30+ to_string_entry_address, type_of_entry_address, value_eq_entry_address, value_eq_signature,
31+ value_len_entry_address, value_len_signature, value_slot_signature,
32+ write_heap_value_to_slot_entry_address, zero_bytes_entry_address,
3433} ;
3534use cranelift_codegen:: ir:: condcodes:: { FloatCC , IntCC } ;
3635use cranelift_codegen:: ir:: immediates:: Ieee64 ;
@@ -171,7 +170,6 @@ fn try_compile_ssa_trace(
171170 regex_match : regex_match_entry_address ( ) ,
172171 regex_replace : regex_replace_entry_address ( ) ,
173172 replace_literal : string_replace_literal_entry_address ( ) ,
174- replace_literal_many : string_replace_literal_many_entry_address ( ) ,
175173 lower_ascii : string_lower_ascii_entry_address ( ) ,
176174 type_of : type_of_entry_address ( ) ,
177175 to_string : to_string_entry_address ( ) ,
@@ -501,7 +499,6 @@ struct SsaStringHelperAddrs {
501499 regex_match : usize ,
502500 regex_replace : usize ,
503501 replace_literal : usize ,
504- replace_literal_many : usize ,
505502 lower_ascii : usize ,
506503 type_of : usize ,
507504 to_string : usize ,
@@ -593,7 +590,6 @@ fn ssa_trace_supported(ssa: &SsaTrace) -> bool {
593590 | SsaInstKind :: RegexMatch { .. }
594591 | SsaInstKind :: RegexReplace { .. }
595592 | SsaInstKind :: StringReplaceLiteral { .. }
596- | SsaInstKind :: StringReplaceLiteralMany { .. }
597593 | SsaInstKind :: StringLowerAscii { .. }
598594 | SsaInstKind :: TypeOf { .. }
599595 | SsaInstKind :: ToString { .. }
@@ -877,7 +873,6 @@ fn ssa_inst_requires_owned_value_slot(kind: &SsaInstKind) -> bool {
877873 | SsaInstKind :: StringGet { .. }
878874 | SsaInstKind :: RegexReplace { .. }
879875 | SsaInstKind :: StringReplaceLiteral { .. }
880- | SsaInstKind :: StringReplaceLiteralMany { .. }
881876 | SsaInstKind :: StringLowerAscii { .. }
882877 | SsaInstKind :: TypeOf { .. }
883878 | SsaInstKind :: ToString { .. }
@@ -1831,41 +1826,6 @@ fn lower_ssa_inst(
18311826 ssa_store_heap_ptr_in_value ( b, layout. value , out, layout. value . string_tag , out_raw) ;
18321827 out
18331828 }
1834- SsaInstKind :: StringReplaceLiteralMany {
1835- text,
1836- needles,
1837- replacements,
1838- } => {
1839- let text = values[ text] ;
1840- let needles = values[ needles] ;
1841- let replacements = values[ replacements] ;
1842- let out_raw = ssa_call_string_replace_literal_many (
1843- b,
1844- pointer_type,
1845- string_refs,
1846- string_addrs,
1847- text,
1848- needles,
1849- replacements,
1850- ) ?;
1851- let error = b. ins ( ) . icmp_imm ( IntCC :: Equal , out_raw, 0 ) ;
1852- let failed = b. create_block ( ) ;
1853- let replaced = b. create_block ( ) ;
1854- b. ins ( ) . brif ( error, failed, & [ ] , replaced, & [ ] ) ;
1855- b. switch_to_block ( failed) ;
1856- let status = b. ins ( ) . iconst ( types:: I32 , STATUS_ERROR as i64 ) ;
1857- jump_with_status ( b, exit_block, status) ;
1858- b. switch_to_block ( replaced) ;
1859- let out = owned_value_temp_slot_addr (
1860- b,
1861- pointer_type,
1862- owned_value_temps,
1863- SsaTempValueSlotKey :: Output ( output. id ) ,
1864- ) ?;
1865- clear_owned_value_temp_slot ( b, pointer_type, helper_refs, helper_addrs, out) ?;
1866- ssa_store_heap_ptr_in_value ( b, layout. value , out, layout. value . string_tag , out_raw) ;
1867- out
1868- }
18691829 SsaInstKind :: StringReplaceLiteral {
18701830 text,
18711831 needle,
@@ -4025,24 +3985,6 @@ fn ssa_call_string_replace_literal(
40253985 Ok ( b. inst_results ( call) [ 0 ] )
40263986}
40273987
4028- fn ssa_call_string_replace_literal_many (
4029- b : & mut FunctionBuilder ,
4030- pointer_type : cranelift_codegen:: ir:: Type ,
4031- string_refs : SsaStringHelperRefs ,
4032- string_addrs : SsaStringHelperAddrs ,
4033- text : cranelift_codegen:: ir:: Value ,
4034- needles : cranelift_codegen:: ir:: Value ,
4035- replacements : cranelift_codegen:: ir:: Value ,
4036- ) -> VmResult < cranelift_codegen:: ir:: Value > {
4037- let helper_ptr = iconst_ptr_from_addr ( b, pointer_type, string_addrs. replace_literal_many ) ?;
4038- let call = b. ins ( ) . call_indirect (
4039- string_refs. replace_ref ,
4040- helper_ptr,
4041- & [ text, needles, replacements] ,
4042- ) ;
4043- Ok ( b. inst_results ( call) [ 0 ] )
4044- }
4045-
40463988fn ssa_call_string_lower_ascii (
40473989 b : & mut FunctionBuilder ,
40483990 pointer_type : cranelift_codegen:: ir:: Type ,
0 commit comments