[Webkit-unassigned] [Bug 79608] Getting the instruction stream for a code block should not require two loads

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 26 14:22:35 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=79608





--- Comment #5 from Filip Pizlo <fpizlo at apple.com>  2012-02-26 14:22:35 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 128927 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=128927&action=review
> > 
> > > Source/JavaScriptCore/wtf/CompactVector.h:40
> > > +// ** This could be modified to support non-POD values quite easily. It just
> > > +//    hasn't been, so far, because there has been no need.
> > 
> > Seems like it would be worth adding COMPILE_ASSERTs to prevent usage of non-POD
> 
> Yeah, I'll do that.

Scratch that.  JSC::Instruction is not POD.  I mean, it is for our purposes, but Clang disagrees.

I'd rather not spend too much time thinking about what assertions to add to this class given that we'll rapidly end up in weirdo C++ type land.  What matters is that the class does exactly what it is supposed to do for byte code sequences.

> 
> > 
> > > Source/JavaScriptCore/wtf/CompactVector.h:71
> > > +        for (unsigned i = other.size(); i--;)
> > > +            m_data[i] = other[i];
> > 
> > Why not just use memcpy here? Also I'm not 100% comfortable with the implicit vector copy -- at the very least can we make these contractors explicit?
> 
> You're right, this should be an explicit contractor.
> 
> (Contractor is the new constructor.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list