@@ -77,7 +77,7 @@ public object Core {
7777 }
7878
7979 @JvmStatic
80- public fun arguments_new_const (pieces : Array <String >): String {
80+ public fun arguments_new_const_1 (pieces : Array <String >): String {
8181 // Concatenate all the string pieces together.
8282 // This mimics the simplest formatting scenario where pieces are just joined.
8383 // If the array is empty, it correctly returns an empty string.
@@ -219,10 +219,82 @@ public object Core {
219219 return false
220220 }
221221
222+
223+ // variants of eq that just call the main one. need A LOT of these since we are now properly resolving generics
224+ // will no longer be needed once we compile the real `core` library which will generate all of these - support is almost there
225+ // placeholders just for now
226+
227+ @JvmStatic
228+ public fun str_eq (value1 : String? , value2 : String? ): Boolean {
229+ return eq(value1, value2)
230+ }
231+
232+ @JvmStatic
233+ public fun f16_eq (value1 : Any? , value2 : Any? ): Boolean {
234+ return eq(value1, value2)
235+ }
236+
237+ @JvmStatic
238+ public fun f32_eq (value1 : Any? , value2 : Any? ): Boolean {
239+ return eq(value1, value2)
240+ }
241+
242+ @JvmStatic
243+ // (f32, f32) tuple
244+ public fun f32_f32_eq (value1 : Any? , value2 : Any? ): Boolean {
245+ return eq(value1, value2)
246+ }
247+
248+ @JvmStatic
249+ public fun f64_eq (value1 : Any? , value2 : Any? ): Boolean {
250+ return eq(value1, value2)
251+ }
252+
253+ @JvmStatic
254+ public fun f128_eq (value1 : Any? , value2 : Any? ): Boolean {
255+ return eq(value1, value2)
256+ }
257+
258+ @JvmStatic
259+ public fun i64_eq (value1 : Any? , value2 : Any? ): Boolean {
260+ return eq(value1, value2)
261+ }
262+
263+ @JvmStatic
264+ // tuple (i32, i32, i32)
265+ public fun i32_i32_i32_eq (value1 : Any? , value2 : Any? ): Boolean {
266+ return eq(value1, value2)
267+ }
268+
222269 @JvmStatic
223- public fun core_panic (message : String? ) {
224- // This is a placeholder for the panic function.
225- // In a real implementation, this would handle the panic appropriately.
270+ // tuple (i32, u8, bool)
271+ public fun i32_u8_bool_eq (value1 : Any? , value2 : Any? ): Boolean {
272+ return eq(value1, value2)
273+ }
274+
275+ @JvmStatic
276+ // [u8; 8]
277+ public fun u8_8_eq (value1 : Any? , value2 : Any? ): Boolean {
278+ return eq(value1, value2)
279+ }
280+
281+ @JvmStatic
282+ public fun raw_eq_u8_8 (slice1 : Any? , slice2 : Any? ): Boolean {
283+ return eq(slice1, slice2)
284+ }
285+
286+ @JvmStatic
287+ public fun u8_eq (value1 : Any? , value2 : Any? ): Boolean {
288+ return eq(value1, value2)
289+ }
290+
291+ @JvmStatic
292+ public fun option_usize_eq (value1 : Any? , value2 : Any? ): Boolean {
293+ return eq(value1, value2)
294+ }
295+
296+ @JvmStatic
297+ public fun core_panicking_panic (message : String? ) {
226298 throw RuntimeException (" Rust panic: " + (message ? : " <no message>" ))
227299 }
228300
@@ -240,7 +312,7 @@ public object Core {
240312 }
241313
242314@JvmStatic
243- fun core_starts_with (value : Any , prefix : Any ): Boolean {
315+ fun core_str_str_starts_with_char (value : Any , prefix : Any ): Boolean {
244316 // Runtime type check needed here!
245317 return when {
246318 value is String && prefix is String -> { // Both are strings
@@ -270,6 +342,12 @@ fun core_starts_with(value: Any, prefix: Any): Boolean {
270342 }
271343 }
272344}
345+
346+ // wrapper that just calls the above
347+ @JvmStatic
348+ public fun core_slice_u8_starts_with (value : Any , prefix : Any ): Boolean {
349+ return core_str_str_starts_with_char(value, prefix)
350+ }
273351 @JvmStatic
274352 public fun option_unwrap (optionObj : Any? ): Any? {
275353 if (optionObj == null ) {
@@ -332,7 +410,13 @@ fun core_starts_with(value: Any, prefix: Any): Boolean {
332410 }
333411 }
334412
335- /* *
413+ // redirectors for monomorphised versions of the above, to just call the above
414+ @JvmStatic
415+ public fun option_usize_is_none (optionObj : Any? ): Boolean {
416+ return option_is_none(optionObj)
417+ }
418+
419+ /* *
336420 * Shim for `<[T] as SlicePartialEq<T>>::equal`.
337421 * Handles comparison of primitive arrays based on OOMIR types.
338422 * Primarily expects ByteArray (for u8) or ShortArray (due to I16 OOMIR type from String casts).
@@ -362,6 +446,14 @@ fun core_starts_with(value: Any, prefix: Any): Boolean {
362446 }
363447 }
364448
449+ // monomorphised versions of the above
450+ @JvmStatic
451+ // a slice of u8
452+ public fun u8_equal (slice1 : Any? , slice2 : Any? ): Boolean {
453+ return equal(slice1, slice2)
454+ }
455+
456+
365457 /* *
366458 * Convert a Java String into a ShortArray, by casting each char to a short.
367459 */
0 commit comments