Opened on 03/13/2014 at 03:08:11 PM
Closed on 02/04/2016 at 10:57:07 AM
#145 closed change (rejected)
[meta] Implement typed objects
Reported by: | trev | Assignee: | trev |
---|---|---|---|
Priority: | P5 | Milestone: | |
Module: | Core | Keywords: | 2014q4, meta |
Cc: | Blocked By: | #147, #148, #149, #150, #151, #258, #259, #260, #393, #505, #506, #507, #510, #517, #1772, #1773 | |
Blocking: | #534 | Platform: | Unknown |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by trev)
Background
One way to improve performance and memory efficiency would be typed objects. Now this proposal isn't implemented in any browsers yet, also the proposal doesn't match our needs exactly. So we should create our own implementation, a subset of the proposal with a few deviations:
- Implement ClassType rather than StructType. Properties with functions as their values should turn into methods. An additional parameter should specify metadata, e.g. constructor and destructor functions.
- Classes should inherit from each other, with the TypedObject class being the common ancestor. For any property requiring a class as value it should be possible to use its subclass.
- Instantiation using type.new() instead of callable types - the latter would require messing with the deprecated __proto__ property which shouldn't be worth it.
- No automatic garbage collection (cannot be implemented), instead all objects should have a .free() method to trigger manual destruction.
- A string type needs to be implemented as an array of uint16 characters.
- Dictionary types need to be implemented in addition to array types: string keys, a fixed type as value.
What to change
Attachments (0)
Change History (31)
comment:1 Changed on 03/13/2014 at 03:08:35 PM by trev
- Summary changed from [meta] to [meta] Implement typed objects
comment:2 Changed on 03/13/2014 at 03:10:08 PM by trev
- Owner set to trev
- Status changed from new to assigned
comment:3 Changed on 03/13/2014 at 05:01:00 PM by trev
- Blocked By 147 added
comment:4 Changed on 03/13/2014 at 05:02:52 PM by trev
- Blocked By 148 added
comment:5 Changed on 03/13/2014 at 05:04:26 PM by trev
- Blocked By 149 added
comment:6 Changed on 03/13/2014 at 05:06:16 PM by trev
- Blocked By 150 added
comment:7 Changed on 03/14/2014 at 09:40:35 AM by trev
- Blocked By 151 added
comment:10 Changed on 03/14/2014 at 10:53:07 AM by trev
- Description modified (diff)
comment:11 Changed on 04/04/2014 at 10:01:42 AM by trev
- Blocked By 258 added
comment:12 Changed on 04/04/2014 at 10:11:00 AM by trev
- Blocked By 259 added
comment:13 Changed on 04/04/2014 at 10:41:21 AM by trev
- Blocked By 260 added
comment:14 Changed on 04/28/2014 at 07:12:52 AM by trev
- Blocked By 393 added
comment:15 Changed on 04/30/2014 at 09:50:33 AM by philll
- Status changed from assigned to new
comment:16 Changed on 05/16/2014 at 12:50:01 PM by trev
- Blocked By 505 added
comment:17 Changed on 05/16/2014 at 12:55:42 PM by trev
- Blocked By 506 added
comment:18 Changed on 05/16/2014 at 06:14:17 PM by trev
- Blocked By 507 added
comment:19 Changed on 05/17/2014 at 09:30:45 PM by trev
- Blocked By 510 added
comment:20 Changed on 05/19/2014 at 07:42:40 AM by trev
- Blocked By 517 added
comment:21 Changed on 05/21/2014 at 07:14:29 PM by trev
- Blocking 534 added
comment:22 Changed on 10/06/2014 at 11:46:34 AM by fhd
- Keywords 2014q4 added
- Platform set to Unknown
- Ready unset
comment:23 Changed on 11/21/2014 at 01:03:49 PM by sven
- Keywords changed from meta, 2014q4 to 2014q4, meta
comment:24 Changed on 11/24/2014 at 12:07:00 PM by sven
- Keywords 2014q4 removed
comment:25 Changed on 11/26/2014 at 03:07:28 PM by fhd
- Keywords 2014q4 added
comment:26 Changed on 01/10/2015 at 12:00:19 AM by trev
- Blocked By 1772 added
comment:27 Changed on 01/10/2015 at 12:18:31 AM by trev
- Blocked By 1773 added
comment:28 Changed on 05/27/2015 at 02:27:07 PM by kzar
- Blocked By 2593 added
comment:29 Changed on 02/04/2016 at 07:54:21 AM by fhd
- Priority changed from P2 to P5
- Tester set to Unknown
Since the Emscripten based approach is looking rather good, I'm not sure we really want to continue to work on Typed Objects. Makes it a P5.
comment:30 Changed on 02/04/2016 at 10:49:35 AM by trev
- Blocked By 2593 removed
comment:31 Changed on 02/04/2016 at 10:57:07 AM by trev
- Resolution set to rejected
- Status changed from new to closed
In fact, at that point I am certain that we are dropping typed objects and go with Emscripten instead. The performance issues we had with Emscripten initially are bound to affect us with typed objects as well (important points: static generation of JS bindings, stack-based allocations, likely more). Fixing these issues was already non-trivial with Emscripten, but with our own toolchain it will require far more effort - this isn't going to pay off if we have a reasonable and maintained alternative.
The assigned state will be dropped by #403