Commit Graph

68354 Commits

Author SHA1 Message Date
hyperion
5dcce00594 Bug 1468749 trackAttached method added for TypeOfIrGenerator in CacheIR.cpp r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D13874

--HG--
extra : moz-landing-system : lando
2018-12-10 19:28:36 +00:00
André Bargull
fa4d94aff4 Bug 1488117: Export* modules can be uninstantiated when ModuleGetExportedNames is called. r=jonco 2018-12-05 03:14:12 -08:00
Tooru Fujisawa
17371adba7 Bug 1511385 - Re-format the stack comment in BytecodeEmitter and helper classes. r=jorendorff 2018-12-05 08:46:48 -05:00
Jeff Walden
c1c851f24f Bug 1504947 - Implement js::unicode::CountCodePoints(const Unit* begin, const Unit* end) for use in counting code points in a range, generally. r=tcampbell
--HG--
extra : rebase_source : f80ee3ffbf7fe47ded21cc34fa5a53f40c778a22
2018-11-10 23:15:58 -08:00
Jeff Walden
ef26ad7739 Bug 1504947 - Rename fillExcludingContext to fillExceptingContext, and distribute line/column-setting responsibilities across a version of it in any-chars code and a version in Unit-aware code. r=tcampbell
--HG--
extra : rebase_source : 779b840a84ba2e2530b69dd55b25fb01e67cdad6
2018-11-10 22:06:04 -08:00
Jeff Walden
59f399cbe3 Bug 1504947 - Implement EitherParser::computeLineAndColumn by calling the version of the function in GeneralTokenStreamChars, not the one that's going away in TokenStreamAnyChars. r=tcampbell
--HG--
extra : rebase_source : 17b882071cc03f983f34fccf5cb7e6e12e9899b6
2018-11-10 21:59:10 -08:00
Jeff Walden
e33ca05b5d Bug 1504947 - Change fake-column computations to work from (LineToken, uint32_t offset) inputs. r=tcampbell
--HG--
extra : rebase_source : b2518ff4566613388ad61c7c31ad1cf4036ce326
2018-11-10 21:56:01 -08:00
Jeff Walden
ee08a32df3 Bug 1504947 - Introduce a LineToken concept so that users can't accidentally do the work of determining a SourceCoords vector index twice. r=tcampbell
--HG--
extra : rebase_source : 420ef724b15f3046999b565b1d316076f0abd9e0
2018-11-10 21:52:57 -08:00
Jeff Walden
842515b435 Bug 1504947 - Use GeneralTokenStreamChars::computeLineAndColumn in more places so they're column-aware-ready. r=tcampbell
--HG--
extra : rebase_source : e8e0ce16450d652a4cba3001747053868197aca5
2018-11-10 21:44:29 -08:00
Jeff Walden
43249769ee Bug 1504947 - Rename a bunch of different SourceCoords concepts for increased readability. r=tcampbell
--HG--
extra : rebase_source : edbedb93e876885b0d23ad8ef98c5805d6979735
2018-11-10 21:43:03 -08:00
Jeff Walden
e0ba59551f Bug 1504947 - Common up some code in FunctionValidator to add a call-site line number into a function. r=tcampbell
--HG--
extra : rebase_source : 7979e59d31852ee1507c11dd09a10222051044c2
2018-11-10 21:24:31 -08:00
Jeff Walden
3de0d5df45 Bug 1504947 - Replace a FunctionBox::setStart function with a GeneralTokenStream::setFunctionStart that'll have proper column handling when the column-counting guts are redone. r=tcampbell
--HG--
extra : rebase_source : 8701405df092e6450abd4f052d6e766d6d9b6350
2018-11-10 21:23:52 -08:00
Jeff Walden
d0becfca72 Bug 1504947 - Add a GeneralTokenStream::computeLineAndColumn function that delegates to the any-chars version of the same, allowing the affected callers to be rewritten to their final form in advance of the guts of the UTF-8/16 column-counting fix. r=tcampbell
--HG--
extra : rebase_source : 2451e3eef63cce4b7e57835771e2a157b2cd14f5
2018-11-10 21:21:13 -08:00
Jon Coppeard
1a447840e2 Bug 1512045 - Simplify GC resets r=sfink 2018-12-11 18:26:06 +00:00
Jon Coppeard
14d6c98fec Bug 1512969 - Add cross-compartment marking assertion to catch errors in sweep groups calculation r=sfink 2018-12-06 16:27:21 -05:00
Denis Palmeiro
1d2e62c07a Bug 1497016 - Add an API to extract tracelogger data and use this within the gecko profiler r=mstange,djvj
Add a new class to extract tracelogger data using chunked buffers and use this to write the data out to the profiler JSON output.  Copying the data in chunks lets us minimize our memory overhead when writing out to the profiler so a large array of millions of elements does not need to be allocated ahead of time.

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

--HG--
extra : moz-landing-system : lando
2018-12-04 21:43:38 +00:00
Alex Gaynor
9522d924c4 Bug 1510272 - upgraded yaml-rust to 0.4.2; r=ted
This resolves a cargo audit warning in yaml-rust<4.1.

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

--HG--
extra : moz-landing-system : lando
2018-12-03 19:23:36 +00:00
Jason Orendorff
81c926f4e2 Bug 1510717 - Part 3: #ifdef out more code involving user-defined byte streams. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13295

--HG--
extra : moz-landing-system : lando
2018-12-04 19:55:43 +00:00
Jason Orendorff
5e251da382 Bug 1510717 - Part 2: Remove unused flag ReadableStreamController::Flag_TeeBranch. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13294

--HG--
extra : moz-landing-system : lando
2018-12-04 19:55:13 +00:00
Jason Orendorff
dcbc1a2506 Bug 1510717 - Part 1: Delete unused js::Class for abstract base class ReadableStreamController. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13293

--HG--
extra : moz-landing-system : lando
2018-12-04 19:54:33 +00:00
Jason Orendorff
71067f0b22 Bug 1510598 - Handle uncatchable errors in RejectPromiseWithPendingError. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D13434

--HG--
extra : moz-landing-system : lando
2018-12-04 19:54:05 +00:00
Jan de Mooij
0ea04a1064 Bug 1511837 - Simplify JSOP_SUPERFUN and JSOP_SUPERBASE by factoring out the callee lookup. r=arai
We now emit JSOP_CALLEE or JSOP_ENVCALLEE (a new op) to load the callee.
JSOP_SUPERFUN and JSOP_SUPERBASE no longer have to walk the scope/environment
chain.

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

--HG--
extra : moz-landing-system : lando
2018-12-04 19:48:34 +00:00
Matthew Gaudet
a2c6c03a73 Bug 1511168: Mark low-level memory management comment with SMDOC r=tcampbell DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D13733

--HG--
extra : moz-landing-system : lando
2018-12-04 18:19:51 +00:00
Jan de Mooij
0c52a64c75 Bug 1511210 part 3 - Remove unnecessary call to ensureHasTypes in jit::CreateThis. r=tcampbell
This was added in bug 833076 because back then TypeScript::SetThis assumed
non-null script->types. However since bug 875276 we don't need this anymore.

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:38:39 +00:00
Jan de Mooij
9a73ceef5f Bug 1511210 part 2 - Ensure we have a JitRealm in ICScript::create. r=tcampbell
Depends on D13650

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:29:55 +00:00
Jan de Mooij
7d64f9c2b3 Bug 1511210 part 1 - Check script warm up count before calling ensureJitRealmExists in CanEnterBaselineJIT. r=tcampbell
This is just a minor optimization, but it makes the bug fixed by part 2
reproducible when running jit-tests.

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:05:08 +00:00
Rob Wu
7d113fddff Bug 1504660 - Implement Xrays for instanceof r=bholley
Ensure that "a instanceof b" has Xray semantics, i.e. that when b is a
XrayWrapper, that the wrapped object's getters, `Symbol.hasInstance`
hook and proxy traps are not triggered.

The toolkit/components/mozintl/test/test_mozintlhelper.js test was
updated to explicitly waive Xrays, instead of relying on the previous
behavior where Xrays were automatically waived.

Depends on D11591

Depends on D11591

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:21:51 +00:00
Rob Wu
15f88c421b Bug 1504660 - Move js::InstanceOfOperator to JS::InstanceofOperator r=bholley
There is currently no public API to call the 'instanceof' handler
without triggering proxies. The public method, JS_HasInstance, may
skip the default logic if a class has a non-null JSHasInstanceOp.
(i.e. js/src/proxy/Proxy.cpp and js/src/ctypes/CTypes.cpp ).

To serve the need of the next patch (which needs to trigger the
instanceof logic without triggering the proxy), this patch publishes the
js::InstanceofOperator method.
JS::InstanceOfOperator is the new name, and the new capitalization
matches the name of the abstract operation in the ES6 specification.

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:21:48 +00:00
Lars T Hansen
0c89febd85 Bug 1508665 - Split BaseStackFrame to simplify it. r=bbouvier
BaseStackFrame is split into two parts:

- BaseStackFrameAllocator is now responsible for dealing with stack
  allocation and deallocation in all complex cases (which means
  everything except for the simple native masm.Push and masm.Pop
  cases).

- What's left of BaseStackFrame is then a simple-to-use API for the
  rest of the compiler that maintains and checks invariants and does
  various kinds of bookkeeping and hides the remaining differences
  between the chunky and non-chunky stacks.

The latter class inherits from the former because this is simplest
(and it's easy to accomplish with 'protected').

There are a couple of minor functional changes here:

- The variable maxFramePushed_ now actually records the maximum value
  of masm.framePushed, not the maximum stack height.  The new behavior
  is correct even with the chunky stack, since this value is used for
  stack overflow checking.  There should however be no observable
  changes because of this.  (Trivial reason: only ARM64 is affected
  and we have no ARM64 products.  Deeper reason: stacks are aligned at
  coarser boundaries than our stack chunks, and have lots of headroom.)

- Member variables tracking the stack height are now set up in a new
  method, onFixedStackAllocated(), which is called after
  beginFunction() has allocated the space for the Header and Local
  areas of the frame.  The old behavior was correct but very obscure.
  The new code is easier to understand.

--HG--
extra : rebase_source : b3a06eb2a845a76c671d3060fa9e77cb0e4e4b69
2018-11-26 15:15:59 +01:00
Lars T Hansen
0bc0543a7b Bug 1510193 - don't use TypedObjects if not available and necessary. r=jorendorff
We rely on TypedObjects for the experimental wasm GC feature, but that
feature is Nightly-only and we should not be touching TypedObjects if
we don't need them.  Furthermore we should just fail to compile
outright if wasm GC is enabled but TypedObjects are not.

--HG--
extra : rebase_source : e76a01ea25158aa6d3bd8760339e06be41dbba80
2018-11-29 10:10:02 +01:00
Gurzau Raul
a2ac06c603 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-12-01 16:33:38 +02:00
Coroiu Cristina
1ca919f882 Merge mozilla-central to autoland a=merge 2018-12-01 07:55:13 +02:00
Coroiu Cristina
3564dfde3b Merge inbound to mozila-central a=merge 2018-12-01 07:46:00 +02:00
Jan de Mooij
998a522b90 Bug 1511412 - Fix an issue with incremental sweeping and ICScript. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D13566

--HG--
extra : moz-landing-system : lando
2018-11-30 19:59:04 +00:00
Sean Stangl
3dcc5d23c4 Bug 1510334 - Lower LMulI and fix register corruption. Fixes arguments/args2d.js. r=nbp 2018-11-30 09:28:00 +02:00
Sean Stangl
ee1ecb8b3e Bug 1510735 - ARM64 codegen for LTestDAndBranch and LTestFAndBranch. r=nbp 2018-11-30 09:30:00 +02:00
Sean Stangl
02b6e39ab1 Bug 1510749 - The AArch64 ISR explicitly allows CSINC to accept ZR. r=nbp
--HG--
extra : rebase_source : 66b7a76d979bd2aa8c8b228cba39db9310287944
2018-11-30 11:21:00 +02:00
Matthew Gaudet
5918e7b11c Bug 1510604 - Add SPEW=help to explain structured spewer r=tcampbell
Also cleans out no longer valid IONFLAG bl-ic-stats

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

--HG--
extra : moz-landing-system : lando
2018-11-30 20:18:27 +00:00
Jeff Walden
e23179884e Bug 1506969 - Tests. r=tcampbell
--HG--
extra : rebase_source : 5e466fc9a5206829a0498ab8757c3d325db05eaa
2018-11-29 16:53:53 -08: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
Noemi Erli
8f0db72fb6 Merge inbound to mozilla-central. a=merge 2018-11-30 11:35:05 +02:00
arthur.iakab
b32fed790c Backed out changeset 5e65de3569fe (bug 1506969) for causing spidermonkey bustages on testScriptSourceCompression.cpp CLOSED TREE 2018-11-30 08:42:51 +02:00
Jeff Walden
6e3babac6f Bug 1506969 - Tests. r=tcampbell 2018-11-29 16:53:53 -08:00
Jeff Walden
e261cecaf9 Bug 1506969. r=tcampbell
--HG--
extra : rebase_source : 81aef7997b882e3640a0c83964e102375b4d1b77
2018-11-26 13:12:29 -08:00
Jeff Walden
ddf47e46d5 Bug 1510367 - More precisely specify the |breakpoint| function that ought be broken on in js/src/gdb/tests tests so that we don't mis-specify it on js::jit::AssemblerX86Shared::breakpoint. :-\ r=jimb
--HG--
extra : rebase_source : 77831855a52fc6294cf035613bd6ce4dc5dd10bd
2018-11-20 09:45:21 -08:00
Adam Holm
6fba94b2f0 Bug 1451591 - Flush CacheIR Spewer on regular intervals. r=mgaudet 2018-11-28 12:08:52 -08:00
Razvan Maries
d696b8eb57 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-11-29 23:46:52 +02:00
Jan de Mooij
b38ee74e4d Bug 1499644 - Move IC data out of BaselineScript. r=tcampbell
ICEntries and the fallback stub space are now stored in ICScript. The ICScript*
is stored in TypeScript to not increase sizeof(JSScript).

We need this for bug 1499324 but it also lets us greatly simplify the
BaselineDebugModeOSR code as this patch shows.

Note: some ICScript method definitions are still in BaselineJIT.cpp instead of
BaselineIC.cpp to make this patch easier to review. We could move them to
BaselineIC.cpp as a follow-up change.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 19:08:28 +00:00
Daniel Varga
97590ebbad Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-29 19:13:14 +02:00
Matthew Gaudet
056ca1083b Bug 1504005 - Initial Structured Spewer r=jandem
This spewer design has two goals:

  1. Provide a spew mechanism that has first-class support for slicing and
     dicing output. This means that filtering by script and channel should be
     the dominant output mechanism.
  2. Provide a simple powerful mechanism for getting information out of the
     compiler and into tools. I'm inspired by tools like CacheIR analyzer,
     IR Hydra, and the upcoming tracelogger integration into perf.html.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 14:37:01 +00:00
Daniel Varga
dc295b2050 Backed out changeset 5c1893bd77c2 (bug 1499323) for linting failure at /builds/worker/checkouts/gecko/config/check_macroassembler_style.py:149:5 on a CLOSED TREE 2018-11-29 16:03:08 +02:00
Nicolas B. Pierron
6570f1fb9f Bug 1499323 - Prepare the check_macroassembler_style python script to accept clang-format rewritting. r=jandem 2018-11-29 14:46:02 +01:00
Coroiu Cristina
da4da94439 Merge mozilla-central to inbound a=merge 2018-11-29 06:39:53 +02:00
Coroiu Cristina
e92b0f1d7f Merge inbound to mozilla-central a=merge 2018-11-29 06:27:40 +02:00
Coroiu Cristina
b8bc09a5b5 Merge mozilla-central to inbound a=merge on a CLOSED TREE
--HG--
rename : python/mozrelease/test/data/Firefox-62.0b11.update.json => python/mozrelease/test/data/Firefox-64.0b13.update.json
extra : rebase_source : 6eb078869182f40343e201993c0d0442ed96ad46
2018-11-29 00:34:07 +02:00
Coroiu Cristina
d4aafa8e1c Merge inbound to mozilla-central a=merge 2018-11-28 23:49:09 +02:00
Jason Orendorff
a942af532c Bug 1506200 - Remove ReadableStream EmbeddingFlags. r=baku,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D11903

--HG--
extra : moz-landing-system : lando
2018-11-28 22:20:55 +00:00
Matthew Gaudet
2ec7f9e1f3 Bug 1510018: Fix error in callVM comment r=nbp DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D13106

--HG--
extra : moz-landing-system : lando
2018-11-28 10:28:57 +00:00
Narcis Beleuzu
6d70864397 Merge mozilla-central to autoland. CLOSED TREE 2018-11-28 12:00:56 +02:00
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Ehsan Akhgari
0ad55ab74f Bug 1510513 - Retain the formatting of MOZ_DEFINE_ENUM_* macros r=sylvestre
These macros tend to be handled quite poorly since the clang-format
tokenizer cannot figure out how to handle them.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:14:19 +00:00
Tooru Fujisawa
a056a49888 Bug 1501155 - Part 2: Use WTF-8 as BinAST string encoding. r=Yoric 2018-11-28 14:16:29 +09:00
Tooru Fujisawa
6ca00b0b03 Bug 1501155 - Part 1: Add AtomizeWTF8Chars. r=jwalden 2018-11-28 14:16:29 +09:00
Coroiu Cristina
47323ec73b Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-11-28 23:56:03 +02:00
Brian Hackett
3b62690341 Bug 1510105 - Save/restore JSReturnOperand when doing debug mode OSR after a VM call returns, r=tcampbell.
--HG--
extra : rebase_source : b20c636ec65a7771c18feb67545a4e2afdfb6083
2018-11-27 05:57:15 -10:00
Brian Hackett
05a3dfff56 Bug 1510684 - Advance iterator in maybeIonFrameRecovery, r=nbp.
--HG--
extra : rebase_source : 1a5dcf2a9708db013ba7e898001e4cb0de3b75d6
2018-11-28 10:02:07 -10:00
Matthew Gaudet
b31f4edbbf Bug 1509293: Add missing lazyProtoCheck to tryAttachArrayPush r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D12787

--HG--
extra : moz-landing-system : lando
2018-11-28 17:52:16 +00:00
Benjamin Bouvier
aee3f05f7d Bug 1509283: Compile the last wasm function batch on the main thread; r=luke
--HG--
extra : rebase_source : 69645820d66e45bed4f622280b3f059525c39f09
2018-11-22 11:12:20 +01:00
Tooru Fujisawa
05a6adee89 Bug 1508063 - Part 5: Move non-auto-generated part of BinASTParser into BinASTParserPerTokenizer. r=Yoric 2018-11-29 01:03:46 +09:00
Tooru Fujisawa
f5534517cb Bug 1508063 - Part 4: Rename BinSource-auto.{cpp,h} to BinASTParser.{cpp,h}, and BinSource.{cpp,h} to BinASTParserPerTokenizer.{cpp,h}. r=Yoric 2018-11-29 01:03:45 +09:00
Tooru Fujisawa
4023bc8687 Bug 1508063 - Part 3: Fix typo in Binsource.yaml. r=Yoric 2018-11-29 01:03:45 +09:00
Tooru Fujisawa
53da82eb99 Bug 1508063 - Part 2: Move auto-generated enum to BinASTEnum.h. r=Yoric 2018-11-29 01:03:45 +09:00
Tooru Fujisawa
77b2720de2 Bug 1508063 - Part 1: Move BinASTParserBase into its own files. r=Yoric 2018-11-29 01:03:45 +09:00
Jeff Walden
f72433c342 Bug 1510366 - gdb-tests.py --write-failures FILE doesn't work (and it's not entirely clear how it ever did). r=sfink 2018-11-20 09:45:21 -08:00
Jeff Walden
3093d025b8 Bug 1510012 - Move Symbol-related APIs out of jsapi.h into js/public/Symbol.h. r=sfink, r=mccr8 for the bindings change
--HG--
extra : rebase_source : 3a8d2d694052435fbc47b9131a521e31e9b0ea6f
2018-11-24 12:21:40 -08:00
Jeff Walden
af9a670e28 Bug 1510007 - Move JSFreeOp's definition to js/public/MemoryFunctions.h, and make jsapi.h not #include that header. r=sfink
--HG--
extra : rebase_source : 4d6debefd66b89647df53c104b8560ba2de68abd
2018-11-21 18:11:15 -08:00
Ted Campbell
119fd6e9b9 Bug 1506475 - Add JS::AutoSuppressWarningReporter. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D11586

--HG--
extra : moz-landing-system : lando
2018-11-30 04:01:10 +00:00
Razvan Maries
77d87d9972 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-30 05:13:14 +02:00
Andreea Pavel
edbb48ab90 Backed out changeset 12525933eb9e (bug 1501666) for sm build bustages on a CLOSED TREE 2018-11-30 04:17:46 +02:00
Jason Orendorff
4d4e348fc8 Bug 1501666 - Fix bug in elaborate assertion that counts step hooks. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D12493

--HG--
extra : moz-landing-system : lando
2018-11-30 01:23:39 +00:00
Brindusan Cristian
203afd2294 Backed out changeset f7f8b232d111 (bug 1504005) for devtools failures on browser_dbg_rr_breakpoints-01.js. 2018-11-28 18:04:30 +02:00
Iain Ireland
2191adae5a Bug 1501865: Migrate IsSuspendedGenerator to CacheIR r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D12960

--HG--
extra : moz-landing-system : lando
2018-11-27 18:35:27 +00:00
Matthew Gaudet
9167627d07 Bug 1504005 - Initial Structured Spewer r=jandem
This spewer design has two goals:

  1. Provide a spew mechanism that has first-class support for slicing and
     dicing output. This means that filtering by script and channel should be
     the dominant output mechanism.
  2. Provide a simple powerful mechanism for getting information out of the
     compiler and into tools. I'm inspired by tools like CacheIR analyzer,
     IR Hydra, and the upcoming tracelogger integration into perf.html.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 14:03:02 +00:00
Nicolas B. Pierron
ae4fa6387c Bug 1499323 - Prepare the check_macroassembler_style python script to accept clang-format rewritting. r=jandem 2018-11-29 15:53:55 +01:00
André Bargull
6910699710 Bug 1504334 - Let Intl.RelativeTimeFormat ride the trains. r=jwalden, r=gandalf
--HG--
extra : rebase_source : eb0f0c26f97f713d8df6a516928bfa634fd00f46
2018-11-02 14:11:14 -07:00
Jon Coppeard
80b612aeb7 Bug 1508102 - Take account of XPCWrappedJS::mJSObjGlobal in cycle collector methods r=mccr8 a=abillings 2018-11-28 17:29:19 +00:00
Jan de Mooij
941e7bafcc Bug 1508097 - Remove clang-format off/on annotations for JSFunctionSpec arrays. r=tcampbell
We have a lot of these arrays and some used clang-format off/on, some are
formatted like a table, etc. We decided it's best to reformat and get rid of
the tabular structure.

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

--HG--
extra : amend_source : 7b697b5e967c90216c2fcd295a4b7c394ac1a500
2018-11-28 10:58:55 +01:00
Jan de Mooij
95da05ed99 Bug 1508095 - Add clang-format off/on annotations for JSFunctionSpecWithHelp arrays. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D13221

--HG--
extra : amend_source : 9767625c11b9ef11082b98176cb730175cb0cf5d
2018-11-28 10:31:09 +01: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
Jan de Mooij
cdfd9e8979 Bug 1508962 part 4 - Abstract jump opcodes in BaselineCodeGen. r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D12924

--HG--
extra : moz-landing-system : lando
2018-11-29 22:44:50 +00:00
Jan de Mooij
ae6bd129ae Bug 1508962 part 3 - Eliminate some *pc uses where we know the JSOp statically. r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D12922

--HG--
extra : moz-landing-system : lando
2018-11-29 22:44:48 +00:00
Jan de Mooij
b9db8593f0 Bug 1508962 part 2 - Implement emitDebugInstrumentation to abstract emitting debugging-specific code. r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D12523

--HG--
extra : moz-landing-system : lando
2018-11-29 22:44:44 +00:00
Jan de Mooij
07002c8c3d Bug 1508962 part 1 - Add a BaselineCodeGen<Handler> base class to BaselineCompiler and use it for JSOp compilation. r=djvj
This is just the first step: the Handler classes are still empty and
BaselineCodeGen contains fields/methods that should eventually move out of
there. That will happen in follow-up patches.

Rooting analysis now reported a hazard in ObjectGroup::getOrFixupCopyOnWriteObject,
this patch has the trivial fix for that too.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 22:43:00 +00:00
Jason Orendorff
172aa066bc Bug 1507248 - Use virtual methods for external readable stream callbacks. r=baku,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D11926

--HG--
extra : moz-landing-system : lando
2018-11-29 22:33:43 +00:00
Matthew Gaudet
0a3c610149 Bug 1509293: Add test case r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D13436

--HG--
extra : moz-landing-system : lando
2018-11-29 19:21:30 +00:00
Coroiu Cristina
08d30fd848 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-12-12 07:27:23 +02:00
Steve Fink
d3a3940a0e Bug 1167452 - Move getDelegate from WeakMap<K,V> to WeakMapBase, r=jonco
--HG--
extra : rebase_source : fcab11affdfc6fee9618ca30677d956f72ef3348
2018-09-24 12:41:47 -07:00
Steve Fink
10953d54c2 Bug 1513108 - Remove the separate class extension hook for getting a weakmap key delegate, r=jonco
Replace with just unwrapping the key, since there are no users that return anything else for a delegate.

--HG--
extra : rebase_source : e72b825121ca3493364c9347f65e5dddd1ef53e0
2018-12-07 14:38:01 -08:00
Steve Fink
149087a757 Bug 1167452 - Simplify Compartment::findOutgoingEdges, r=jonco
--HG--
extra : rebase_source : a09857201c78809e3ae24086a3deca8a312fab6f
2018-10-12 09:35:14 -07:00
Steve Fink
7255a66d9a Bug 1488552 - MOZ_LITTLE_ENDIAN is 0/1, not undef/1, r=tcampbell
--HG--
extra : rebase_source : 003739fa559484067bc1542b97ff082130bba4ab
2018-09-11 17:07:45 -07:00
Steve Fink
db151ff4c6 No bug. Start sweepGroupIndex at 1. r=me
It's confusing when looking at Zone.lastSweepGroupIndex() and getting 0 for all the zones being inspected. It made me think it wasn't getting set.

--HG--
extra : rebase_source : abbee63dce2beaf119aa267cb9b00e2448f5e432
2018-09-11 17:06:30 -07:00
Tom Ritter
b8360bbe3d Bug 1505088 - Remove redundant call and comparison to NowFuzzyTime in JS Engine. r=anba 2018-12-14 09:32:42 -06:00
Julian Seward
8222063091 Bug 1488162 - Remove suppressGC hacks from wasm code. r=lth.
This patch removes GCRuntime::temporaryAbortIfWasmGc() and SuppressGC (in
WasmStubs.cpp) and also all the bits of C++ that they guard.  It also removes
the seven associated test cases.  I verified that each of the seven tests
corresponds to one or more of the removed C++ fragments, so it is safe to
remove them.

--HG--
extra : rebase_source : fe10b50f931a1de20ce306325f25905e9133bc90
2018-12-14 13:02:35 +01:00
Julian Seward
3d560add12 Bug 1476251 - Generate stack maps in the Wasm Baseline compiler. r=lth.
This is a first implementation of stack map generation and usage for wasm
baseline.  It is intended to be a relatively simple starting point for testing
and refinement.  With the patch in place, it is possible to run Wasm test
cases that involve GC objects and garbage collection.

The general way the patch works is:

* During compilation, all state to do with generating stack maps is held in a
  new struct, StackMapGenerator.  The BaseCompiler updates various fields in
  StackMapGenerator as it goes, and can call StackMapGenerator::createStackMap
  to create a map.

  The StackMapGenerator holds various integer and Maybe-integer fields, but
  most importantly it maintains a MachineStackTracker, which is a vector of
  booleans which track the pointerness of each word in the current frame
  except for pointers corresponding to stack-resident ref-typed entries in the
  compiler's evaluation stack.

  When we want to create a stack map, BaseCompiler calls one of its four
  different ::createStackMap functions.  These are simple wrappers which add
  various default and other parameters and call onwards to
  StackMapGenerator::createStackMap, which does the actual work.

* StackMapGenerator::createStackMap works by augmenting the
  MachineStackTracker with pointers that are implied to exist as a result of
  stack-resident ref-typed entries in the compiler's evaluation stack
  (BaseCompiler::stk_).  The resulting entries are then copied off into a bit
  vector (a wasm::StackMap) for storage.  Extra entries may be added for the
  case where a trap exit stub's not-really-a-frame may be pushed over the
  current frame.  The presence of a ref-typed DebugFrame, if any, in the map,
  is also noted.

* All stack maps created also cover those words above the current frame's
  return address, that are used to pass parameters in memory to this function.
  In other words, the incoming argument area for a function is covered by that
  function's stackmap.  The alignment padding that may be above that area
  *isn't* however included; that belongs (logically) to the caller.

* For places where a function may invoke the wasm trap exit stub (by executing
  an illegal instruction), a composite map is created.  This contains entries
  for the stack entries that would exist in the absence of the stub, but also
  contains extra entries for the save area that the stub will push "on top" of
  the normal frame.  To describe the layout of the save area, a new routine,
  wasm::GenerateTrapExitMachineState, generates a description of the area from
  which the stackmap component for the save area is computed.

* Completed stackmaps are temporarily stored in BaseCompiler::stackMaps_.
  They are further processed in WasmGenerator.cpp:
  - ModuleGenerator::linkCompiledCode biases them by the module offset
    and moves them to the metadataTier_.
  - ModuleGenerator::finishMetadata sorts and sanity checks them
  - ModuleGenerator::finish biases them again, so as to give them their
    final code addresses, and checks (in debug builds) that they are
    associated with plausible instructions.

* When it comes to GC time, TraceJitActivations iterates over activations, and
  TraceJitActivation iterates over individual frames.  The latter calculates,
  in each frame, the address of the next instruction to be executed in that
  frame.  It hands this, and, effectively, the stack pointer value, to new
  function Instance::traceFrame.

* Instance::traceFrame does what you'd expect -- looks up the map, using
  Code::lookupStackMap.  Then it scans the frame, doing as many sanity checks
  as it reasonably can on the way.  There are heuristic (but safe) checks to
  ensure that the maps sync with the actual stack values, and also that the
  map sizes are correct.

* There are 3 new test files:
  stackmaps1.js -- tests unwinding w/ maps, for direct/indirect calls only.
  stackmaps2.js -- as stackmaps1.js but in the presence of many interrupts
  stackmaps3.js -- tries hard to generate many cells which are held live
                   only from the stack, whilst dealing with interrupts

* New types:
  MachineStackTracker   -- as described above
  StackMapGenerator     -- as described above
  struct wasm::StackMap -- a single stack map -- basically a bit vector
  class wasm::StackMaps -- a mapping from code addr to wasm::StackMap

* The zero value pushed by GenerateTrapExit has been changed to 1337 and had
  been given a symbolic name.  This isn't entirely frivolous: detecting the
  zero in Instance::traceFrame is a useful sanity check, but zeroes occur
  relatively frequently in the stack.  1337 is much less likely to randomly
  appear.  It's not pointer aligned and denotes "page zero" so seems
  relatively safe.

Supporting changes:

* JitFrameIter and WasmFrameIter have a new method, returnAddressToFp(), which
  produces the address of the next instruction to be executed for both JS and
  Wasm frames.

* For all call instructions generated, the relevant MacroAssembler routines
  have been modified so as to return a CodeOffset to guarantees to refer to
  the first byte of the instruction immediately following the call.  This is
  so as to ensure that the stack map refers to the correct instruction even in
  the case where the MacroAssembler routine adds further instruction after the
  actual call instruction.

* Stackmap generation can fail due to lack of memory.  So all call chains that
  can lead to a call to StackMapGenerator::createStackMap now return a
  MOZ_MUST_USE bool and must detect and handle OOMs in the normal way.

* struct BaseCompiler::Stk (evaluation stack elements) has been lifted out to
  the top level and placed above struct StackMapGenerator, since
  StackMapGenerator needs to be able to inspect stack entries.

--HG--
extra : rebase_source : 726c4cc60644ff86b4a09adb5b21379fa341bebc
2018-12-14 13:00:44 +01:00
Sean Stangl
82f86a7598 Bug 1497698 - Partial Implementation of PatchJump(). r=nbp 2018-12-13 15:36:00 +02:00
Razvan Maries
a8f2202396 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-12-14 18:35:20 +02:00
Yoshi Cheng-Hao Huang
ad67f7c11b Bug 1475896 - Add telemetry for GC marking rate. r=jonco, data-review=chutten 2018-12-14 17:10:10 +01:00
Jon Coppeard
2bea95122c Bug 1463462 - Dump more information when gray marking checks fail r=sfink 2018-12-06 16:28:15 -05:00
Jon Coppeard
1889f52bf0 Bug 1463462 - Add zeal mode to test incremental gray marking r=sfink 2018-12-06 16:28:15 -05:00
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
Jon Coppeard
1c2e7c6cbb Bug 1463462 - Make gray marking incremental r=sfink 2018-12-06 16:27:22 -05:00
Jon Coppeard
6702997785 Bug 1463462 - Make weak map marking take account of the fact that black and gray marking can now be interleaved r=sfink 2018-12-06 16:27:22 -05:00
Jon Coppeard
7b638e857e Bug 1463462 - Add a non-incremental gray marking phase before weakmap marking that marks from gray roots in the current sweep group r=sfink 2018-12-06 16:27:22 -05:00
Jon Coppeard
10a8c3775e Bug 1463462 - Parition the mark stack into black and gray entries r=sfink 2018-12-06 16:27:22 -05:00
Jon Coppeard
5967a9aebd Bug 1463462 - Change Zone marking states to MarkBlackOnly and MarkBlackAndGray r=sfink 2018-12-06 16:27:21 -05:00
Jon Coppeard
cf59672989 Bug 1514189 - Fix build bustage in opt builds with --enable-gczeal r=jandem 2018-12-14 13:47:09 +00:00
Cameron Kaiser
93af8a88e6 Bug 1512162: Followup: narrow non-stack-protected window for XPConnect on ppc64le. r=bhollley 2018-12-13 09:14:53 -08:00
Jeff Walden
5499a179ff Bug 1508725 - Adjust mozilla::FloatingPoint<T>'s definition so only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. r=froydnj
--HG--
extra : rebase_source : fe3e97b77945bcffd5f4415351541fcd5875bdbb
2018-06-07 13:25:12 -07:00
Cosmin Sabou
1b7e778d69 Merge mozilla-central to mozilla-inbound. 2018-11-28 00:04:55 +02:00
Matthew Gaudet
578daf5837 Bug 1491827: Initial SMDOC for callWithABI r=nbp DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D13003

--HG--
extra : moz-landing-system : lando
2018-11-27 17:31:44 +00:00
Razvan Maries
8965794e05 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-27 19:35:52 +02:00
Razvan Maries
99a5f987b3 Merge mozilla-inbound to mozilla-central a=merge 2018-11-27 19:32:31 +02:00
Iain Ireland
c1e04f8525 Bug 1509482: Add EnsureBallast calls r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D12954

--HG--
extra : moz-landing-system : lando
2018-11-27 10:36:18 +00:00
Jan de Mooij
6cab196785 Bug 1479394 - Clean up exception handling in bailout code and remove a MOZ_ASSERT_IF that triggered a UAF. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D12110

--HG--
extra : moz-landing-system : lando
2018-11-27 10:34:24 +00:00
Tom Schuster
f76708e1da Bug 1496475 - JSAPI test. r=jorendorff
Depends on D12948

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

--HG--
extra : moz-landing-system : lando
2018-11-27 11:38:40 +00:00
Tom Schuster
2838fc8779 Bug 1496475 - Object.defineProperty needs to be able to return false when trying to define a non-configurable property on a WindowProxy. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D12948

--HG--
extra : moz-landing-system : lando
2018-11-27 11:38:28 +00:00
Jan de Mooij
c1f51630a7 Bug 1509542 part 3 - Increase JSString max length from |2**28 - 1| to |2**30 - 2|. r=jwalden
We use |2**30 - 2| to ensure the size of a null-terminated char16_t buffer
still fits in int32_t.

The patch adds some tests. I tried to add similar tests for toUpperCase() and
toLocaleUpperCase("lt") (calling into ICU) but it makes the test very slow in debug builds.

Depends on D12878

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

--HG--
extra : moz-landing-system : lando
2018-11-26 23:28:47 +00:00
Jan de Mooij
1b3be3e61d Bug 1509542 part 2 - Fix two static_asserts in Intl code. r=jwalden
Depends on D12877

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

--HG--
extra : moz-landing-system : lando
2018-11-26 23:26:18 +00:00
Jan de Mooij
d7bb82ecc1 Bug 1509542 part 1 - Fix Escape to not rely on result.length <= JSString::MAX_LENGTH. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D12877

--HG--
extra : moz-landing-system : lando
2018-11-26 23:23:41 +00:00
Razvan Maries
0859e6b10f Merge mozilla-inbound to mozilla-central a=merge 2018-11-27 11:43:31 +02:00
Coroiu Cristina
a2f107533b Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-11-27 01:03:16 +02:00
Ted Campbell
546a173c3f Bug 1506623 - Group spidermonkey source in make-source-package r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D11681

--HG--
extra : moz-landing-system : lando
2018-11-22 14:52:38 +00:00
Ted Campbell
29b95f12c1 Bug 1506623 - Group config dependencies in make-source-package r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D11678

--HG--
extra : moz-landing-system : lando
2018-11-22 02:31:20 +00:00
Ted Campbell
d7dc245852 Bug 1506623 - Group additional libraries in make-source-package r=sfink
Depends on D11676

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

--HG--
extra : moz-landing-system : lando
2018-11-21 00:42:32 +00:00
Ted Campbell
644f632eaa Bug 1506623 - Group top-level files in make-source-package r=sfink
Depends on D11675

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

--HG--
extra : moz-landing-system : lando
2018-11-21 00:42:10 +00:00
Ted Campbell
cd45c60e05 Bug 1506623 - Group file generation tasks in make-source-package r=sfink
Depends on D11674

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

--HG--
extra : moz-landing-system : lando
2018-11-21 00:41:29 +00:00
Ted Campbell
9eeca49c00 Bug 1506623 - Group cleanup tasks in make-source-package r=sfink
Depends on D11673

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

--HG--
extra : moz-landing-system : lando
2018-11-21 00:40:46 +00:00
Ted Campbell
27893fe43c Bug 1506623 - Use trailing slashes for cp in make-source-package r=sfink
To avoid surprises of |cp| copying into a directory vs copying to a new name,
be consistent about using a trailing slash on target directory.

Depends on D11672

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

--HG--
extra : moz-landing-system : lando
2018-11-21 00:40:32 +00:00
Ted Campbell
ff9d188135 Bug 1506623 - Remove duplicate gyp copy from make-source-package r=sfink
The gyp directory is already copied by the third-party/python line earlier.

Depends on D11671

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

--HG--
extra : moz-landing-system : lando
2018-11-21 00:39:10 +00:00
Ted Campbell
c62482cd48 Bug 1506623 - Maintain zlib dir structure in spidermonkey tarball r=sfink
Depends on D11669

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

--HG--
extra : moz-landing-system : lando
2018-11-26 19:44:04 +00:00
Ted Campbell
20bb9919c4 Bug 1506623 - Use TOPSRCDIR consistently in make-source-package r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D11669

--HG--
extra : moz-landing-system : lando
2018-11-21 00:34:41 +00:00
Csoregi Natalia
234c6b75f2 Merge inbound to mozilla-central. a=merge 2018-11-26 18:17:37 +02:00
Jon Coppeard
f411fef495 Bug 1509824 - Remove Arena::markOverflow flag r=sfink 2018-11-26 13:34:01 +00:00
Jon Coppeard
5b8d42648b Bug 1509824 - Add RAII class AutoSetMarkColor to handle changing the mark color r=sfink 2018-11-26 13:34:01 +00:00
Jon Coppeard
bc59d4ae3f Bug 1509824 - Refactor ShouldTraceCrossCompartment to improve readability r=sfink 2018-11-26 13:34:01 +00:00
Jon Coppeard
d499d26219 Bug 1509824 - Check success of gray root buffering earlier r=sfink 2018-11-26 13:34:01 +00:00
Ms2ger
5cf4559400 Bug 1509774 - Add the requests library to the path in jstests; r=jandem 2018-11-26 12:59:19 +01:00
Jan de Mooij
fb6793b22d Bug 1506968 - Fix an invalid assert in IonBuilder::improveThisTypesForCall. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D12638

--HG--
extra : moz-landing-system : lando
2018-11-26 11:03:41 +00:00