@@ -398,6 +398,7 @@ impl ValueData {
398398 ///
399399 /// A copy of the Property is returned.
400400 pub fn get_property ( & self , field : & str ) -> Option < Property > {
401+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value::get_property" , "value" ) ;
401402 // Spidermonkey has its own GetLengthProperty: https://searchfox.org/mozilla-central/source/js/src/vm/Interpreter-inl.h#154
402403 // This is only for primitive strings, String() objects have their lengths calculated in string.rs
403404 if self . is_string ( ) && field == "length" {
@@ -444,6 +445,7 @@ impl ValueData {
444445 writable : Option < bool > ,
445446 configurable : Option < bool > ,
446447 ) {
448+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value::update_property" , "value" ) ;
447449 let obj: Option < Object > = match self {
448450 Self :: Object ( ref obj) => Some ( obj. borrow_mut ( ) . deref_mut ( ) . clone ( ) ) ,
449451 _ => None ,
@@ -464,6 +466,7 @@ impl ValueData {
464466 ///
465467 /// Returns a copy of the Property.
466468 pub fn get_internal_slot ( & self , field : & str ) -> Value {
469+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value::get_internal_slot" , "value" ) ;
467470 let obj: Object = match * self {
468471 Self :: Object ( ref obj) => {
469472 let hash = obj. clone ( ) ;
@@ -489,7 +492,7 @@ impl ValueData {
489492 where
490493 F : Into < Value > ,
491494 {
492- let _timer = BoaProfiler :: global ( ) . start_event ( "get_field" , "value" ) ;
495+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value:: get_field" , "value" ) ;
493496 match * field. into ( ) {
494497 // Our field will either be a String or a Symbol
495498 Self :: String ( ref s) => {
@@ -588,7 +591,7 @@ impl ValueData {
588591
589592 /// Check to see if the Value has the field, mainly used by environment records
590593 pub fn has_field ( & self , field : & str ) -> bool {
591- let _timer = BoaProfiler :: global ( ) . start_event ( "has_field" , "value" ) ;
594+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value:: has_field" , "value" ) ;
592595 self . get_property ( field) . is_some ( )
593596 }
594597
@@ -599,7 +602,7 @@ impl ValueData {
599602 F : Into < Value > ,
600603 V : Into < Value > ,
601604 {
602- let _timer = BoaProfiler :: global ( ) . start_event ( "set_field" , "value" ) ;
605+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value:: set_field" , "value" ) ;
603606 let field = field. into ( ) ;
604607 let val = val. into ( ) ;
605608
@@ -629,7 +632,7 @@ impl ValueData {
629632
630633 /// Set the private field in the value
631634 pub fn set_internal_slot ( & self , field : & str , val : Value ) -> Value {
632- let _timer = BoaProfiler :: global ( ) . start_event ( "set_internal_slot" , "exec" ) ;
635+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value:: set_internal_slot" , "exec" ) ;
633636 if let Self :: Object ( ref obj) = * self {
634637 obj. borrow_mut ( )
635638 . internal_slots
@@ -769,6 +772,7 @@ impl ValueData {
769772 ///
770773 /// https://tc39.es/ecma262/#sec-typeof-operator
771774 pub fn get_type ( & self ) -> & ' static str {
775+ let _timer = BoaProfiler :: global ( ) . start_event ( "Value::get_type" , "value" ) ;
772776 match * self {
773777 Self :: Rational ( _) | Self :: Integer ( _) => "number" ,
774778 Self :: String ( _) => "string" ,
0 commit comments