@@ -1004,11 +1004,11 @@ def rb_jump_tag(pos)
1004
1004
end
1005
1005
1006
1006
def rb_yield ( value )
1007
- Primitive . call_with_c_mutex ( rb_block_proc , [ value ] )
1007
+ Primitive . interop_execute ( rb_block_proc , [ value ] )
1008
1008
end
1009
1009
1010
1010
def rb_yield_splat ( values )
1011
- Primitive . call_with_c_mutex ( rb_block_proc , values )
1011
+ Primitive . interop_execute ( rb_block_proc , values )
1012
1012
end
1013
1013
1014
1014
def rb_ivar_lookup ( object , name , default_value )
@@ -1161,7 +1161,9 @@ def rb_enumeratorize(obj, meth, args)
1161
1161
1162
1162
def rb_enumeratorize_with_size ( obj , meth , args , size_fn )
1163
1163
return rb_enumeratorize ( obj , meth , args ) if size_fn . nil?
1164
- enum = obj . to_enum ( meth , *args ) { Primitive . cext_unwrap ( Primitive . call_with_c_mutex ( size_fn , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( args ) , Primitive . cext_wrap ( enum ) ] ) ) }
1164
+ enum = obj . to_enum ( meth , *args ) do
1165
+ Primitive . cext_unwrap ( Primitive . call_with_c_mutex ( size_fn , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( args ) , Primitive . cext_wrap ( enum ) ] ) )
1166
+ end
1165
1167
enum
1166
1168
end
1167
1169
@@ -1305,7 +1307,7 @@ def rb_mutex_sleep(mutex, timeout)
1305
1307
1306
1308
def rb_mutex_synchronize ( mutex , func , arg )
1307
1309
mutex . synchronize do
1308
- Primitive . cext_unwrap ( Primitive . call_with_c_mutex ( func , [ Primitive . cext_wrap ( arg ) ] ) )
1310
+ Primitive . cext_unwrap ( Primitive . interop_execute ( func , [ Primitive . cext_wrap ( arg ) ] ) )
1309
1311
end
1310
1312
end
1311
1313
@@ -1461,41 +1463,41 @@ def rb_module_new
1461
1463
1462
1464
def rb_ensure ( b_proc , data1 , e_proc , data2 )
1463
1465
begin
1464
- Primitive . call_with_c_mutex ( b_proc , [ data1 ] )
1466
+ Primitive . interop_execute ( b_proc , [ data1 ] )
1465
1467
ensure
1466
- Primitive . call_with_c_mutex ( e_proc , [ data2 ] )
1468
+ Primitive . interop_execute ( e_proc , [ data2 ] )
1467
1469
end
1468
1470
end
1469
1471
1470
1472
def rb_rescue ( b_proc , data1 , r_proc , data2 )
1471
1473
begin
1472
- Primitive . call_with_c_mutex ( b_proc , [ data1 ] )
1474
+ Primitive . interop_execute ( b_proc , [ data1 ] )
1473
1475
rescue StandardError => e
1474
1476
if Truffle ::Interop . null? ( r_proc )
1475
1477
Primitive . cext_wrap ( nil )
1476
1478
else
1477
- Primitive . call_with_c_mutex ( r_proc , [ data2 , Primitive . cext_wrap ( e ) ] )
1479
+ Primitive . interop_execute ( r_proc , [ data2 , Primitive . cext_wrap ( e ) ] )
1478
1480
end
1479
1481
end
1480
1482
end
1481
1483
1482
1484
def rb_rescue2 ( b_proc , data1 , r_proc , data2 , rescued )
1483
1485
begin
1484
- Primitive . call_with_c_mutex ( b_proc , [ data1 ] )
1486
+ Primitive . interop_execute ( b_proc , [ data1 ] )
1485
1487
rescue *rescued => e
1486
- Primitive . call_with_c_mutex ( r_proc , [ data2 , Primitive . cext_wrap ( e ) ] )
1488
+ Primitive . interop_execute ( r_proc , [ data2 , Primitive . cext_wrap ( e ) ] )
1487
1489
end
1488
1490
end
1489
1491
1490
1492
def rb_exec_recursive ( func , obj , arg )
1491
1493
result = nil
1492
1494
1493
1495
recursive = Truffle ::ThreadOperations . detect_recursion ( obj ) do
1494
- result = Primitive . cext_unwrap ( Primitive . call_with_c_mutex ( func , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( arg ) , 0 ] ) )
1496
+ result = Primitive . cext_unwrap ( Primitive . interop_execute ( func , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( arg ) , 0 ] ) )
1495
1497
end
1496
1498
1497
1499
if recursive
1498
- Primitive . cext_unwrap ( Primitive . call_with_c_mutex ( func , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( arg ) , 1 ] ) )
1500
+ Primitive . cext_unwrap ( Primitive . interop_execute ( func , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( arg ) , 1 ] ) )
1499
1501
else
1500
1502
result
1501
1503
end
0 commit comments