Opened 6 years ago

Last modified 4 years ago

#145 closed change

[meta] Implement typed objects — at Version 9

Reported by: trev Assignee: trev
Priority: P5 Milestone:
Module: Core Keywords: 2014q4, meta
Cc: Blocked By: #147, #148, #149, #150, #151
Blocking: 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.
  • 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
#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 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 (9)

comment:1 Changed 6 years ago by trev

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

comment:2 Changed 6 years ago by trev

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

comment:3 Changed 6 years ago by trev

  • Blocked By 147 added

comment:4 Changed 6 years ago by trev

  • Blocked By 148 added

comment:5 Changed 6 years ago by trev

  • Blocked By 149 added

comment:6 Changed 6 years ago by trev

  • Blocked By 150 added

comment:7 Changed 6 years ago by trev

  • Blocked By 151 added

comment:8 Changed 6 years ago by trev

  • Description modified (diff)

comment:9 Changed 6 years ago by trev

  • Description modified (diff)
Note: See TracTickets for help on using tickets.