Remove AllocFlags GCObject new operator

RESOLVED FIXED in Q3 11 - Serrano

Status

Tamarin
Garbage Collection (mmGC)
P2
normal
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Tommy Reilly, Assigned: Tommy Reilly)

Tracking

unspecified
Q3 11 - Serrano

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
This flag collides with the GCTraceableObject, ie if you are using this new operator and you change your class from GCTraceableObject/GCObject the same code continues to compile and bad things happen, specifically the compiler with auto cast the args to conform to these two:

GCTraceableObject:
static void *operator new(size_t size, GC *gc, GCExactFlag flag, size_t extra) 
GCObject:
static void *operator new(size_t size, GC *gc, size_t extra, GC::AllocFlags flags)

Luckily the AllocFlags form is new and only used in two places in the player and is being removed so the GCObject form can go.

Ideally the set of new operators exposed by all the GCObject subclasses would be expressed in one place so this can't happen.   I have to go remind myself why we can't just have GCObject be the baseclass for everything, we could use macros to plop the new operator def in or something.
(Assignee)

Comment 1

7 years ago
Created attachment 516912 [details] [diff] [review]
gonzo
Attachment #516912 - Flags: review?(lhansen)

Updated

7 years ago
Attachment #516912 - Attachment is patch: true
Attachment #516912 - Attachment mime type: application/octet-stream → text/plain

Comment 2

7 years ago
Comment on attachment 516912 [details] [diff] [review]
gonzo

Banzai.
Attachment #516912 - Flags: review?(lhansen) → review+

Comment 3

7 years ago
changeset: 6048:6eeb74d0b65e
user:      Tommy Reilly <treilly@adobe.com>
summary:   Bug 637653 - Remove AllocFlags GCObject new operator (r=lhansen)

http://hg.mozilla.org/tamarin-redux/rev/6eeb74d0b65e
(Assignee)

Updated

7 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.