Closed Bug 715511 Opened 12 years ago Closed 12 years ago

IonMonkey: type based fast paths for GETPROP and SETPROP

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch WIP (770d43b354f4) (obsolete) — Splinter Review
Needs bug 713526 for cross-assembler methods for storing values.
Depends on: 713526
Blocks: 718853
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
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.