fn create_class_functions( target: SharedObject, properties: HashMap<String, JsBuiltinFunction>) {
    let mut class_obj = target.borrow_mut();
    for (k, v) in properties {
        let f = v.f;
        let argc = v.argc; 
        let func_obj = JsObject::new_builtin(f, argc);
        
        let mut prop = JsProperty::new();
        prop.fill_attr(JS_READONLY_ATTR);
        prop.value = SharedValue::new_object(func_obj);

        class_obj.properties.insert(k, prop);
    }
}
// build class's global functions
build class's global functions
build class ' s global functions
fn create_class_functions( target: SharedObject, properties: HashMap<String, JsBuiltinFunction>) {
    let mut class_obj = target.borrow_mut();
    for (k, v) in properties {
        let f = v.f;
        let argc = v.argc; 
        let func_obj = JsObject::new_builtin(f, argc);
        let mut prop = JsProperty::new();
        prop.fill_attr(JS_READONLY_ATTR);
        prop.value = SharedValue::new_object(func_obj);
        class_obj.properties.insert(k, prop);
    }
}
fn create_class_functions ( target : SharedObject , properties : HashMap < String , JsBuiltinFunction > ) { let mut class_obj = target . borrow_mut ( ) ; for ( k , v ) in properties { let f = v . f ; let argc = v . argc ; let func_obj = JsObject :: new_builtin ( f , argc ) ; let mut prop = JsProperty :: new ( ) ; prop . fill_attr ( JS_READONLY_ATTR ) ; prop . value = SharedValue :: new_object ( func_obj ) ; class_obj . properties . insert ( k , prop ) ; } }
build class's global functions
build class ' s global functions
target
SharedObject
properties
HashMap<String, JsBuiltinFunction>
target
SharedObject
properties
HashMap<String, JsBuiltinFunction>