@@ -114,7 +114,7 @@ impl PyClassRef {
114
114
115
115
fn getattribute ( self , name_ref : PyStringRef , vm : & VirtualMachine ) -> PyResult {
116
116
let name = & name_ref. value ;
117
- trace ! ( "type.__getattribute__({:?}, {:?})" , self , name) ;
117
+ vm_trace ! ( "type.__getattribute__({:?}, {:?})" , self , name) ;
118
118
let mcl = self . class ( ) ;
119
119
120
120
if let Some ( attr) = class_get_attr ( & mcl, & name) {
@@ -241,7 +241,7 @@ pub fn issubclass(subclass: &PyClassRef, cls: &PyClassRef) -> bool {
241
241
}
242
242
243
243
pub fn type_new ( vm : & VirtualMachine , args : PyFuncArgs ) -> PyResult {
244
- debug ! ( "type.__new__ {:?}" , args) ;
244
+ vm_trace ! ( "type.__new__ {:?}" , args) ;
245
245
if args. args . len ( ) == 2 {
246
246
Ok ( args. args [ 1 ] . class ( ) . into_object ( ) )
247
247
} else if args. args . len ( ) == 4 {
@@ -265,7 +265,7 @@ pub fn type_new_class(
265
265
}
266
266
267
267
pub fn type_call ( class : PyClassRef , args : Args , kwargs : KwArgs , vm : & VirtualMachine ) -> PyResult {
268
- debug ! ( "type_call: {:?}" , class) ;
268
+ vm_trace ! ( "type_call: {:?}" , class) ;
269
269
let new = class_get_attr ( & class, "__new__" ) . expect ( "All types should have a __new__." ) ;
270
270
let new_wrapped = vm. call_get_descriptor ( new, class. into_object ( ) ) ?;
271
271
let obj = vm. invoke ( new_wrapped, ( & args, & kwargs) ) ?;
@@ -353,7 +353,7 @@ fn take_next_base(mut bases: Vec<Vec<PyClassRef>>) -> Option<(PyClassRef, Vec<Ve
353
353
}
354
354
355
355
fn linearise_mro ( mut bases : Vec < Vec < PyClassRef > > ) -> Option < Vec < PyClassRef > > {
356
- debug ! ( "Linearising MRO: {:?}" , bases) ;
356
+ vm_trace ! ( "Linearising MRO: {:?}" , bases) ;
357
357
let mut result = vec ! [ ] ;
358
358
loop {
359
359
if ( & bases) . iter ( ) . all ( Vec :: is_empty) {
0 commit comments