Opened 6 years ago

Last modified 4 years ago

#145 closed change

[meta] — at Initial Version

Reported by: trev Assignee:
Priority: P5 Milestone:
Module: Core Keywords: 2014q4, meta
Cc: Blocked By:
Blocking: Platform: Unknown
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



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.
  • 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 closed rejected [Typed objects] Implement dictionary types trev
#259 closed rejected [Typed objects] Implement forward declarations for types
#260 closed fixed [Typed objects] Implement type inheritance trev
#393 closed rejected [Typed objects] Implement weak references
#505 closed fixed [Typed objects] Implement array helper methods trev
#506 closed rejected [Typed objects] Guard against integer overflow issues
#507 closed rejected [Typed objects] Implement a light-weight array.slice() method kzar
#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 (0)

Note: See TracTickets for help on using tickets.