1,给quickjs增加一个JS_CloneValue的api。这是为了模仿v8里面用到很多的v8::Object::Clone
一开始,我是直接用JS_CopyDataProperties,但发现这个不会拷贝我设置了各种setter、getter之类的。所以我就再加一个JS_CloneDataProperties,通过遍历JSObject::shape来实现。
2,给quickjs增加index callback。这是对应v8里的IndexedPropertyHandlerConfiguration操作。
在blink里, document.getElementsByTagName("script")[0]
这样的操作会访问V8HTMLAllCollection::indexedPropertyGetterCallback。这时候就需要index callback了。
3,namedPropertyGetter、v8::ObjectTemplate::SetCallAsFunctionHandler这些需要进一步实现。