Граф коммитов

249 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard e56208cb40 Bug 1463462 - Delay gray marking assertions when we are doing incremental gray marking r=sfink 2018-12-06 16:28:14 -05:00
Jon Coppeard 6f81506124 Bug 1463462 - Make gray marking assertions call a JSAPI function r=sfink 2018-12-06 16:28:10 -05:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan de Mooij bccfe7c569 Bug 1508065 - Change JS_PUBLIC_{API,DATA} and JS_FRIEND_{API,DATA} to be more like similar macros to avoid confusing clang-format. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12256

--HG--
extra : moz-landing-system : lando
2018-11-19 17:02:47 +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
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 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 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
Jan de Mooij ab644b087f Bug 1488698 - Always use braces for if/for/while statements in js/public. r=jandem
--HG--
extra : rebase_source : 075f0747c9256fee67925853b501b7a3549cebba
2018-09-06 12:11:07 +02:00
Steve Fink b0006a2c76 Bug 1479962 - Add JS_HAZ_ROOTED_BASE for AutoGCRooter, which assumes all descendants are rooted, r=jonco
--HG--
extra : topic : hazard
extra : rebase_source : a75561cdf2f71e34a630737dcf832d05d95974b0
2018-07-24 16:52:43 -07:00
Nicholas Nethercote b85493f609 Bug 1477626 - Move js::Hash{Set,Map} into MFBT. r=Waldo
The main change is that the patch copies js/public/HashTable.h to
mfbt/HashTable.h, and then changes it as follows.

- Changes `js` namespaces to `mozilla` (and removes some now-unnecessary
  `mozilla::` qualifiers).

- Changes the default AllocPolicy from the SpiderMonkey-specific
  `TempAllocPolicy` to the generic `MallocAllocPolicy`.

- Adds `#include "AllocPolicy.h"` (like mfbt/Vector.h).

- Changes `JS_DEBUG` use to `DEBUG`.

- Minor comment updates, as necessary.

js/public/HashTable.h is now tiny, holding just a few renamings of things from
the `mozilla` namespace into the `js` namespace to minimize churn elsewhere.
(Those renamings keep `TempAllocPolicy` as the default AllocPolicy for
js::Hash{Set,Map}.)

Also, various template specializations had to be moved from the `js` namespace
to the `mozilla` namespace to avoid compile errors.

MozReview-Commit-ID: GS9Qn9YeYDA

--HG--
rename : js/public/HashTable.h => mfbt/HashTable.h
2018-07-26 20:15:49 +10:00
Ted Campbell ab67c3fb81 Bug 1471272 - Add [SMDOC] tags for in-source documentation. r=jandem,nbp
MozReview-Commit-ID: I038aYgvwe4
2018-06-28 15:23:25 -04:00
Jan de Mooij f7fb3be6ec Bug 1466121 part 1 - Rename JSCompartment to JS::Compartment. r=luke
--HG--
extra : rebase_source : cd7140ecda54f0caa02a96f562167b3c9a107450
2018-06-07 16:44:40 +02:00
Jan de Mooij 156284156a Bug 1363214 - Remove JS::Realm/JSCompartment inheritance. r=jonco
--HG--
extra : rebase_source : ad63de7c6676532640659d1fccced7f83798e06d
2018-06-06 14:30:52 +02:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jan de Mooij 09c4068fa0 Bug 1464134 part 1 - Fix various places to use Realm instead of JSCompartment. r=luke 2018-05-31 11:28:48 +02:00
Philip Chimento fb2e0702aa Bug 1464912 - Add exposeToActiveJS specialization for JSString. r=sfink 2018-05-28 14:47:33 -07:00
Jon Coppeard d3bd086af9 Bug 1460341 - Replace GCPolicy<T>::initial() with SafelyInitialized<T>() r=Waldo 2018-05-25 10:01:25 +01:00
Jan de Mooij 969bbf2190 Bug 1461938 part 1 - Store JS::Realm* instead of JSCompartment* in JSContext. r=luke
--HG--
extra : rebase_source : 7af7e5854bdbe0d750a13e0e8c70a71c2c5f88c3
2018-05-17 18:02:40 +02:00
André Bargull 4782ef15d6 Bug 1461928 - Part 2: Add length member to AutoArrayRooter and change AutoGCRooter's tag to an enum class. r=jonco
--HG--
extra : histedit_source : 5e1137c64bc3878264ed621852a1d952e4e8c1d7
2018-05-16 05:23:44 -07:00
Markus Stange 68470bc3c0 Bug 1461555 - Rename PseudoStack to ProfilingStack. r=njn
This also changes many references to the 'pseudo stack' to refer to the 'label
stack' instead. The label stack is one of the two stacks that are managed by
the profiling stack, the other stack being the JS interpreter stack.

MozReview-Commit-ID: Ed0YMMeCBY8

--HG--
extra : rebase_source : 5675d670f424c7d7dda04bafc2b3431fa2485e3c
2018-05-15 01:03:11 -04:00
Sebastian Hengst 0eb9d87997 merge mozilla-inbound to mozilla-central. a=merge 2018-04-12 22:20:13 +03:00
Sebastian Hengst ec371d68d4 Bug 525063 - Backing out js/public/ for violation of committing guidelines. a=backout 2018-04-12 22:15:26 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jan de Mooij 040949a5a7 Bug 1452982 part 1 - Use rt->mainContextFromOwnThread() instead of TlsContext.get() in some places. r=jonco 2018-04-12 13:04:13 +02:00
Jan de Mooij 68eeb821cb Bug 1449135 part 3 - Remove cooperative scheduling; bake in JSContext* in JIT code. r=luke 2018-03-27 18:00:27 +02:00
Jan de Mooij e8dc00e48a Bug 1447578 part 3 - Remove MacroAssembler rooting/tracing code. r=jonco
--HG--
extra : rebase_source : 848f220d63897a53c662b164eb7d5e98222f50bb
2018-03-21 16:58:04 +01:00
Jon Coppeard 8b9f1c68b9 Bug 1441783 - Remove unused AutoVectorRooter class and refactor r=sfink 2018-03-01 14:47:29 +00:00
Steve Fink 1c184b5229 Bug 903519 - Strings in the nursery: barriers, r=jonco
--HG--
extra : rebase_source : 64f8aa23157acad4f56c0fedfe7055976ecdccaa
extra : source : 7d56db66836900bc7758c6829b9235a3dd26947e
2017-07-28 16:46:38 -07:00
Markus Stange 49735a3768 Bug 785440 - Add js::GetContextProfilingStack in such a way that it can be inlined into non-JS code. r=sfink
This requires moving some things around. RootingContext is an existing
superclass of JSContext whose members are exposed in a header file, so we can
use it to expose the location of the geckoProfiler_ member to non-JS code.

MozReview-Commit-ID: 3oClAEVMsDr

--HG--
extra : rebase_source : f5943a710cddaa65cfdcb13370f95387caaf6892
extra : source : 2f5b804cef7b0888ac6121f5645bbb910750ed72
2018-01-05 14:35:00 +01:00
David Teller 4382d682b7 Bug 1377007 - GC for binjs-ref parser;r=sfink
MozReview-Commit-ID: EjZZ1ofm52t

--HG--
extra : rebase_source : 72f5f294fd11360260c6958520c980cd6dcb3427
2017-09-05 14:51:30 +02:00
Narcis Beleuzu 996e222d3a Backed out 7 changesets (bug 1377007) for web platform reftests failures on CSS2/borders. r=backout
Backed out changeset c30bc5d5adbc (bug 1377007)
Backed out changeset 33fdf9e531e2 (bug 1377007)
Backed out changeset 267abdb38036 (bug 1377007)
Backed out changeset 4a452c3ac115 (bug 1377007)
Backed out changeset e9310960c9e6 (bug 1377007)
Backed out changeset 8e5e61dfbbaf (bug 1377007)
Backed out changeset 9ac83e79e656 (bug 1377007)
2017-12-15 02:16:50 +02:00
David Teller e6ed8aa3c2 Bug 1377007 - GC for binjs-ref parser;r=sfink
MozReview-Commit-ID: EjZZ1ofm52t

--HG--
extra : rebase_source : 9bad473b5b8b90c8fcc6f6b114d004ce97bb0cff
2017-09-05 14:51:30 +02:00
Dorel Luca 20ddc8dfae Backed out 7 changesets (bug 1377007) for failing build bustage on Linux pgo and faling Cpp's jsapi-tests r=backout on a CLOSED TREE
Backed out changeset 9428a4ed7dec (bug 1377007)
Backed out changeset 4407b43a8aff (bug 1377007)
Backed out changeset 65a37a7f78a5 (bug 1377007)
Backed out changeset 276fe6d9b716 (bug 1377007)
Backed out changeset 1de46e60ffba (bug 1377007)
Backed out changeset 893e303e17ec (bug 1377007)
Backed out changeset 081a241e25d4 (bug 1377007)
2017-12-04 18:01:09 +02:00
David Teller 6cbd331d9e Bug 1377007 - GC for binjs-ref parser;r=sfink
MozReview-Commit-ID: EjZZ1ofm52t

--HG--
extra : rebase_source : f45fc9709f0c2d18baccdc27cba3476b7a610b61
2017-09-05 14:51:30 +02:00
Jon Coppeard d263df0462 Bug 1417123 - Move rooting-related classes from jspubtd.h to public/RootingAPI.h r=sfink 2017-11-16 12:21:07 +00:00
Jon Coppeard 0cfc710f84 Bug 1417123 - Move barrier function declarations to public/HeapAPI.h r=sfink 2017-11-16 12:21:07 +00:00
Jon Coppeard b6270c9da7 Bug 1400003 - Mark Heap<T> and barrier classes as MOZ_NON_MEMMOVABLE r=sfink r=froydnj 2017-10-09 10:03:20 +01:00
Jon Coppeard 2a820b9683 Bug 1402649 - Fix valid GC cell pointer asserts and error handling in module instantiation r=sfink 2017-09-26 10:23:14 +01:00
Yoshi Huang 42bd74780c Bug 1399399 - Move internal classes out of RootingAPI.h. r=jonco 2017-09-25 14:52:16 +08:00
Jon Coppeard ae251056d7 Bug 1399944 - Check for valid GC cell pointers in various places r=sfink 2017-09-19 12:31:31 +01:00
Jon Coppeard 08ac3244a6 Bug 1370869 - Don't copy scope data in XDR decode r=shu 2017-06-12 10:43:46 +01:00
Jon Coppeard e7b80c5987 Bug 1362977 - Rename CellSize to CellAlignBytes and improve the naming of related constants r=sfink 2017-05-09 11:38:32 +01:00
Bill McCloskey ee9f642133 Bug 1359245 - Remove CycleCollectedJSRuntime::mJSContext (r=mccr8,sfink)
This patch eliminates a field where we assume that there is one
CycleCollectedJSContext per runtime.

MozReview-Commit-ID: 5cEL5Ml6Y9v
2017-04-27 15:34:46 -07:00
Nick Fitzgerald 4fa7679d42 Bug 1277338 - Part 3: Make JS::Rooted and JS::PersistentRooted share the same MaybeWrapped<T> definition; r=sfink
They were previously using duplicate definitions and this DRYs them up. This is
needed because bindgen can't understand `mozilla::Conditional`, and so we want
to replace `MaybeWrapped` with something a little simpler when doing bindings
generation, and its easier if we don't have to repeat our desired replacement as
well.
2017-04-13 13:22:20 -07:00
Jon Coppeard 82cbd987a2 Bug 1338623 - Add a slower but more exact gray marking check for checking correctness r=sfink r=mccr8 2017-03-02 10:22:47 +00:00