Commit Graph

66309 Commits

Author SHA1 Message Date
André Bargull
f1e256e606 Bug 813836: Optimize comparisons of single-element strings. r=jandem 2018-08-10 08:56:47 -07:00
Jon Coppeard
58a3b0b973 Bug 1482153 - Replace ModuleObject's host defined field with one on top-level JSScripts r=jandem r=hsivonen 2018-08-13 16:39:11 +01:00
André Bargull
0d22680486 Bug 1482364: Allow bitwise value comparison for strict-equals even when object emulates undefined. r=evilpie 2018-08-10 02:58:54 -07:00
qiaopengcheng
d8d43f5ce1 Bug 1483093 - Fix mips64 compiling error for ma_cmp_set(). r=dragan.mladjenovic
--HG--
extra : rebase_source : e01fcdde2da3993a7fb982dfe686e6441771782c
2018-08-14 01:56:00 +03:00
Jon Coppeard
98ee5533c3 Bug 1469004 - Add an API to create a module namespace object r=anba 2018-08-13 16:39:14 +01:00
Jon Coppeard
49f67310f0 Bug 1483169 - Output argument index when compartment checks fail r=jandem 2018-08-14 14:39:37 +01:00
Ted Campbell
14866f377b Bug 1482931 - Simplify some static initializers in js/src. r=jandem
MozReview-Commit-ID: JLNqziLmGrx
2018-08-14 09:13:45 -04:00
Ted Campbell
c4e3b1ae56 Bug 1482931 - Cleanup const-ness of statics in js/src. r=waldo
Mark read-only global data as const. Replacing |const char* x[]| with
|const char* const x[]|. Replacing |static const char* x = "..."| with
|static const char x[] = "..."|.

MozReview-Commit-ID: Ftv7ziIAWGh
2018-08-14 09:13:45 -04:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Paul Bone
bb08d12025 Bug 1473213 (Part 5) - Only record allocation counts on Nightly builds r=jonco
--HG--
extra : rebase_source : 72a87eec0d4006aa8d6e37a43c0d27d50c7c41b1
extra : source : 29f9f3ab9b416448db79f5ec5beb0c092ba8f6be
2018-07-26 00:35:25 +10:00
Paul Bone
9a888e6cc5 Bug 1473213 (Part 4) - Add cells allocated statistics r=sfink
--HG--
extra : rebase_source : 4a74f930e66b65a3302f15ec28f79179bdabc2e1
extra : source : 129c9ab66f595bf72afebfdeba87a587578173a2
2018-08-08 12:54:50 +10:00
Paul Bone
ce08d1bebc Bug 1473213 (Part 3) - Refactor JSContext code for changing zones r=sfink
* Introduce a setZone method that changes the zone and the freelist.
 * leaveAtomsZone() private

--HG--
extra : rebase_source : 7bb624c9091aaa585211577c486288a548926a71
extra : source : 96e57dd562b890bac534d88ff265653d5a00f61c
2018-08-08 12:05:59 +10:00
Paul Bone
271f7a7664 Bug 1473213 (Part 2) - add a comment about an invariant required by the JIT r=sfink
--HG--
extra : rebase_source : b5fc8c7e4099fe57f4d5ed5d21af9d88b8a35316
extra : intermediate-source : e40d822d886b47350c28c1c4cb6c45d335fc5b1b
extra : source : 4e59349dd9776f329c9545aa994c6f490f11d105
2018-07-16 11:36:49 +10:00
Paul Bone
6e12af80d7 Bug 1473213 (Part 1) - Track the number of tenured cells r=jonco
--HG--
extra : rebase_source : 96739a13fe0d44bcb00819cf7422ef97bc97f812
extra : intermediate-source : 8a10fc261acb99c7e8bb4fcb4ee0975c5166990d
extra : source : 445b672aa024fdfca38a2e819f54bcbf28e922dd
2018-07-20 15:09:01 +10:00
André Bargull
4b9f21c0dd Bug 1482846 - Part 4: Remove unused code from BytecodeUtil. r=tcampbell
--HG--
extra : histedit_source : 1b0d6e60f3151801b23cc6f007bd31c554c3bab7
2018-08-13 04:37:21 -07:00
André Bargull
6a9925782f Bug 1482846 - Part 3: Avoid allocating empty arrays and parsing byte code when result is not used. r=tcampbell
--HG--
extra : histedit_source : a81e48ffeeb0aecaa949208d398ceead2c670bfb
2018-08-13 04:38:47 -07:00
André Bargull
bad79778b3 Bug 1482846 - Part 2: Parse byte code only once when decompiling an expression. r=tcampbell
--HG--
extra : histedit_source : 3074d73faaa91961fc87d237241e366379fbc005
2018-08-13 04:40:24 -07:00
André Bargull
fba1c5de25 Bug 1482846 - Part 1: Mark BytecodeParser methods as const. r=tcampbell
--HG--
extra : histedit_source : 9d1f905b655c02839a29b902f2f500f64c5e3c7a
2018-08-13 04:41:01 -07:00
André Bargull
0250ea3e9f Bug 1482359: Use more JSOP_STRICTEQ optimizations for Object.is(). r=jandem 2018-08-13 08:21:03 -07:00
Mike Hommey
f6560362a9 Bug 1480004 - Normalize optimization level passed to the linker when doing LTO with clang. r=froydnj 2018-08-14 07:25:09 +09:00
Jeff Walden
0885260ab1 Bug 1478892 - Instantiate Parser for UTF-8 source text. r=arai
--HG--
extra : rebase_source : a9d318c40f9524583406d21b8b75c19f7848220f
2018-08-09 21:04:22 -07:00
Jeff Walden
74305f6c2c Bug 1478892 - Instantiate GeneralParser for UTF-8 source text. r=arai
--HG--
extra : rebase_source : 467d3e2bf6835586c6eb8a2c6ce8f69bd23827b9
2018-07-30 15:35:35 -07:00
Steve Fink
a89504bc45 Bug 1479672 - Force use of gcc for hazard analysis, r=jonco
--HG--
extra : topic : gcstats.thresh
extra : rebase_source : 7b20e570a5b5f040fff7b0a030376525ca5a408d
2018-07-05 12:40:32 -07:00
Steve Fink
37fcd9834c Bug 1479673 - Trivial return value change, r=jonco
JS::ubi::Concrete<T> inherits from JS::ubi::Base but not JS::ubi::Node, so the bare 'Size' in the class declaration refers to Base::Size, not Node::Size. (Note that they're the same underlying type.)

--HG--
extra : topic : gcstats.thresh
extra : rebase_source : 2dd9ccca9e458e4f10bdbb8aff58f08732e712c7
2018-07-11 16:58:23 -07:00
Steve Fink
22ee12770e Bug 1480843 - Avoid hazard by controlling order of operations so that we GC before using any GC heap pointers, r=bz
--HG--
extra : topic : gcstats.thresh
extra : rebase_source : b9e31b5b0da9924bee110b689f16989cf578cb2e
2018-08-03 10:47:21 -07:00
Steve Fink
8aafec573a Bug 1480927 - Whitelist some more nsISupports virtual functions, r=jonco
--HG--
extra : topic : gcstats.thresh
extra : rebase_source : 11542a69c52ae54add2bdd598d702ecdf6856386
2018-08-03 09:22:32 -07:00
Csoregi Natalia
fc2133e0bc Backed out 2 changesets (bug 1482153, bug 1469004) for assertion failures at ModuleScript.cpp:59. CLOSED TREE
Backed out changeset 8289b70dc0db (bug 1469004)
Backed out changeset 4129380f8318 (bug 1482153)
2018-08-13 19:37:07 +03:00
André Bargull
b8d131ad5c Bug 1480819 - Part 7: Add comments, constants, and better variable names to RegExp stubs. r=mgaudet 2018-08-10 05:43:46 -07:00
André Bargull
2f9a5fff1d Bug 1480819 - Part 6: Add helper methods to MacroAssembler to work with CharEncoding and reduce code duplication. r=mgaudet 2018-08-10 08:50:28 -07:00
André Bargull
10eb8b5dd5 Bug 1480819 - Part 5: Add registers and encoding type as members to CreateDependentString. r=mgaudet 2018-08-03 09:12:53 -07:00
André Bargull
26c3b7560f Bug 1480819 - Part 4: Don't save non-volatile registers. r=mgaudet 2018-08-03 09:12:04 -07:00
André Bargull
5e8e900bbc Bug 1480819 - Part 3: Reorder temporary register names in generateRegExpMatcherStub. r=mgaudet 2018-08-03 09:10:46 -07:00
André Bargull
7a708d17e7 Bug 1480819 - Part 2: Switch the temporary variables used for CopyStringChars in CreateDependentString::generate. r=mgaudet 2018-08-03 09:09:40 -07:00
André Bargull
df77deb80c Bug 1480819 - Part 1: Remove dead and unnecessary code to restore registers from generateRegExpMatcherStub. r=mgaudet 2018-08-03 09:08:50 -07:00
Logan F Smyth
4abb1e0558 Bug 1378808 - Use ::Arguments or ::PropertyName location for method call column offsets. r=jorendorff, r=ckerschb
--HG--
extra : rebase_source : 69612b61b1cfbfd26856e285d63600ce56e95ec3
extra : source : 6c6a609463ab5d71e475354cab8c3ff323d0571d
2018-07-12 11:51:17 -07:00
Logan F Smyth
7ca727c2d0 Bug 1378808 - Add a new ParseNodeKind::PropertyName to hold location information about property access name. r=jorendorff
MozReview-Commit-ID: J4vHz4ln5Zt

--HG--
extra : rebase_source : 05ff8c402e682db139b7c87a8ec2f59575eb34d0
extra : intermediate-source : 6dd9c641346afe439fb10c028becf0a7b1f0aedc
extra : source : 3b4f4db5d3d78170faf00bdf9fe2a562ad155fd5
2018-07-12 11:29:05 -07:00
Logan F Smyth
ede9c30b6f Bug 1378808 - Add a new ParseNodeKind::Arguments node type for call argument lists. r=jorendorff
MozReview-Commit-ID: 7L4nNHjVoZo

--HG--
extra : rebase_source : 4140fd0df54bece716e4c5e0d68fbb3df16a6268
extra : source : e732697778c260c413047531e372a24286e0b667
2018-07-12 11:24:59 -07:00
Jon Coppeard
b094eb1815 Bug 1469004 - Add an API to create a module namespace object r=anba 2018-08-13 16:39:14 +01:00
Jon Coppeard
623032e1f0 Bug 1482153 - Replace ModuleObject's host defined field with one on top-level JSScripts r=jandem r=hsivonen 2018-08-13 16:39:11 +01:00
Matthew Gaudet
1f4ef0d8fa Bug 1481556 - Compute the appropriate stub field index instead of assuming it based on execution order r=jandem
--HG--
extra : rebase_source : e0a82f4c09c0aa66281dc3ceadd0824c9ffa3c75
2018-08-07 13:50:18 -04:00
Matthew Gaudet
180ce7a7f1 Bug 1341261: [Part 9] Rename CacheRegisterAllocator::loadDouble to ensureDoubleRegister r=tcampbell
--HG--
extra : rebase_source : f9779fe958439726341429e09a022c62006716ad
2018-08-10 09:18:42 -04:00
Matthew Gaudet
916718b719 Bug 1341261: [Part 8] Dump opcodes for CompareIC to CacheIR logs r=tcampbell
--HG--
extra : rebase_source : f1ebf0d14afe57417492f4d8c3b0aa85fa92e46d
2018-06-15 17:15:24 -07:00
Matthew Gaudet
f4f4a7ea1a Bug 1341261: [Part 7] Remove now-unused SharedIC Machinery for CompareICs r=tcampbell
Also, relocate no-longer SharedIC machinery to BaselineIC.cpp

--HG--
extra : rebase_source : 050524cf338aa5335fbf12b918c9990882d7ad3d
2018-06-08 17:28:21 -04:00
Matthew Gaudet
730d598e9e Bug 1341261: [Part 6] Teach the Baseline Inspector about the new CacheIR ops r=tcampbell
--HG--
extra : rebase_source : 87fabc832341afc9e4108223fb3ba1d08537d8b2
2018-06-08 16:46:23 -04:00
Matthew Gaudet
618b094127 Bug 1341261: [Part 5] Number+Null+Undefined Comparisons r=tcampbell
--HG--
extra : rebase_source : 2ce16207c1c2166e45139d2268ded71431346557
2018-08-03 10:31:34 -04:00
Matthew Gaudet
f1981b99c3 Bug 1341261: [Part 4] Compare Undefined/Null+Object r=tcampbell
--HG--
extra : rebase_source : a96f7567fee9f43009d13b35c28de2cb04237b73
2018-06-05 13:13:37 -04:00
Matthew Gaudet
f0d1895741 Bug 1341261: [Part 3] Support Number/Number Comparisons in CacheIR r=tcampbell
As a bonus, also cleanup a superflous trackAttached

--HG--
extra : rebase_source : c2a78aa40f3f5e704ef5aab158584e10403bf905
2018-05-17 16:29:28 -04:00
Matthew Gaudet
b796885ce9 Bug 1341261: [Part 2] Support Int32/Int32 Comparisons in CacheIR r=tcampbell
--HG--
extra : rebase_source : 31c5223109613e9301aea795b9f35144216ffb4b
2018-05-17 12:09:14 -04:00
Matthew Gaudet
56663db2cb Bug 1341261: [Part 1] Enable CacheIR Compare ICs in Ion r=tcampbell
--HG--
extra : rebase_source : 788f7bb1eda50759165850e9f78ba41985563f0c
2018-05-15 16:10:50 -04:00
Matthew Gaudet
080064785c Bug 1341261: [Part 0] Enhance compare test case r=tcampbell
--HG--
extra : rebase_source : 29e7b183e0ea5452aa5af9a700ce5f0fd9a67079
2018-06-15 15:56:39 -07:00