Opened 12 months ago

Last modified 8 weeks ago

#145 new change

[meta] Implement typed objects

Reported by: trev Assignee: trev
Priority: P2 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
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

Ticket Status Resolution Summary Owner
#147 closed fixed [Typed objects] Implement object types trev
#148 closed rejected [Typed objects] Implement fixed-size array types
#149 new [Typed objects] Implement dictionary types trev
#150 closed fixed [Typed objects] Implement string type trev
#151 closed fixed [Typed objects] Implement dynamically-sized array types trev
#258 closed fixed [Typed objects] Implement a garbage collection mechanism trev
#259 new [Typed objects] Implement forward declarations for types
#260 closed fixed [Typed objects] Implement type inheritance trev
#393 new [Typed objects] Implement weak references
#505 closed fixed [Typed objects] Implement array helper methods trev
#506 new [Typed objects] Guard against integer overflow issues
#507 new [Typed objects] Implement a light-weight array.slice() method
#510 closed fixed [Typed objects] Don't hardcode script load order in unit tests trev
#517 closed fixed [Typed objects] Make unit tests compatible with Chrome and Safari trev
#1772 closed fixed [JSHydra] Convert const to var for Chrome trev
#1773 closed fixed [Typed objects] "assignment to undeclared variable bufferOffset" in unit tests trev


Change History (27)

comment:1 Changed 12 months ago by trev

  • Summary changed from [meta] to [meta] Implement typed objects

comment:2 Changed 12 months ago by trev

  • Owner set to trev
  • Status changed from new to assigned

comment:3 Changed 12 months ago by trev

  • Blocked By 147 added

comment:4 Changed 12 months ago by trev

  • Blocked By 148 added

comment:5 Changed 12 months ago by trev

  • Blocked By 149 added

comment:6 Changed 12 months ago by trev

  • Blocked By 150 added

comment:7 Changed 12 months ago by trev

  • Blocked By 151 added

comment:8 Changed 12 months ago by trev

  • Description modified (diff)

comment:9 Changed 12 months ago by trev

  • Description modified (diff)

comment:10 Changed 12 months ago by trev

  • Description modified (diff)

comment:11 Changed 11 months ago by trev

  • Blocked By 258 added

comment:12 Changed 11 months ago by trev

  • Blocked By 259 added

comment:13 Changed 11 months ago by trev

  • Blocked By 260 added

comment:14 Changed 10 months ago by trev

  • Blocked By 393 added

comment:15 Changed 10 months ago by philll

  • Status changed from assigned to new

The assigned state will be dropped by #403

comment:16 Changed 10 months ago by trev

  • Blocked By 505 added

comment:17 Changed 10 months ago by trev

  • Blocked By 506 added

comment:18 Changed 10 months ago by trev

  • Blocked By 507 added

comment:19 Changed 10 months ago by trev

  • Blocked By 510 added

comment:20 Changed 10 months ago by trev

  • Blocked By 517 added

comment:21 Changed 10 months ago by trev

  • Blocking 534 added

comment:22 Changed 5 months ago by fhd

  • Keywords 2014q4 added
  • Platform set to Unknown
  • Ready unset

comment:23 Changed 3 months ago by sven

  • Keywords changed from meta, 2014q4 to 2014q4, meta

comment:24 Changed 3 months ago by sven

  • Keywords 2014q4 removed

comment:25 Changed 3 months ago by fhd

  • Keywords 2014q4 added

comment:26 Changed 8 weeks ago by trev

  • Blocked By 1772 added

comment:27 Changed 8 weeks ago by trev

  • Blocked By 1773 added
Note: See TracTickets for help on using tickets.