The default bug view has changed. See this FAQ.

IonMonkey: type based fast paths for GETPROP and SETPROP

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bhackett, Assigned: bhackett)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

JM+TI has paths in GETPROP and SETPROP for object accesses on a known slot, and GETPROP paths which fetch a statically known value.  These should be simple to port to IM.
Created attachment 588399 [details] [diff] [review]
WIP (770d43b354f4)
Needs bug 713526 for cross-assembler methods for storing values.
Depends on: 713526
Duplicate of this bug: 718547
Blocks: 718853
Created attachment 589882 [details] [diff] [review]
patch (66106b3ac316)
Assignee: general → bhackett1024
Attachment #588399 - Attachment is obsolete: true
Attachment #589882 - Flags: review?(dvander)
Comment on attachment 589882 [details] [diff] [review]
patch (66106b3ac316)

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

::: js/src/ion/IonBuilder.cpp
@@ +2773,5 @@
> +                return true;
> +            if (object && object->proto) {
> +                if (!TestSingletonProperty(cx, object->proto, id, isKnownConstant))
> +                    return false;
> +                if (isKnownConstant) {

Should this be: |if (*isKnownConstant)| ?

@@ +3295,5 @@
> +
> +        if (isKnownConstant) {
> +            if (testObject) {
> +                MUnbox *unbox = MUnbox::New(obj, MIRType_Object, MUnbox::Fallible);
> +                unbox->setGuard();

Two comments here:
 (1) Let's add an MUnbox::Guard variant that is the same as Fallible but sets the guard bit automatically.
 (2) Is it okay to insert an MUnbox here? If the incoming IR node is not a Value, it will assert or break.
     If that's possible, MUnbox should implement BoxInputsPolicy.

@@ +3357,5 @@
> +#endif
> +
> +    TypeOracle::BinaryTypes binaryTypes = oracle->binaryTypes(script, pc);
> +
> +    if (!monitored && !barrier) {

It should be okay to generate this with barrier==true. We don't generate write barriers yet so nothing will go wrong. (Adding them is on my todo list.)

::: js/src/ion/MIR.h
@@ +2236,5 @@
> +        return slot_;
> +    }
> +};
> +
> +class MStoreFixedSlot : public MBinaryInstruction, public ObjectPolicy

This and MLoadFixedSlot should return explicit AliasSets.
Attachment #589882 - Flags: review?(dvander) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/51766932fffc
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Duplicate of this bug: 707856
You need to log in before you can comment on or make changes to this bug.