Closed Bug 1657285 Opened 5 years ago Closed 5 years ago

Optimise ArrayIteratorPrototypeOptimizable and IsTypedArrayConstructor in CacheIR and Warp

Categories

(Core :: JavaScript Engine: JIT, task, P1)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

Attachments

(3 files)

No description provided.
Blocks: 1638111

Renames "GuardFunctionPrototype" to "GuardDynamicSlotIsSpecificObject" and changes
the "proto" argument to "expected". Part 2 will reuse this CacheIR op.

Drive-by change:

  • Add the "no fixed slots" assertion from InstanceOfIRGenerator to the
    CallIRGenerator use site.

Optimise IntrinsicArrayIteratorPrototypeOptimizable using shape and slots guards
for now.

Depends on D85967

Add IsTypedArrayConstructorResult to CacheIR to test if a constructor is
definitely a TypedArray constructor. The IsTypedArrayConstructor intrinsic
returns true when the input is TypedArray constructor function. It allows the
constructor to be from a different realm, but it doesn't unwraps wrappers. (So
false-negatives are possible. This is okay because the function is only used to
guard a fast-path.)

Drive-by change:

  • Change IsTypedArrayConstructor to use Scalar::Type for its parameter. This
    function is only called from asm.js code which already passes a Scalar::Type.
  • Also change it to use the JS_FOR_EACH_TYPED_ARRAY macro used elsewhere in
    TypedArrayObject.cpp.

Depends on D85969

Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c4dd17ca2c1 Part 1: Rename GuardFunctionPrototype to GuardDynamicSlotIsSpecificObject. r=jandem https://hg.mozilla.org/integration/autoland/rev/4502ed4807ae Part 2: Optimise ArrayIteratorPrototypeOptimizable in CacheIR. r=jandem https://hg.mozilla.org/integration/autoland/rev/c4efa5897bd9 Part 3: Optimise IsTypedArrayConstructor in CacheIR and Warp. r=jandem

Backed out for bustage on Lowering.cpp

backout: https://hg.mozilla.org/integration/autoland/rev/796950780de0b8f513dd1dffef0953afa0b1f2d4

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=c4efa5897bd91fd5260425ffd568cfcbc4131400&searchStr=build&selectedTaskRun=A7oyM0leSCG0X1kCuwq6jA.0

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=312262727&repo=autoland&lineNumber=25573

[task 2020-08-06T13:06:18.955Z] 13:06:18 INFO - In file included from Unified_cpp_js_src_jit7.cpp:47:
[task 2020-08-06T13:06:18.955Z] 13:06:18 ERROR - /builds/worker/checkouts/gecko/js/src/jit/Lowering.cpp:5217:16: error: unused variable 'object' [-Werror,-Wunused-variable]
[task 2020-08-06T13:06:18.955Z] 13:06:18 INFO - MDefinition* object = ins->object();
[task 2020-08-06T13:06:18.955Z] 13:06:18 INFO - ^
[task 2020-08-06T13:06:18.955Z] 13:06:18 INFO - 1 error generated.
[task 2020-08-06T13:06:18.956Z] 13:06:18 ERROR - make[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:748: Unified_cpp_js_src_jit7.o] Error 1
[task 2020-08-06T13:06:18.956Z] 13:06:18 INFO - make[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/jit'
[task 2020-08-06T13:06:18.956Z] 13:06:18 INFO - make[4]: *** Waiting for unfinished jobs....

Flags: needinfo?(andrebargull)

Whoops, sorry about that.

Flags: needinfo?(andrebargull)
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e62987cc789 Part 1: Rename GuardFunctionPrototype to GuardDynamicSlotIsSpecificObject. r=jandem https://hg.mozilla.org/integration/autoland/rev/65ee886abf50 Part 2: Optimise ArrayIteratorPrototypeOptimizable in CacheIR. r=jandem https://hg.mozilla.org/integration/autoland/rev/4c66978f6b25 Part 3: Optimise IsTypedArrayConstructor in CacheIR and Warp. r=jandem
Severity: -- → N/A
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: