-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should some object-specific operations be moved out of GcObject? #1323
Comments
I agree with the sentiment. It is confusing that you can call some funcions directly from boa/boa/src/object/internal_methods.rs Lines 109 to 117 in a7ebfc8
Gc reference makes refactoring a bit complicated. We have several options to solve this:
|
I don't think we can have this, since the way that objects are used implies they need to live into a well known location. For example if we create a object on the stack and clone it, first of all objects should shallow copy, and the object are not the same, even through they should, objects should only check if the pointer is the same not content. Even with Putting it on the stack would complicate and make some spec functionality impossible, that is why I moved operations to |
Even if we don't implement stack objects, I think the semantics of |
Could you elaborate more on this? |
The current |
We follow the spec more closely now. Most of the JsObject operations are for the Object type. |
At some point (when working on the stack) we will need to operate on objects which are not GC managed. These would be objects that can live on the stack.
We have some functionality (such as
call_construct
) living in GcObject and not in Object, does anyone know why this is?My expectation is that all object functionality lives in Object, then GCObject acts as a GC wrapper (plus only has GC related functionality)
The text was updated successfully, but these errors were encountered: