Commit Graph

67937 Commits

Author SHA1 Message Date
Tooru Fujisawa
ac30e40152 Bug 1498101 - Part 2: Do not generate methods that is used by not-yet-implemented interface. r=Yoric 2018-11-07 15:14:29 +09:00
Tooru Fujisawa
d604ecb446 Bug 1498101 - Part 1: Do not generate code for disabled arm of sum node. r=Yoric 2018-11-07 15:14:29 +09:00
Jan de Mooij
46614e1f1e Bug 1503496 - Use enums + flag words for JSScript flags instead of bitfields. r=tcampbell
This makes it easier to read these flags from JIT code. The patch also splits
them in MutableFlags and ImmutableFlags, this should let us simplify XDR and
CopyScript in the future.

Differential Revision: https://phabricator.services.mozilla.com/D10735

--HG--
extra : moz-landing-system : lando
2018-11-07 07:40:39 +00:00
Jan de Mooij
9bdd20cd39 Bug 1504719 - Ignore uninitialized lexicals in globalLexicals() testing function. r=jorendorff
Also uses JS_DefinePropertyById instead of JS_SetPropertyById because it's more natural.

Differential Revision: https://phabricator.services.mozilla.com/D11094

--HG--
extra : moz-landing-system : lando
2018-11-06 19:51:00 +00:00
Ashley Hauck
45ee1152af Bug 1505150 - Move implementations of ParseContext and SharedContext to their own files. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D11098

--HG--
extra : moz-landing-system : lando
2018-11-06 22:51:40 +00:00
Till Schneidereit
9cae2bda28 Bug 1505059 - Compartment fixes for two JSAPI functions. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D11089

--HG--
extra : moz-landing-system : lando
2018-11-06 19:58:42 +00:00
Luke Wagner
1bf5c4019e Bug 1500203 - Baldr: add wasmCompileInSeparateProcess() shell testing function and tests using it (r=bbouvier)
--HG--
extra : rebase_source : c8afa4969b70fcc31e63f68521fc5be07e7c468b
2018-11-06 13:09:04 -06:00
Luke Wagner
a0314df0c6 Bug 1500203 - Baldr: reduce js.cpp dependency on wasm internal headers (r=bbouvier)
--HG--
extra : rebase_source : c6f50bc40e89a0fc228d31ee27fb8d5945a3c69f
2018-11-06 12:18:18 -06:00
Kartikaya Gupta
c7185bf0df Bug 1447643 - Remove frequently failing assertion. r=jonco 2018-11-06 13:02:21 -05:00
Nicolas B. Pierron
eabd69b84e Bug 1502013 - RemoveUnmarkedBlocks should only mark operands of removed blocks. r=jandem 2018-11-06 18:33:45 +01:00
André Bargull
4284514a41 Bug 1502530 - Part 3: Update SpiderMonkey time zone files. r=Waldo 2018-11-06 05:42:53 -08:00
Gurzau Raul
1da9ef02c4 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.html => testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.sub.html
rename : testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.html => testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.sub.html
2018-11-06 11:57:49 +02:00
Ehsan Akhgari
6f7b03e600 Bug 1504574 - Remove the XPCOM registration for nsDocumentEncoder; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D10856
2018-11-05 23:16:04 -05:00
Markus Stange
42b0e9f253 Bug 1499507 - Allow the compiler to generate a non-atomic increment instruction for the stack pointer increment. r=njn
This change reduces the binary size on macOS x64 by around 50KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. It's a bit hard to read because %r12 and %rbx swap their
function, but what happens in this method is that "movq       %r12, %rcx" goes
away, and the two instructions "leal       0x1(%r12) %eax" and
"movl       %eax, 0x10(%rbx)" turn into an "incl       0x10(%r12)".
So the old code was preserving the original value of profilingStack->stackPointer
in a register, and then using it later to compute the incremented stackPointer.
The new code uses an "incl" instruction for the stackPointer increment and
doesn't worry that the stackPointer value might have changed since the stack
size check at the start of the function. (It can't have changed.)

before: %rbx has the ProfilingStack*, %r12 has profilingStack->stackPointer
after: %r12 has the ProfilingStack*, %rbx has profilingStack->stackPointer

@@ -3,37 +3,35 @@
    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       0x80(%rdi), %rbx
-   movq       %rbx, -40(%rbp)
-   testq      %rbx, %rbx
+   movq       0x80(%rdi), %r12
+   movq       %r12, -40(%rbp)
+   testq      %r12, %r12
    je         loc_xxxxx

-   movl       0x10(%rbx), %r12d
-   cmpl       (%rbx), %r12d
+   movl       0x10(%r12), %ebx
+   cmpl       (%r12), %ebx
    jae        loc_xxxxx

-   movq       0x8(%rbx), %rax
-   movq       %r12, %rcx
-   shlq       $0x5, %rcx
-   leaq       aAttr, %rdx                                 ; "Attr"
-   movq       %rdx, (%rax,%rcx)
-   leaq       aSpecified, %rdx                            ; "specified"
-   movq       %rdx, 0x8(%rax,%rcx)
-   leaq       -40(%rbp), %rdx
-   movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x3a1, 0x1c(%rax,%rcx)
-   leal       0x1(%r12), %eax
-   movl       %eax, 0x10(%rbx)
+   movq       0x8(%r12), %rax
+   shlq       $0x5, %rbx
+   leaq       aAttr, %rcx                                 ; "Attr"
+   movq       %rcx, (%rax,%rbx)
+   leaq       aSpecified, %rcx                            ; "specified"
+   movq       %rcx, 0x8(%rax,%rbx)
+   leaq       -40(%rbp), %rcx
+   movq       %rcx, 0x10(%rax,%rbx)
+   movl       $0x3a1, 0x1c(%rax,%rbx)
+   incl       0x10(%r12)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
    movq       %rcx, (%r14)
    movq       -40(%rbp), %rax
@@ -47,11 +45,11 @@
    popq       %rbx
    popq       %r12
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

-   movq       %rbx, %rdi
+   movq       %r12, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
    jmp        loc_xxxxx

Depends on D9205

Differential Revision: https://phabricator.services.mozilla.com/D9206

--HG--
extra : moz-landing-system : lando
2018-11-06 04:35:13 +00:00
Markus Stange
24f3fd501e Bug 1499507 - Add AUTO_PROFILER_LABEL_DYNAMIC_FAST which allows specifying flags. r=njn
Depends on D9203

Differential Revision: https://phabricator.services.mozilla.com/D9204

--HG--
extra : moz-landing-system : lando
2018-11-06 04:33:45 +00:00
Markus Stange
75c251de85 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

Differential Revision: https://phabricator.services.mozilla.com/D9203

--HG--
extra : moz-landing-system : lando
2018-11-06 04:33:07 +00:00
Markus Stange
e6c22c99ad Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

Differential Revision: https://phabricator.services.mozilla.com/D9199

--HG--
extra : moz-landing-system : lando
2018-11-06 04:32:29 +00:00
Markus Stange
ab700f9fc0 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

Differential Revision: https://phabricator.services.mozilla.com/D9195

--HG--
extra : moz-landing-system : lando
2018-11-06 04:31:02 +00:00
Markus Stange
abb7ce1a0a Bug 1499507 - Make ensureCapacitySlow infallible. r=emilio
This eliminates a few instructions from each inlined instance of
AutoProfilerLabel because we no longer need to handle allocation failure in the
inlined code.
I think this allocation should be fine to make infallible: The allocation size
is limited by the thread's stack depth, and we only hit this code path when the
stack is the deepest it's ever been during the thread's life time.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build, it really just eliminates one test and one jump at the very end
of the method:

@@ -9,30 +9,29 @@
    movq       %rcx, %r14
    movq       %rdx, %r15
    movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

    movl       0x10(%rbx), %r12d
-   cmpl       %r12d, (%rbx)
-   jbe        loc_xxxxx
+   cmpl       (%rbx), %r12d
+   jae        loc_xxxxx

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
    movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
-
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
@@ -50,12 +49,9 @@
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

    movq       %rbx, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
-   testb      %al, %al
-   jne        loc_xxxxx
-
    jmp        loc_xxxxx

Depends on D9192

Differential Revision: https://phabricator.services.mozilla.com/D9193

--HG--
extra : moz-landing-system : lando
2018-11-06 04:30:13 +00:00
Markus Stange
3be6c8467b Bug 1499507 - Fold the 'profiler is active' check into the 'JSContext has a non-null PseudoStack' check. r=sfink
This eliminates a few instructions from every profiler label and saves code size.
We have around 9000 WebIDL constructors + methods + getters + setters which all
have an inlined instance of this code.

This change reduces the binary size on Linux x64 by around 160KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT, %rax ; __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT
-   movl       (%rax), %eax
-   testl      %eax, %eax
-   js         loc_xxxxx
-
-   movq       $0x0, -40(%rbp)
-   jmp        loc_xxxxx
-
-   movq       0x78(%rdi), %rbx
+   movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

    movl       0x10(%rbx), %r12d
    cmpl       %r12d, (%rbx)
    jbe        loc_xxxxx

Differential Revision: https://phabricator.services.mozilla.com/D9192

--HG--
extra : moz-landing-system : lando
2018-11-06 04:29:35 +00:00
Eric Faust
c81e060dda Bug 1494942 - Improve AtomizeUTF8Chars performance. (r=Waldo)
--HG--
extra : source : e726ed0d7b65c3540e1831623284168b39eefac1
extra : amend_source : 044eab05fb32721a0a807ff43dc3eaee9a59848a
2018-11-05 17:37:51 -08:00
shindli
164d7dfb6e Backed out changeset e726ed0d7b65 (bug 1494942) for spidermonkey bustages. 2018-11-06 02:13:29 +02:00
Eric Faust
ea3bcd2b8b Bug 1494942 - Improve AtomizeUTF8Chars performance. (r=Waldo)
--HG--
extra : rebase_source : 520a97331ee2358617acbf9db3bfc9eb425248e0
2018-11-05 16:03:16 -08:00
Kyle Machulis
8ad671c4c0 Bug 1498059 - Tests for CEnums in XPIDL; r=nika,froydnj
Depends on D8594

Differential Revision: https://phabricator.services.mozilla.com/D8595

--HG--
extra : moz-landing-system : lando
2018-11-06 00:05:44 +00:00
Ehsan Akhgari
c78ff51afb Bug 1504566 - Remove the XPCOM registration for nsHTMLCopyEncoder; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D10958
2018-11-05 17:28:54 -05:00
Narcis Beleuzu
9b3f73e696 Merge mozilla-central to inbound. CLOSED TREE 2018-11-05 23:54:03 +02:00
vinoth
e14aa2974e Bug 1504605 - Add Prefs to xpcshell test files for allowing usage of eval. r=ckerschb
Reviewers: ckerschb

Reviewed By: ckerschb

Subscribers: ckerschb

Bug #: 1504605

Differential Revision: https://phabricator.services.mozilla.com/D10850

--HG--
extra : rebase_source : 9abb395224bdfa7795516295babfd847ea2553f4
2018-11-05 16:41:45 +02:00
Matthew Gaudet
42e2aee566 Bug 1488763 - Unify stack touch logic across all platforms r=jandem
This incidentally also -adds- the stack touch logic to ARM64.

Differential Revision: https://phabricator.services.mozilla.com/D10395

--HG--
extra : moz-landing-system : lando
2018-11-05 09:35:01 +00:00
Ted Campbell
8c500290c1 Bug 1503994 - Fixup js Proxy doc comments r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10716

--HG--
extra : moz-landing-system : lando
2018-11-05 09:09:45 +00:00
Jonathan Kingston
4248b4c554 Bug 1490257 - Pass triggeringPrincipal to test code. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10882

--HG--
extra : moz-landing-system : lando
2018-11-05 14:05:47 +00:00
vinoth
896a7bbbd2 Bug 1504207 - Add Prefs for allowing usage of eval with system principal in test files r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10696

--HG--
extra : moz-landing-system : lando
2018-11-05 13:39:31 +00:00
Ted Campbell
9fe909e765 Bug 1503885 - Cleanup JOF_ types in Opcodes.h r=jandem
- Add JOF_ARGC, JOF_RESUMEINDEX instead of bare integer tags
- Fix some inconsistencies of JOF_ type and opcode size
- Reorganize JOF_ type list

Differential Revision: https://phabricator.services.mozilla.com/D10567

--HG--
extra : moz-landing-system : lando
2018-11-04 21:50:14 +00:00
Ted Campbell
734e0038de Bug 1503885 - Fix top-level comments in vm/Opcodes.h r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10761

--HG--
extra : moz-landing-system : lando
2018-11-04 21:41:41 +00:00
Ted Campbell
8403e89b6f Bug 1503885 - Fix formatting in vm/Opcodes.h r=jandem
- Wrap comments to 80 cols
- Use consistent formatting for opcode comments

Differential Revision: https://phabricator.services.mozilla.com/D10760

--HG--
extra : moz-landing-system : lando
2018-11-04 21:41:32 +00:00
Ted Campbell
9b026718a5 Bug 1503885 - Fix whitespace (only) in vm/Opcodes.h r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10566

--HG--
extra : moz-landing-system : lando
2018-11-04 21:41:18 +00:00
Jason Orendorff
fb86f885cc Bug 1501502 - Assertion failure: IsObjectValueInCompartment(v, compartment()) with bogus queuing strategy object. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10773

--HG--
extra : moz-landing-system : lando
2018-11-03 13:13:55 +00:00
shindli
7c0a5e2aef Merge inbound to mozilla-central. a=merge 2018-11-03 11:40:50 +02:00
arthur.iakab
890cf8bcf7 Backed out changeset 2a3a7c533bc0 (bug 1501502) for spidermonkey bustages on non262/ReadableStream/bug-1501502.js CLOSED TREE 2018-11-03 01:02:35 +02:00
Jason Orendorff
92221647b4 Bug 1501502 - Assertion failure: IsObjectValueInCompartment(v, compartment()) with bogus queuing strategy object. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10773

--HG--
extra : moz-landing-system : lando
2018-11-02 21:52:23 +00:00
Jason Orendorff
cadfbab250 Bug 1503867 - Change layout for state bits in class ReadableStream. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10587

--HG--
extra : moz-landing-system : lando
2018-11-02 21:09:52 +00:00
Jason Orendorff
a61f6d6249 Bug 1503006 - Part 12: Eliminate Maybe<AutoRealm> from Stream.cpp. r=tcampbell
Depends on D10436

Differential Revision: https://phabricator.services.mozilla.com/D10437

--HG--
extra : moz-landing-system : lando
2018-11-02 21:09:21 +00:00
Jason Orendorff
2f86eb3f31 Bug 1503006 - Part 11: Rename two remaining static methods to toplevel functions. r=tcampbell
This also reorders the remaining members of class ReadableStream a bit.

Depends on D10435

Differential Revision: https://phabricator.services.mozilla.com/D10436

--HG--
extra : moz-landing-system : lando
2018-11-02 21:08:58 +00:00
Jason Orendorff
4474c4783c Bug 1503006 - Part 10: Eliminate some static methods that are one-to-one with API entry points. r=tcampbell
Depends on D10434

Differential Revision: https://phabricator.services.mozilla.com/D10435

--HG--
extra : moz-landing-system : lando
2018-11-02 21:08:30 +00:00
Jason Orendorff
bc8918eb92 Bug 1503006 - Part 9: Code motion only. Move some static Stream methods immediately after their sole callers. r=tcampbell
Depends on D10433

Differential Revision: https://phabricator.services.mozilla.com/D10434

--HG--
extra : moz-landing-system : lando
2018-11-02 21:08:02 +00:00
Jason Orendorff
387184986d Bug 1503006 - Part 8: Move implementation of public Stream API functions from jsapi.cpp to builtin/Stream.cpp. r=tcampbell
Depends on D10432

Differential Revision: https://phabricator.services.mozilla.com/D10433

--HG--
extra : moz-landing-system : lando
2018-11-02 21:07:34 +00:00
Jason Orendorff
61ace3d5c1 Bug 1503006 - Part 7: Clean up remaining slot constants. r=tcampbell
Depends on D10431

Differential Revision: https://phabricator.services.mozilla.com/D10432

--HG--
extra : moz-landing-system : lando
2018-11-02 21:07:06 +00:00
Jason Orendorff
7e62261edd Bug 1503006 - Part 6: Trivial slot accessor methods for class ReadableByteStreamController. r=tcampbell
In passing, change ReadableStreamControllerPullSteps to use explicit downcasts,
so it's a little more obvious what's going on.

Depends on D10430

Differential Revision: https://phabricator.services.mozilla.com/D10431

--HG--
extra : moz-landing-system : lando
2018-11-02 21:06:39 +00:00
Jason Orendorff
cf6cb82e24 Bug 1503006 - Part 5: Trivial slot accessor methods for class ReadableStreamDefaultController. r=tcampbell
Depends on D10429

Differential Revision: https://phabricator.services.mozilla.com/D10430

--HG--
extra : moz-landing-system : lando
2018-11-02 21:06:16 +00:00
Jason Orendorff
d3de531e9f Bug 1503006 - Part 4: Trivial slot accessor methods for class ReadableStreamController. r=tcampbell
Depends on D10428

Differential Revision: https://phabricator.services.mozilla.com/D10429

--HG--
extra : moz-landing-system : lando
2018-11-02 21:05:48 +00:00
Jason Orendorff
95f809aae4 Bug 1503006 - Part 3: Trivial slot accessor methods for class ReadableStreamReader. r=tcampbell
This commit changes ReadableStreamReaderGenericRelease to use
UnwrapInternalSlot when accessing reader.[[closedPromise]]. Before this commit,
the code assumed that there would be a promise in the slot, not a wrapper.
I think that was actually correct, because it's impossible for the stream to
still be readable and the reader to have a [[closedPromise]] that's a wrapper.
Still, it's a bit precarious (and I'm still not 100% sure about that), so I just
changed it to unwrap.

Depends on D10374

Differential Revision: https://phabricator.services.mozilla.com/D10428

--HG--
extra : moz-landing-system : lando
2018-11-02 21:05:20 +00:00
Jason Orendorff
f0f4233f95 Bug 1503006 - Part 2: Trivial slot accessor methods for class ReadableStream. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10374

--HG--
extra : moz-landing-system : lando
2018-11-02 21:05:18 +00:00
Ciure Andrei
26f3fc7fec Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-11-02 18:48:12 +02:00
Ciure Andrei
83010e5db0 Merge inbound to mozilla-central. a=merge 2018-11-02 18:44:43 +02:00
Jan de Mooij
7d9c159b47 Bug 1503170 part 3 - Remove unused CGResumeOffsetList::numAwaits, move numYields to BytecodeEmitter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10686

--HG--
extra : moz-landing-system : lando
2018-11-02 13:38:32 +00:00
Jan de Mooij
8f3823c37a Bug 1503170 part 2 - Use resume{Index,Offset} for JSOP_GOSUB/JSOP_RETSUB, remove RetSub IC. r=tcampbell
Note: JSOP_GOSUB has a use count of 2 even though it doesn't push/pop anything.
This isn't great but was done to match the old behavior (def count of 0, pushed
2 values).

Depends on D10571

Differential Revision: https://phabricator.services.mozilla.com/D10572

--HG--
extra : moz-landing-system : lando
2018-11-02 13:37:34 +00:00
Ciure Andrei
f93ee62611 Backed out 11 changesets (bug 1503006) for landing the wrong version of patches CLOSED TREE
Backed out changeset f45aeb07cca6 (bug 1503006)
Backed out changeset 5782af4a237c (bug 1503006)
Backed out changeset ca8bd4e2151e (bug 1503006)
Backed out changeset 4fc5492e340c (bug 1503006)
Backed out changeset bb238cffc154 (bug 1503006)
Backed out changeset d1580501b0d1 (bug 1503006)
Backed out changeset b54266154e56 (bug 1503006)
Backed out changeset 8f0bef2f1dfb (bug 1503006)
Backed out changeset 64f5848790f7 (bug 1503006)
Backed out changeset 3f91b9f1dd38 (bug 1503006)
Backed out changeset 98c55ece0f42 (bug 1503006)
2018-11-02 13:31:03 +02:00
Jason Orendorff
9d84494236 Bug 1503006 - Part 12: Eliminate Maybe<AutoRealm> from Stream.cpp. r=tcampbell
Depends on D10436

Differential Revision: https://phabricator.services.mozilla.com/D10437

--HG--
extra : moz-landing-system : lando
2018-11-01 00:06:43 +00:00
Jason Orendorff
c5bda45c8d Bug 1503006 - Part 11: Rename two remaining static methods to toplevel functions. r=tcampbell
This also reorders the remaining members of class ReadableStream a bit.

Depends on D10435

Differential Revision: https://phabricator.services.mozilla.com/D10436

--HG--
extra : moz-landing-system : lando
2018-11-01 00:01:07 +00:00
Jason Orendorff
730fc1a771 Bug 1503006 - Part 10: Eliminate some static methods that are one-to-one with API entry points. r=tcampbell
Depends on D10434

Differential Revision: https://phabricator.services.mozilla.com/D10435

--HG--
extra : moz-landing-system : lando
2018-11-01 00:00:08 +00:00
Jason Orendorff
85cde918e8 Bug 1503006 - Part 9: Code motion only. Move some static Stream methods immediately after their sole callers. r=tcampbell
Depends on D10433

Differential Revision: https://phabricator.services.mozilla.com/D10434

--HG--
extra : moz-landing-system : lando
2018-10-31 23:56:39 +00:00
Jason Orendorff
dc80131e37 Bug 1503006 - Part 8: Move implementation of public Stream API functions from jsapi.cpp to builtin/Stream.cpp. r=tcampbell
Depends on D10432

Differential Revision: https://phabricator.services.mozilla.com/D10433

--HG--
extra : moz-landing-system : lando
2018-10-31 23:54:55 +00:00
Jason Orendorff
902851f3bc Bug 1503006 - Part 7: Clean up remaining slot constants. r=tcampbell
Depends on D10431

Differential Revision: https://phabricator.services.mozilla.com/D10432

--HG--
extra : moz-landing-system : lando
2018-10-31 23:44:58 +00:00
Jason Orendorff
a40f56e7ef Bug 1503006 - Part 6: Trivial slot accessor methods for class ReadableByteStreamController. r=tcampbell
In passing, change ReadableStreamControllerPullSteps to use explicit downcasts,
so it's a little more obvious what's going on.

Depends on D10430

Differential Revision: https://phabricator.services.mozilla.com/D10431

--HG--
extra : moz-landing-system : lando
2018-10-31 23:44:09 +00:00
Jason Orendorff
b2eb76265b Bug 1503006 - Part 5: Trivial slot accessor methods for class ReadableStreamDefaultController. r=tcampbell
Depends on D10429

Differential Revision: https://phabricator.services.mozilla.com/D10430

--HG--
extra : moz-landing-system : lando
2018-10-31 23:40:20 +00:00
Jason Orendorff
51afdbdfa1 Bug 1503006 - Part 4: Trivial slot accessor methods for class ReadableStreamController. r=tcampbell
Depends on D10428

Differential Revision: https://phabricator.services.mozilla.com/D10429

--HG--
extra : moz-landing-system : lando
2018-10-31 23:39:16 +00:00
Jason Orendorff
a31ca6742c Bug 1503006 - Part 3: Trivial slot accessor methods for class ReadableStreamReader. r=tcampbell
This commit changes ReadableStreamReaderGenericRelease to use
UnwrapInternalSlot when accessing reader.[[closedPromise]]. Before this commit,
the code assumed that there would be a promise in the slot, not a wrapper.
I think that was actually correct, because it's impossible for the stream to
still be readable and the reader to have a [[closedPromise]] that's a wrapper.
Still, it's a bit precarious (and I'm still not 100% sure about that), so I just
changed it to unwrap.

Depends on D10374

Differential Revision: https://phabricator.services.mozilla.com/D10428

--HG--
extra : moz-landing-system : lando
2018-10-31 23:27:31 +00:00
Jason Orendorff
06f8c8024c Bug 1503006 - Part 2: Trivial slot accessor methods for class ReadableStream. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10374

--HG--
extra : moz-landing-system : lando
2018-11-01 19:19:17 +00:00
Jason Orendorff
c1bb654579 Bug 1503006 - Part 1: Trivial whitespace fixes. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10427

--HG--
extra : moz-landing-system : lando
2018-10-31 22:38:20 +00:00
Jon Coppeard
5d987c8758 Bug 1503009 - Test that import() is a syntax error even if we don't emit bytecode for it r=jorendorff 2018-11-02 11:13:01 +00:00
Ciure Andrei
65c85f663c Backed out 3 changesets (bug 1501928) for causing parser build bustages CLOSED TREE
Backed out changeset 2c2f329b5f3f (bug 1501928)
Backed out changeset 5511494bb3e2 (bug 1501928)
Backed out changeset b537bec9ef64 (bug 1501928)
2018-11-02 09:33:03 +02:00
Tooru Fujisawa
185d87dd21 Bug 1501928 - Part 3: Remove MUST_MATCH_TOKEN_MOD_WITH_REPORT* macros. r=Waldo 2018-11-02 15:51:06 +09:00
Tooru Fujisawa
f59014cf0f Bug 1501928 - Part 2: Remove MUST_MATCH_TOKEN_FUNC* macros. r=Waldo 2018-11-02 15:51:05 +09:00
Tooru Fujisawa
da0a033384 Bug 1501928 - Part 1: Add GeneralParser::mustMatchToken and use it instead of simple variants of MUST_MATCH_TOKEN_*. r=Waldo 2018-11-02 15:50:13 +09:00
Daniel Varga
26a7cbde3d Merge mozilla-central to autoland. a=merge 2018-11-02 00:35:10 +02:00
Daniel Varga
e86b1d05f8 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : mobile/android/chrome/geckoview/GeckoViewNavigationContent.js => mobile/android/chrome/geckoview/GeckoViewNavigationChild.js
2018-11-02 00:27:53 +02:00
Daniel Varga
77036132f7 Merge autoland to mozilla-central. a=merge 2018-11-02 00:26:12 +02:00
Denis Palmeiro
370e9d5ac9 Bug 1497018 - Use mozilla::TimeStamp for tracelogger timing r=sfink
Switch over to mozilla::TimeStamp for timing.  This should use clock_gettime, mach_absolute_time, ,and QueryPerformanceCounter timing implementations on Linux, OSX, and Windows which are all very efficient.  It increases overhead a little bit, but allows for synchronization across cores and the profiler, and is portable.  Longer term solution should be to move over to rdtscp for timing.

Differential Revision: https://phabricator.services.mozilla.com/D10588

--HG--
extra : moz-landing-system : lando
2018-11-01 17:56:51 +00:00
André Bargull
ff6d766102 Bug 1473588: Upgrade minimum ICU version to ICU 63. r=jorendorff 2018-11-01 09:39:38 -07:00
Jason Orendorff
8804208609 Bug 1503016 - Use TraceableFifo for JSContext::jobQueue. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D10361

--HG--
extra : moz-landing-system : lando
2018-11-01 17:19:06 +00:00
Ted Campbell
c1743a79f4 Bug 1489698 - Add moz.build for js/src/wasm. r=luke,froydnj 2018-11-01 13:28:00 -04:00
Ted Campbell
d5302eb547 Bug 1489698 - Add moz.build for js/src/gc. r=jonco,froydnj 2018-11-01 13:28:00 -04:00
André Bargull
47272c6287 Bug 1502810 - Update Intl functions to work with cross-compartment wrappers. r=jorendorff 2018-11-01 06:25:24 -07:00
Ashley Hauck
eed19ea6ae Bug 1503890 - Use MOZ_RELEASE_ASSERT for builtins that take int32 values. r=tcampbell
The arguments to the intrinsics here are not guaranteed to be int32s,
however, if a double enters the intrinsic, that's probably a bug in our
builtin javascript. Values should be converted to int32 before being
passed in, with `|0`.

Differential Revision: https://phabricator.services.mozilla.com/D10573

--HG--
extra : moz-landing-system : lando
2018-11-01 15:10:30 +00:00
Jan de Mooij
f803893460 Bug 1503542 - Move strict equality comparison out of JSOP_CASE. r=arai
Depends on D10350

Differential Revision: https://phabricator.services.mozilla.com/D10351

--HG--
extra : moz-landing-system : lando
2018-11-01 10:36:04 +00:00
Julian Descottes
079a123093 Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 13:48:48 +00:00
Csoregi Natalia
faba2c8c15 Backed out 4 changesets (bug 1467712) for multiple failures with: Too many arguments passed to ok. CLOSED TREE
Backed out changeset 9ce0ac2b9d71 (bug 1467712)
Backed out changeset 026eb1f6dc6e (bug 1467712)
Backed out changeset 0088a09d869a (bug 1467712)
Backed out changeset 1b19ea76aad6 (bug 1467712)
2018-11-01 15:22:52 +02:00
Matthew Gaudet
426039810d Bug 1503116: Templatize CacheIR IC attachment mechanism in Ion r=khyperia
This also, circumstantially, cleans up an ugly bug in the attachment logic
in the Binary and Compare IR generators where we would never update the
IC state.

Differential Revision: https://phabricator.services.mozilla.com/D10317

--HG--
extra : rebase_source : 109ed6d6b4332724f92fbde868076f5c7075c2c1
2018-10-30 18:32:00 -04:00
Ted Campbell
8dc5e89c58 Bug 1502481 - Cleanup JSScript::initFunctionPrototype r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D9948

--HG--
extra : moz-landing-system : lando
2018-10-30 18:03:59 +00:00
Ted Campbell
5fdb75e095 Bug 1502481 - Rename JSScript partiallyInit and friends r=jandem
JSScript::partiallyInit -> JSScript::createPrivateScriptData
JSScript::createScriptData -> JSScript::createSharedScriptData

Differential Revision: https://phabricator.services.mozilla.com/D9947

--HG--
extra : moz-landing-system : lando
2018-10-30 18:02:08 +00:00
Ted Campbell
931e6a842b Bug 1502481 - Cleanup JSScript constructor calls r=jandem
This reorganizes the JSScript constructor sequence into the following layers and responsibilities:

  JSScript(...)         The actual C++ constructor putting script in
                        GC-safe state.
  JSScript::New(...)    Performs allocation within GC.
  JSScript::Create(...) Common initialization for all script
                        initialization pathways.

This is more in-line with how other GC-things are created. The bitfields
saved from compile options are now done at the JSScript::Create level.

Differential Revision: https://phabricator.services.mozilla.com/D9946

--HG--
extra : moz-landing-system : lando
2018-10-30 18:02:00 +00:00
Ted Campbell
9fe20accb5 Bug 1502481 - Cleanup JSScript nits r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D9945

--HG--
extra : moz-landing-system : lando
2018-10-30 18:03:05 +00:00
Ted Campbell
d7cfa4731d Bug 1502481 - Use sourceStart/sourceEnd name within JSScript r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D9944

--HG--
extra : moz-landing-system : lando
2018-10-30 18:01:41 +00:00
Julian Descottes
b50a5ba4dc Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 11:09:48 +00:00
Margareta Eliza Balazs
86f56d08a0 Merge inbound to mozilla-central. a=merge 2018-11-01 11:12:55 +02:00
Ted Campbell
19dbe58e02 Bug 1485347 - Part 5: Use js::PrivateScriptData for JSScript. r=jandem
- This makes JSScript::data arrays read-only. Initialization code
 directly uses PrivateScriptData to mutate.

MozReview-Commit-ID: LJFc8QazLfq
2018-10-31 22:29:59 -04:00
Ted Campbell
1b0db8ce6d Bug 1485347 - Part 4: Add js::PrivateScriptData type. r=waldo
This will later be used to store variable length data that hangs off of
each JSScript. This primarily is a refactor of existing JSScript code to
put in its own data structure.

- ScopeArray and friends now store offsets instead of pointers. This
  saves memory on 64-bit platforms and simplifies cloning.
- GCPtr constructors are used instead of relying on pod_calloc. This
  fixes C++ object-model violations.
- A packed bitfield is used to locate optional array headers instead of
  previous daisy-chain approach. This also lets js::PrivateScriptData
  understand array layout without coupling to JSScript.
2018-10-31 22:29:59 -04:00
Ted Campbell
bb40dcbfc7 Bug 1489698 - Add moz.build for js/src/frontend. r=waldo,froydnj 2018-10-31 18:14:23 -04:00
Brindusan Cristian
3d5e6205ca Merge inbound to mozilla-central. a=merge 2018-10-31 23:41:40 +02:00
Jonathan Kingston
873b26107e Bug 1490257 - Add asserts into loadURI where we imply SystemPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10221

--HG--
extra : moz-landing-system : lando
2018-10-31 18:00:40 +00:00
Ashley Hauck
0262b6528c Bug 1487022 - Fix repeated bailouts when constant-folding a never-ran 1/0. r=tcampbell
Depends on D8446

Differential Revision: https://phabricator.services.mozilla.com/D6067

--HG--
extra : moz-landing-system : lando
2018-10-31 17:31:03 +00:00
Ashley Hauck
cc606364e6 Bug 1487022 - Use MOZ_RELEASE_ASSERT for builtins that take int32 values. r=tcampbell
The arguments to the intrinsics here are not guaranteed to be int32s,
however, if a double enters the intrinsic, that's probably a bug in our
builtin javascript. Values should be converted to int32 before being
passed in, with `|0`.

Differential Revision: https://phabricator.services.mozilla.com/D8446

--HG--
extra : moz-landing-system : lando
2018-10-31 17:28:41 +00:00
arthur.iakab
46a62df41a Merge mozilla-central to autoland 2018-10-31 18:35:03 +02:00
arthur.iakab
02a09260c5 Merge inbound to mozilla-central a=merge 2018-10-31 18:33:39 +02:00
Jason Orendorff
d507cb8c1f Bug 1499813 - Part 10: Change SetNewList return type to bool. r=tcampbell
Depends on D10086

Differential Revision: https://phabricator.services.mozilla.com/D10309

--HG--
extra : moz-landing-system : lando
2018-10-31 14:50:48 +00:00
Jason Orendorff
bd8a0975dd Bug 1499813 - Part 9: Apply the unwrapped naming convention to algorithms in Streams spec section 3.8. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10086

--HG--
extra : moz-landing-system : lando
2018-10-31 14:45:03 +00:00
Jon Coppeard
05fb548b6a Bug 1502946 - Tighten up some gray marking checks r=sfink 2018-10-31 13:32:37 +00:00
Jan de Mooij
b1689f020c Bug 1409441 part 1 - Inline ActivationEntryMonitor constructor/destructor. r=fitzgen 2018-10-31 10:31:14 +01:00
Jon Coppeard
89772807f3 Bug 1503009 - If dynamic module import is not supported its use should be rejected at parse time r=jorendorff 2018-10-31 12:45:24 +00:00
Jason Orendorff
c1358535c7 Bug 1499813 - Part 8: Change StreamFromReader to use UnwrapSlot. r=tcampbell
Depends on D9841

Differential Revision: https://phabricator.services.mozilla.com/D9842

--HG--
extra : moz-landing-system : lando
2018-10-30 22:01:09 +00:00
Jason Orendorff
b714e51e15 Bug 1499813 - Part 7: Change ReaderFromStream to use UnwrapSlot. r=tcampbell
Depends on D9840

Differential Revision: https://phabricator.services.mozilla.com/D9841

--HG--
extra : moz-landing-system : lando
2018-10-30 22:00:56 +00:00
Jason Orendorff
6d0c89a3b4 Bug 1499813 - Part 6: New template UnwrapSlot<T>() for reading a "statically typed" slot. Remove TeeState::stream() in favor of UnwrapSlot. r=tcampbell
Depends on D9839

Differential Revision: https://phabricator.services.mozilla.com/D9840

--HG--
extra : moz-landing-system : lando
2018-10-30 22:00:52 +00:00
Jason Orendorff
5139577761 Bug 1499813 - Part 5: Update Streams spec section numbers in comments. r=tcampbell
Depends on D9837

Differential Revision: https://phabricator.services.mozilla.com/D9839

--HG--
extra : moz-landing-system : lando
2018-10-30 22:00:48 +00:00
Jason Orendorff
934edc710b Bug 1499813 - Part 4: Remove _impl methods, replace with unwrapping. r=tcampbell
Depends on D9836

Differential Revision: https://phabricator.services.mozilla.com/D9837

--HG--
extra : moz-landing-system : lando
2018-10-30 21:59:16 +00:00
Jason Orendorff
fd98b1b180 Bug 1499813 - Part 3: Replace some ToUnwrapped signatures with new js::UnwrapThis<T>() template. r=tcampbell
Depends on D9835

Differential Revision: https://phabricator.services.mozilla.com/D9836

--HG--
extra : moz-landing-system : lando
2018-10-30 21:58:44 +00:00
Jason Orendorff
cc2589c333 Bug 1499813 - Part 2: JSObject::unwrapAs<T>() and canUnwrapAs<T>() methods. r=tcampbell
Depends on D9834

Differential Revision: https://phabricator.services.mozilla.com/D9835

--HG--
extra : moz-landing-system : lando
2018-10-30 21:58:21 +00:00
Jason Orendorff
6ff7b405ea Bug 1499813 - Part 1: Remove an unused variable. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D9834

--HG--
extra : moz-landing-system : lando
2018-10-30 21:57:46 +00:00
Jan de Mooij
3abf4db136 Bug 1503170 part 1 - Rename yieldAndAwait{Index,Offset} to resume{Index,Offset}. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10571

--HG--
extra : moz-landing-system : lando
2018-11-02 08:19:33 +00:00
Jan de Mooij
dda313d294 Bug 1503586 - Add a globalLexicals() testing function for the fuzzers. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D10373

--HG--
extra : moz-landing-system : lando
2018-11-02 08:19:29 +00:00
Gurzau Raul
424b125b93 Backed out changeset 523ff2753dea (bug 1490257) for causing Bug 1503757 a=backout 2018-11-01 15:27:30 +02:00
Ciure Andrei
fdf5f2cda7 Merge inbound to mozilla-central. a=merge 2018-10-31 07:08:22 +02:00
Ciure Andrei
608de3193c Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-31 00:14:49 +02:00
Ciure Andrei
499182b91a Merge inbound to mozilla-central. a=merge 2018-10-31 00:06:53 +02:00
Ciure Andrei
a2c4dad0d5 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-10-31 00:16:17 +02:00
David Major
274ff66356 Bug 1501269: Make EnsureIAndDCacheCoherency work on aarch64-windows. r=sstangl
Differential Revision: https://phabricator.services.mozilla.com/D9724

--HG--
rename : js/src/jit/arm64/vixl/Cpu-vixl.cpp => js/src/jit/arm64/vixl/MozCpu-vixl.cpp
extra : rebase_source : a95368cac4a995f7a47feb26d805d32bd010eae9
2018-10-30 17:29:40 -04:00
Ciure Andrei
60ea98ca60 Backed out 10 changesets (bug 1501044, bug 1472212) for fetch-destination.https.html perma failure CLOSED TREE
Backed out changeset aa35078cabaa (bug 1472212)
Backed out changeset bf02793f802d (bug 1472212)
Backed out changeset 95a7ef6102a6 (bug 1472212)
Backed out changeset 7b7fa6ab2229 (bug 1472212)
Backed out changeset 4fe4ec18f2f3 (bug 1472212)
Backed out changeset 18f824674b76 (bug 1472212)
Backed out changeset 1978a7837502 (bug 1472212)
Backed out changeset 21a6f1a83c73 (bug 1472212)
Backed out changeset 48242d39d532 (bug 1472212)
Backed out changeset 0b5cf2f4305a (bug 1501044)
2018-10-30 23:31:10 +02:00
Daniel Varga
6739963364 Backed out changeset 6a379f71dac8 (bug 1499125) for spidermonkey bustage at /builds/worker/workspace/build/src/js/src/builtin/Promise.cpp
--HG--
extra : rebase_source : 42eafff7bcb9e64d21d50ff3a89d7090df4abc5c
2018-10-30 17:29:51 +02:00
Ehsan Akhgari
11d5b2d27f Bug 1499125 - Remove the bogus assertion r=arai
Differential Revision: https://phabricator.services.mozilla.com/D10094

--HG--
extra : moz-landing-system : lando
2018-10-30 00:58:56 +00:00
Iain Ireland
9f7680409f Bug 1499607: Add OOM unsafe region while replenishing ballast after fallible allocation r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10123

--HG--
extra : moz-landing-system : lando
2018-10-30 12:17:24 +00:00
Andrea Marchesini
d33f864af8 Bug 1503551 - Remove window.sidebar, r=smaug 2018-10-31 18:30:18 +01:00
shindli
ea6441668e Backed out 2 changesets (bug 1487022) for causing spidermonkey bustages in /builds/worker/workspace/build/src/js/src/jit-test/tests/wasm/memory.js CLOSED TREE
Backed out changeset 860712299944 (bug 1487022)
Backed out changeset 1cf53a430311 (bug 1487022)
2018-11-01 01:13:04 +02:00
Brindusan Cristian
41900a475a Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-31 23:44:15 +02:00
Gabriele Svelto
266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Paul Bone
9125c90de6 Bug 1502819 - Fix formatting of Zeal mode enum r=jonco
--HG--
extra : rebase_source : 2897e0805e547dc9357e3305945dad4e0ca7b54e
2018-10-29 21:40:19 +11:00
Paul Bone
76d5dc3142 Bug 1502819 - Number the GC Reason and AbortReason enum items r=jonco
--HG--
extra : rebase_source : 78cc2806fb8abcaef15cb15e616280b6329bc01d
2018-10-29 21:23:57 +11:00
Csoregi Natalia
b48139f5dc Backed out changeset 916db80793cb (bug 1497784) for web platform tests failures on /_mozilla/binast/large.https.html. CLOSED TREE 2018-10-30 04:19:45 +02:00
Tooru Fujisawa
d499c4a6ad Bug 1497784 - Drop support for lexical declaration in BinAST for now. r=Yoric 2018-10-30 09:49:41 +09:00
Tooru Fujisawa
b5cfef2126 Bug 1501537 - Name function in variable declaration initializer in BinAST. r=Yoric 2018-10-30 09:49:40 +09:00
Tooru Fujisawa
3cec62da42 Bug 1497788 - Allow duplicate AssertedPositionalParameterName. r=efaust 2018-10-30 09:49:40 +09:00
Csoregi Natalia
cc313f779c Backed out 9 changesets (bug 1472212) for browser-chrome tests run issues on Linux x64 asan and failures on browser_ext_windows_create_tabId.js. CLOSED TREE
Backed out changeset 18e46df44cd1 (bug 1472212)
Backed out changeset 2e5de66c1f60 (bug 1472212)
Backed out changeset b94f9883aef0 (bug 1472212)
Backed out changeset ebdca743668c (bug 1472212)
Backed out changeset f8a06d01437e (bug 1472212)
Backed out changeset b6996abc7d90 (bug 1472212)
Backed out changeset 24c257cd18c3 (bug 1472212)
Backed out changeset 176f3ee14e67 (bug 1472212)
Backed out changeset b4baa63e5b1b (bug 1472212)
2018-10-30 01:58:21 +02:00
Yu Yin
15192e483d Bug 1503077 - Disable spectre mitigations by default on mips(64). r=jandem
--HG--
extra : rebase_source : 36de146a39304ad998020f068432cf4e7d9b909c
2018-10-30 02:45:00 +02:00
Jon Coppeard
929387ffd3 Bug 1502940 - Tidy up sweep actions that implement GC zeal modes r=sfink 2018-10-30 10:32:10 +00:00
Jon Coppeard
5a4892c5e0 Bug 1502669 - Check whether an exception is pending if dynamic module import hook fails r=jandem 2018-10-30 10:29:57 +00:00
Tom Schuster
3e3d914c39 Bug 1502966 - Print column number in FormatStackDump. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D10092

--HG--
extra : moz-landing-system : lando
2018-10-30 21:53:03 +00:00
Tom Schuster
0353466874 Bug 1502889 - Revert TypedArray [[Set]] to previous behavior if not receiver. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D10116

--HG--
extra : moz-landing-system : lando
2018-10-30 22:01:52 +00:00
Jason Orendorff
6a9ea162e6 Bug 1502963 - Quote jit_test.py --show-failed-cmd output. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D10091

--HG--
extra : moz-landing-system : lando
2018-10-30 21:49:29 +00:00
Ted Campbell
7deaf7bc04 Bug 1447372 - Cleanup LifoAlloc usage for BytecodeCompiler r=jorendorff
Make off-thread and main-thread parsing more consistent by using the
JSContext tempLifoAlloc always. This also makes BytecodeCompiler APIs
more consistent.

Remove BytecodeCompiler::alloc which was obscuring lifetimes and
conflicts of allocator.

Differential Revision: https://phabricator.services.mozilla.com/D9978

--HG--
extra : moz-landing-system : lando
2018-10-30 19:23:25 +00:00
Ted Campbell
6b5003a03f Bug 1447372 - Cleanup LifoAlloc usage for BytecodeParser r=jorendorff
Move LifoAllocScope out of BytecodeParser to avoid ordering issues that
may arise when LifoAllocScope is wrapped.

Differential Revision: https://phabricator.services.mozilla.com/D9977

--HG--
extra : moz-landing-system : lando
2018-10-30 19:24:37 +00:00
Ted Campbell
d16e7c5292 Bug 1447372 - Cleanup LifoAlloc usage for RegExp r=jorendorff
Directly construct a LifoAllocScope on cx->tempLifoAlloc inside
RegExpObject::create. The data allocated temporarily does not outlive
this function. Also simplify callers as a result.

Differential Revision: https://phabricator.services.mozilla.com/D9976

--HG--
extra : moz-landing-system : lando
2018-10-30 19:24:14 +00:00
Cosmin Sabou
3b735243ab Merge mozilla-central to mozilla-inbound. a=merge
--HG--
extra : rebase_source : 8505e939743adff1ac28bbacc959496d6e254a44
2018-11-02 23:51:14 +02:00
Lars T Hansen
d0c5506c0b Bug 1446307 - Compute toggled call size properly; fix constant pool header. r=sstangl
ToggledCallSize() on ARM64 did not properly account for all the
possible places where a constant pool could be found; also, it can be
updated to use better abstractions.

WritePoolHeader() on ARM64 did not generate a correct header because
it used sizeof(Instructions), which is meaningless on this platform,
as Instruction has no data fields.  Use kInstructionSize instead,
that's what it's for, and everyone else uses it.
2018-11-02 13:42:00 -04:00
Kannan Vijayan
9bb028b59a Bug 1502143: Guard against proto-changes when optimizing sparse native object indexed elements. r=mgaudet 2018-11-02 13:13:55 -04:00
Ciure Andrei
194c521f36 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-11-02 18:59:30 +02:00
Jon Coppeard
509753441f Bug 1503666 - Fix gray marking assertion in Wrapper::wrappedObject and update comments r=sfink 2018-11-02 16:24:40 +00:00
Marco Castelluccio
cb7b3a9980 Bug 1380661 - Add JS API to reset script counts. r=nbp
--HG--
extra : rebase_source : 7d6d3126bf5f5c8d4c26077490f62b66944c539b
2018-10-24 21:32:36 +02:00
Lars T Hansen
3faefd6db3 Bug 1501201 - do not look at table index of passive segments. r=jseward
--HG--
extra : rebase_source : 7cb54bcb2c6ed3da22e7e60c10aceeb80cd55477
extra : histedit_source : f3729f994f624294d66a783fa0dc09f3a6f7b724
2018-10-23 11:00:45 +02:00
Csoregi Natalia
ec50e0e5af Merge mozilla-central to mozilla-inbound. CLOSED TREE 2018-11-07 18:22:28 +02:00
Tom Ritter
7c10087af0 Bug 1505070 - Use un-fuzzed timestamps for JS Engine telemetry r=jonco 2018-11-06 12:13:31 -06:00
Jason Orendorff
79f2dbe03b Bug 1494758 - Fix a multiply-busted Debugger test. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D7192

--HG--
extra : moz-landing-system : lando
2018-10-19 17:57:04 +00:00
Jan de Mooij
2c7cefd79f Bug 1503522 - Add JOF_IC JSOp flag for ops that have a Baseline IC. r=tcampbell
This will be useful for bug 1499644 etc.

Depends on D10337

Differential Revision: https://phabricator.services.mozilla.com/D10350

--HG--
extra : moz-landing-system : lando
2018-10-31 13:44:26 +00:00
Jan de Mooij
84331d9102 Bug 1503523 - Remove JOF_ARITH because it's not checked anywhere. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10337

--HG--
extra : moz-landing-system : lando
2018-10-31 13:33:34 +00:00
Ehsan Akhgari
05e51f1665 Bug 1499125 - Remove the bogus assertion r=arai
Differential Revision: https://phabricator.services.mozilla.com/D10094

--HG--
extra : moz-landing-system : lando
2018-10-30 22:25:17 +00:00
Jason Orendorff
dbf64422f6 Bug 1483709 - Remove bogus DebuggerFrame slot constants. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D10102

--HG--
extra : moz-landing-system : lando
2018-10-30 16:27:55 +00:00
Kris Maglione
f5e4ac7e08 Bug 1356412: Part 1 - Remove subscript loader path mangling. r=mccr8
This was only ever useful before we had compartment-based security isolation.
Now it is just a pervasive nuisance.

Differential Revision: https://phabricator.services.mozilla.com/D10795

--HG--
extra : rebase_source : 9af37bbd959b2db3d7a6c5ac723a474c47676f79
2018-11-02 14:45:12 -07:00
Marco Castelluccio
a9316d786b Bug 1504073 - Don't create lcov output file as soon as the runtime is created, but only when we actually have to write lcov data out. r=nbp 2018-11-01 18:16:17 +01:00
Cosmin Sabou
6933921ac8 Backed out 2 changesets (bug 1504073) for spidermonkey build bustages on functionnames.js
Backed out changeset 8d667ad8e5aa (bug 1504073)
Backed out changeset 3d14a1201277 (bug 1504073)
2018-11-05 15:47:07 +02:00
Marco Castelluccio
448f1a352d Bug 1504073 - Don't create lcov output file as soon as the runtime is created, but only when we actually have to write lcov data out. r=nbp
--HG--
extra : rebase_source : a81d404e971f15bb4b56eb2c215d87bd6561e4a4
2018-11-01 18:16:17 +01:00
Benjamin Bouvier
cb56ef630f Bug 1502886: Test; r=jonco 2018-10-30 14:07:25 +01:00
Benjamin Bouvier
461fd52f61 Bug 1502886: Delete wasm breakpoints when the wasm instance's Zone is swept; r=jonco 2018-10-29 18:55:17 +01:00
Margareta Eliza Balazs
a97102ca4b Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-11-05 11:53:19 +02:00
Chris Manchester
56dc293f15 Bug 1499196 - Introduce a mozilla-central-workspace-hack crate to unify features seen by rust deps. r=ted,firefox-build-system-reviewers
This is the equivalent of the rustc-workspace-hack used by the rust build to
ensure cargo and RLS see the same set of features for dependencies so that
these dependencies may be reused by invocations of cargo for these two
projects. The trivial crate added specifies the union of the set of
features activated for a particular crate for each time it appears in the
dependency tree so that cargo will understand these dependencies to be
re-usable across cargo implementations. This eliminates re-building jsrust
and some of its dependencies twice, and reduces the number of crates compiled
in the tree by about 90 in testing on linux.

Differential Revision: https://phabricator.services.mozilla.com/D9041
2018-10-18 10:39:05 +00:00
Chris Manchester
16e9253e88 Bug 1499196 - Update spidermonkey rust search path to look for rust artifacts rooted in the topobjdir. r=bbouvier
Differential Revision: https://phabricator.services.mozilla.com/D9040
2018-10-18 10:24:28 +00:00
Dorel Luca
17253c6f93 Merge mozilla-central to mozilla-inbound 2018-11-09 19:41:24 +02:00
David Major
437a5e1375 Bug 1495879: Fix register macros and re-enable wasm on aarch64-windows. r=luke 2018-11-09 12:43:41 -05:00
Luke Wagner
2544ba1515 Bug 1505271 - Baldr: only create one wasm exception handler thread per process, and lazily (r=bbouvier) 2018-11-09 09:44:33 -06:00
Luke Wagner
7d1be4a310 Bug 1505271 - Baldr: find the JSContext via fp in the signal handler (r=bbouvier) 2018-11-09 09:44:27 -06:00
Tom Schuster
ed2c2ccfad Bug 1334813 - Enable passing test262. r=me 2018-11-09 14:27:07 +01:00
Dan Horák
1aa4b36f30 Bug 1503968 - set Watchdog thread stack size to at least platform minimal stack size. r=bholley 2018-11-05 00:51:00 +02:00
Yoshi Huang
2d73be3784 Bug 1485299 - Add telemethy for nursery promotion rate. r=jonco, data-review=chutten
Add telemethy for Nursery promotion rate.

Data review form: https://bugzilla.mozilla.org/attachment.cgi?id=9023677
Data review response: https://bugzilla.mozilla.org/show_bug.cgi?id=1485299#c10
2018-11-09 09:53:57 +01:00
Tooru Fujisawa
5f070ef61e No Bug - Add bug numbers for FIXME comments in BinAST code. r=me DONTBUILD comment only 2018-11-05 13:45:09 +09:00
Paul Bone
5a2271d90b Bug 1504080 - Fix two comments in nursery code r=jonco
+ Comment currentStartChunk_ in more detail
 + Remove misplaced comment about allocation during maybeResizeNursery, this
   code no-longer does any allocation.

--HG--
extra : source : 2e1fdb726acdb11bc62301693d1a7fce82ae64db
extra : histedit_source : 241bf679544db318bea08086f88b8bce36f92e41
2018-10-10 20:35:40 +11:00
Paul Bone
1d1451bbc5 Bug 1504080 - Add Nursery::stats() r=jonco
Add a new function for a commonly accesses structure.

--HG--
extra : source : fd1d0c5f34ec8402895db683a163d3c1b26bc2b5
extra : histedit_source : c9335f652332b5462c47c60a0ab49f76ef5a61f7
2018-11-01 13:20:40 +11:00
Brindusan Cristian
ab89743379 Backed out 9 changesets (bug 1499507) for build bustages on /profiler/core/platform.cpp. CLOSED TREE
Backed out changeset 4c79a5557d7b (bug 1499507)
Backed out changeset 35d05a53e0a9 (bug 1499507)
Backed out changeset 9254e6c721b3 (bug 1499507)
Backed out changeset cf40b044af3f (bug 1499507)
Backed out changeset 76dd85b9aaf7 (bug 1499507)
Backed out changeset 6256446f16c4 (bug 1499507)
Backed out changeset 41cede6bc7d2 (bug 1499507)
Backed out changeset 30476b824eb4 (bug 1499507)
Backed out changeset 24a9494155fe (bug 1499507)
2018-11-05 23:24:49 +02:00
Markus Stange
ed18047939 Bug 1499507 - Allow the compiler to generate a non-atomic increment instruction for the stack pointer increment. r=njn
This change reduces the binary size on macOS x64 by around 50KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. It's a bit hard to read because %r12 and %rbx swap their
function, but what happens in this method is that "movq       %r12, %rcx" goes
away, and the two instructions "leal       0x1(%r12) %eax" and
"movl       %eax, 0x10(%rbx)" turn into an "incl       0x10(%r12)".
So the old code was preserving the original value of profilingStack->stackPointer
in a register, and then using it later to compute the incremented stackPointer.
The new code uses an "incl" instruction for the stackPointer increment and
doesn't worry that the stackPointer value might have changed since the stack
size check at the start of the function. (It can't have changed.)

before: %rbx has the ProfilingStack*, %r12 has profilingStack->stackPointer
after: %r12 has the ProfilingStack*, %rbx has profilingStack->stackPointer

@@ -3,37 +3,35 @@
    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       0x80(%rdi), %rbx
-   movq       %rbx, -40(%rbp)
-   testq      %rbx, %rbx
+   movq       0x80(%rdi), %r12
+   movq       %r12, -40(%rbp)
+   testq      %r12, %r12
    je         loc_xxxxx

-   movl       0x10(%rbx), %r12d
-   cmpl       (%rbx), %r12d
+   movl       0x10(%r12), %ebx
+   cmpl       (%r12), %ebx
    jae        loc_xxxxx

-   movq       0x8(%rbx), %rax
-   movq       %r12, %rcx
-   shlq       $0x5, %rcx
-   leaq       aAttr, %rdx                                 ; "Attr"
-   movq       %rdx, (%rax,%rcx)
-   leaq       aSpecified, %rdx                            ; "specified"
-   movq       %rdx, 0x8(%rax,%rcx)
-   leaq       -40(%rbp), %rdx
-   movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x3a1, 0x1c(%rax,%rcx)
-   leal       0x1(%r12), %eax
-   movl       %eax, 0x10(%rbx)
+   movq       0x8(%r12), %rax
+   shlq       $0x5, %rbx
+   leaq       aAttr, %rcx                                 ; "Attr"
+   movq       %rcx, (%rax,%rbx)
+   leaq       aSpecified, %rcx                            ; "specified"
+   movq       %rcx, 0x8(%rax,%rbx)
+   leaq       -40(%rbp), %rcx
+   movq       %rcx, 0x10(%rax,%rbx)
+   movl       $0x3a1, 0x1c(%rax,%rbx)
+   incl       0x10(%r12)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
    movq       %rcx, (%r14)
    movq       -40(%rbp), %rax
@@ -47,11 +45,11 @@
    popq       %rbx
    popq       %r12
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

-   movq       %rbx, %rdi
+   movq       %r12, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
    jmp        loc_xxxxx

Depends on D9205

Differential Revision: https://phabricator.services.mozilla.com/D9206

--HG--
extra : moz-landing-system : lando
2018-11-05 20:58:39 +00:00
Markus Stange
e93f3e479f Bug 1499507 - Add AUTO_PROFILER_LABEL_DYNAMIC_FAST which allows specifying flags. r=njn
Depends on D9203

Differential Revision: https://phabricator.services.mozilla.com/D9204

--HG--
extra : moz-landing-system : lando
2018-11-05 20:57:30 +00:00
Markus Stange
30477de777 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

Differential Revision: https://phabricator.services.mozilla.com/D9203

--HG--
extra : moz-landing-system : lando
2018-11-05 20:56:50 +00:00
Markus Stange
9bed7de565 Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

Differential Revision: https://phabricator.services.mozilla.com/D9199

--HG--
extra : moz-landing-system : lando
2018-11-05 20:56:17 +00:00
Markus Stange
4c59aa793c Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

Differential Revision: https://phabricator.services.mozilla.com/D9195

--HG--
extra : moz-landing-system : lando
2018-11-05 20:55:10 +00:00
Markus Stange
9a37fd5f7a Bug 1499507 - Make ensureCapacitySlow infallible. r=emilio
This eliminates a few instructions from each inlined instance of
AutoProfilerLabel because we no longer need to handle allocation failure in the
inlined code.
I think this allocation should be fine to make infallible: The allocation size
is limited by the thread's stack depth, and we only hit this code path when the
stack is the deepest it's ever been during the thread's life time.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build, it really just eliminates one test and one jump at the very end
of the method:

@@ -9,30 +9,29 @@
    movq       %rcx, %r14
    movq       %rdx, %r15
    movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

    movl       0x10(%rbx), %r12d
-   cmpl       %r12d, (%rbx)
-   jbe        loc_xxxxx
+   cmpl       (%rbx), %r12d
+   jae        loc_xxxxx

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
    movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
-
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
@@ -50,12 +49,9 @@
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

    movq       %rbx, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
-   testb      %al, %al
-   jne        loc_xxxxx
-
    jmp        loc_xxxxx

Depends on D9192

Differential Revision: https://phabricator.services.mozilla.com/D9193

--HG--
extra : moz-landing-system : lando
2018-11-05 20:55:03 +00:00
Markus Stange
67e1a749b2 Bug 1499507 - Fold the 'profiler is active' check into the 'JSContext has a non-null PseudoStack' check. r=sfink
This eliminates a few instructions from every profiler label and saves code size.
We have around 9000 WebIDL constructors + methods + getters + setters which all
have an inlined instance of this code.

This change reduces the binary size on Linux x64 by around 160KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT, %rax ; __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT
-   movl       (%rax), %eax
-   testl      %eax, %eax
-   js         loc_xxxxx
-
-   movq       $0x0, -40(%rbp)
-   jmp        loc_xxxxx
-
-   movq       0x78(%rdi), %rbx
+   movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

    movl       0x10(%rbx), %r12d
    cmpl       %r12d, (%rbx)
    jbe        loc_xxxxx

Differential Revision: https://phabricator.services.mozilla.com/D9192

--HG--
extra : moz-landing-system : lando
2018-11-05 20:53:58 +00:00
Narcis Beleuzu
2c6edfdde8 Backed out 9 changesets (bug 1499507) for bustages on ProfileBuffer.cpp . CLOSED TREE
Backed out changeset 541186291b88 (bug 1499507)
Backed out changeset 8a3f4acbad3b (bug 1499507)
Backed out changeset f427afc392b0 (bug 1499507)
Backed out changeset 58dc19fb2b76 (bug 1499507)
Backed out changeset 9225e9aea377 (bug 1499507)
Backed out changeset ca23a517da63 (bug 1499507)
Backed out changeset 16d6c90333de (bug 1499507)
Backed out changeset bc134fe1722a (bug 1499507)
Backed out changeset 4a9c9a91182c (bug 1499507)
2018-11-05 21:48:11 +02:00
Markus Stange
9a9d15172a Bug 1499507 - Allow the compiler to generate a non-atomic increment instruction for the stack pointer increment. r=njn
This change reduces the binary size on macOS x64 by around 50KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. It's a bit hard to read because %r12 and %rbx swap their
function, but what happens in this method is that "movq       %r12, %rcx" goes
away, and the two instructions "leal       0x1(%r12) %eax" and
"movl       %eax, 0x10(%rbx)" turn into an "incl       0x10(%r12)".
So the old code was preserving the original value of profilingStack->stackPointer
in a register, and then using it later to compute the incremented stackPointer.
The new code uses an "incl" instruction for the stackPointer increment and
doesn't worry that the stackPointer value might have changed since the stack
size check at the start of the function. (It can't have changed.)

before: %rbx has the ProfilingStack*, %r12 has profilingStack->stackPointer
after: %r12 has the ProfilingStack*, %rbx has profilingStack->stackPointer

@@ -3,37 +3,35 @@
    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       0x80(%rdi), %rbx
-   movq       %rbx, -40(%rbp)
-   testq      %rbx, %rbx
+   movq       0x80(%rdi), %r12
+   movq       %r12, -40(%rbp)
+   testq      %r12, %r12
    je         loc_xxxxx

-   movl       0x10(%rbx), %r12d
-   cmpl       (%rbx), %r12d
+   movl       0x10(%r12), %ebx
+   cmpl       (%r12), %ebx
    jae        loc_xxxxx

-   movq       0x8(%rbx), %rax
-   movq       %r12, %rcx
-   shlq       $0x5, %rcx
-   leaq       aAttr, %rdx                                 ; "Attr"
-   movq       %rdx, (%rax,%rcx)
-   leaq       aSpecified, %rdx                            ; "specified"
-   movq       %rdx, 0x8(%rax,%rcx)
-   leaq       -40(%rbp), %rdx
-   movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x3a1, 0x1c(%rax,%rcx)
-   leal       0x1(%r12), %eax
-   movl       %eax, 0x10(%rbx)
+   movq       0x8(%r12), %rax
+   shlq       $0x5, %rbx
+   leaq       aAttr, %rcx                                 ; "Attr"
+   movq       %rcx, (%rax,%rbx)
+   leaq       aSpecified, %rcx                            ; "specified"
+   movq       %rcx, 0x8(%rax,%rbx)
+   leaq       -40(%rbp), %rcx
+   movq       %rcx, 0x10(%rax,%rbx)
+   movl       $0x3a1, 0x1c(%rax,%rbx)
+   incl       0x10(%r12)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
    movq       %rcx, (%r14)
    movq       -40(%rbp), %rax
@@ -47,11 +45,11 @@
    popq       %rbx
    popq       %r12
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

-   movq       %rbx, %rdi
+   movq       %r12, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
    jmp        loc_xxxxx

Depends on D9205

Differential Revision: https://phabricator.services.mozilla.com/D9206

--HG--
extra : moz-landing-system : lando
2018-11-05 19:12:38 +00:00
Markus Stange
092da52423 Bug 1499507 - Add AUTO_PROFILER_LABEL_DYNAMIC_FAST which allows specifying flags. r=njn
Depends on D9203

Differential Revision: https://phabricator.services.mozilla.com/D9204

--HG--
extra : moz-landing-system : lando
2018-11-05 19:10:57 +00:00
Markus Stange
eeb95b0846 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

Differential Revision: https://phabricator.services.mozilla.com/D9203

--HG--
extra : moz-landing-system : lando
2018-11-05 19:10:12 +00:00
Markus Stange
d026ceb9e3 Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

Differential Revision: https://phabricator.services.mozilla.com/D9199

--HG--
extra : moz-landing-system : lando
2018-11-05 19:09:21 +00:00
Markus Stange
000dc83f31 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

Differential Revision: https://phabricator.services.mozilla.com/D9195

--HG--
extra : moz-landing-system : lando
2018-11-05 19:07:45 +00:00
Markus Stange
354b56c30c Bug 1499507 - Make ensureCapacitySlow infallible. r=emilio
This eliminates a few instructions from each inlined instance of
AutoProfilerLabel because we no longer need to handle allocation failure in the
inlined code.
I think this allocation should be fine to make infallible: The allocation size
is limited by the thread's stack depth, and we only hit this code path when the
stack is the deepest it's ever been during the thread's life time.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build, it really just eliminates one test and one jump at the very end
of the method:

@@ -9,30 +9,29 @@
    movq       %rcx, %r14
    movq       %rdx, %r15
    movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

    movl       0x10(%rbx), %r12d
-   cmpl       %r12d, (%rbx)
-   jbe        loc_xxxxx
+   cmpl       (%rbx), %r12d
+   jae        loc_xxxxx

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
    movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
-
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
@@ -50,12 +49,9 @@
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

    movq       %rbx, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
-   testb      %al, %al
-   jne        loc_xxxxx
-
    jmp        loc_xxxxx

Depends on D9192

Differential Revision: https://phabricator.services.mozilla.com/D9193

--HG--
extra : moz-landing-system : lando
2018-11-05 19:06:56 +00:00
Markus Stange
932098227f Bug 1499507 - Fold the 'profiler is active' check into the 'JSContext has a non-null PseudoStack' check. r=sfink
This eliminates a few instructions from every profiler label and saves code size.
We have around 9000 WebIDL constructors + methods + getters + setters which all
have an inlined instance of this code.

This change reduces the binary size on Linux x64 by around 160KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT, %rax ; __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT
-   movl       (%rax), %eax
-   testl      %eax, %eax
-   js         loc_xxxxx
-
-   movq       $0x0, -40(%rbp)
-   jmp        loc_xxxxx
-
-   movq       0x78(%rdi), %rbx
+   movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

    movl       0x10(%rbx), %r12d
    cmpl       %r12d, (%rbx)
    jbe        loc_xxxxx

Differential Revision: https://phabricator.services.mozilla.com/D9192

--HG--
extra : moz-landing-system : lando
2018-11-05 19:06:08 +00:00
Matthew Gaudet
81e2f77dbd Bug 1504727: Remove last vestiges of C1 Spewer r=IainIreland
Differential Revision: https://phabricator.services.mozilla.com/D10923

--HG--
extra : moz-landing-system : lando
2018-11-05 16:29:49 +00:00
Gurzau Raul
8f82fd493f Merge inbound to mozilla-central. a=merge 2018-10-30 00:00:56 +02:00
Gurzau Raul
60b38b72af Merge autoland to mozilla-central. a=merge 2018-10-29 23:59:38 +02:00