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
dart2js: get rid of 'holders' #9556
Comments
Added Area-Dart2JS label. |
Marked this as blocking #9577. |
Marked this as blocking #9728. |
I'm increasing the priority since this is blocking Note 1. $asIterableBase: function () { return [$.String]; }, becomes $asIterableBase: function () { return [$.JSString]; }, Note 2. I have noticed that sometimes values are put in the class definition, and also on holders / classes in emitRuntimeTypeSupport. It seems to me that we should be able to get rid of emitRuntimeTypeSupport entirely. Anything patched onto a class in emitRuntimeTypeSupport should have been emitted as part of the type. test html/node_test (compiled without --checked) contains the following inconsistent lines. test.js:7319:$$.main___anon2 = {"": "Closure;", Removed Priority-Medium label. |
Added this to the Later milestone. |
Fixed in r22172. Added Fixed label. |
Seems like there are left-over TODOs remaining for this bug. In particular a TODO(9556) in emitter.dart which looks like some code should be changed. Added Triaged label. |
Added TriageForM5 label. |
Have this been fixed already? |
Removed TriageForM5 label. |
Marked this as blocking #11263. |
Removed Priority-High label. |
Assigning to Stephen to update the comments referencing this bug. Set owner to @rakudrama. |
I'm moving this to 'later'. There is little that can be done without at least some reworking of the representations used by type checks. The three places marked with TODO(9556) serve to ensure a native class is defined for marking the constructor as a token representing the type, similar to Duration: P.Duration.$isDuration = true; I would like to see is this information moved away from these assignments to the constructor, preferably to the class definition. However, that will require changes to the representation, since we cannot directly reference P.Duration until after init.finishClasses There is some redundancy between this information and what is visible on an instance, and also this information is redundant with respect to metadata that would be needed for reflection. Duration: {"": "Object;_duration<", The metadata fact that Duration implements Comparable (type parameters for now) could be used to generate the $isComparable properties on both constructor and prototype. Removed this from the M8 milestone. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
@rakudrama The comments containing TODOs refering to this bug seem to be completely out of sync - for example, there is no emitRuntimeTypeSupport anymore. I would like to close this issue and file a new one for the problem mentioned in your last comment (if that still is a problem). |
Types that are not instantiated but are used in type tests have 'holders'.
Instead of holders, the type should be generated. The generated type will be really small since it has no methods.
The interceptors should be used for primitive types.
The text was updated successfully, but these errors were encountered: