[webkit-reviews] review granted: [Bug 224713] [JSC] Make more DFG/FTL data FixedVector/Vector : [Attachment 426322] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 17 21:50:15 PDT 2021


Darin Adler <darin at apple.com> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 224713: [JSC] Make more DFG/FTL data FixedVector/Vector
https://bugs.webkit.org/show_bug.cgi?id=224713

Attachment 426322: Patch

https://bugs.webkit.org/attachment.cgi?id=426322&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 426322
  --> https://bugs.webkit.org/attachment.cgi?id=426322
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426322&action=review

> Source/JavaScriptCore/bytecode/Operands.h:141
> +    template<typename U, typename V> friend class Operands;

No need for the "U" and "V" here.

> Source/JavaScriptCore/dfg/DFGJITCompiler.h:269
> +    unsigned appendOSRExit(OSRExit&& exit)

This creates a 2^32 maximum. Does something check that and prevent overflow?

> Source/JavaScriptCore/dfg/DFGJITCompiler.h:276
> +    unsigned appendSpeculationRecovery(const SpeculationRecovery& recovery)

Ditto.

> Source/JavaScriptCore/dfg/DFGJITCompiler.h:394
> +public:
> +    Vector<DFG::OSREntryData> m_osrEntry;
> +    Vector<DFG::OSRExit> m_osrExit;
> +    Vector<DFG::SpeculationRecovery> m_speculationRecovery;
> +private:

This is inelegant. Is there a way to do this without making the vectors public?
Even accessor functions that return references would be more elegant than this.
But also could use friend maybe?

> Source/JavaScriptCore/ftl/FTLOSRExit.cpp:88
> +    unsigned index = state.jitCode->m_osrExit.size();

Same 2^32 question.


More information about the webkit-reviews mailing list