Have TI track a TypeRepresentation for each type descriptor

RESOLVED FIXED in mozilla28

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: nmatsakis, Assigned: nmatsakis)

Tracking

(Blocks: 2 bugs)

unspecified
mozilla28
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
As of bug 898347, we associate a TypeRepresentation with typed object instances, but there is nothing in particular associated with *type descriptors*. Particularly when optimizing new object construction (bug 933277) we need the ability to figure out what type a type descriptor represents.

There are two options:

1. Give each type descriptor a singleton type.

2. Associate a type object with each type representation (canonical form of a type descriptor) and then use that type object for the type descriptor.

The latter seems more efficient (fewer type objects overall) so that's the path I've taken thus far.
(Assignee)

Updated

5 years ago
Blocks: 578700, 933277
(Assignee)

Updated

5 years ago
Depends on: 898347
(Assignee)

Comment 1

5 years ago
Created attachment 825987 [details] [diff] [review]
Bug933760.diff
Attachment #825987 - Flags: review?(bhackett1024)
Comment on attachment 825987 [details] [diff] [review]
Bug933760.diff

Review of attachment 825987 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry for the delay.

::: js/src/builtin/TypeRepresentation.h
@@ +22,5 @@
> +  this object is never exposed to user code (it is used by self-hosted
> +  code). Type representations are interned into a hashset in the
> +  compartment (typeReprs), meaning that you can compare two type
> +  representations for equality just using `==`. If they are equal,
> +  it means that they represent the same binary layout.

Preexisting, but can you change the format of this comment to match other block comments in js?
Attachment #825987 - Flags: review?(bhackett1024) → review+
(Assignee)

Comment 3

5 years ago
Created attachment 8341820 [details] [diff] [review]
Bug933760.diff

Carrying over r+ from bhackett
Attachment #825987 - Attachment is obsolete: true
Attachment #8341820 - Flags: review+
(Assignee)

Updated

5 years ago
Assignee: nobody → nmatsakis
https://hg.mozilla.org/mozilla-central/rev/c996211971a8
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.