Commit Graph

73545 Commits

Author SHA1 Message Date
Jan de Mooij
96cc0b5247 Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 06:29:13 +00:00
Jeff Walden
73b429ab38 Bug 1582348 - Save |underlyingSink| in a slot on the controller so that [[{write,close,abort}Algorithm]] can make later use of it. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51048

--HG--
extra : moz-landing-system : lando
2019-11-05 05:12:36 +00:00
Jeff Walden
373e83663e Bug 1582348 - Make WritableStreamDefault{Controller,Writer} real classes, and resolve them only when writable streams have been enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51047

--HG--
extra : moz-landing-system : lando
2019-11-05 05:12:15 +00:00
Jeff Walden
919d7d7a19 Bug 1582348 - Implement "Let sinkWritePromise be the result of performing controller.[[writeAlgorithm]], passing in chunk." r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51046

--HG--
extra : moz-landing-system : lando
2019-11-05 05:12:03 +00:00
Jeff Walden
cdb761f138 Bug 1582348 - Implement performing "Let sinkClosePromise be the result of performing controller.[[closeAlgorithm]]." r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51045

--HG--
extra : moz-landing-system : lando
2019-11-05 05:11:50 +00:00
Jeff Walden
189c3bcb9d Bug 1582348 - Allow |PromiseCall| to be called providing zero or two arguments, in addition to just one argument. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51044

--HG--
extra : moz-landing-system : lando
2019-11-05 05:11:38 +00:00
Jeff Walden
aa0270f80b Bug 1582348 - Implement the |WritableStreamDefaultWriter| constructor. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51043

--HG--
extra : moz-landing-system : lando
2019-11-05 05:11:25 +00:00
Jeff Walden
05e1502dcb Bug 1582348 - Implement |WritableStreamDefaultWriterEnsure{Ready,Closed}PromiseRejected|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51042

--HG--
extra : moz-landing-system : lando
2019-11-05 05:11:08 +00:00
Jeff Walden
7b73a9090e Bug 1582348 - Document WritableStream::Slot_State directly by the enum initializer. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50108

--HG--
extra : moz-landing-system : lando
2019-11-05 05:10:50 +00:00
Jeff Walden
b1d5d8190b Bug 1582348 - Implement |WritableStreamAbort| and |WritableStreamDefaultWriter.prototype.abort|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50107

--HG--
extra : moz-landing-system : lando
2019-11-05 05:10:42 +00:00
Jeff Walden
2befc5d656 Bug 1582348 - Implement |WritableStreamDefaultWriter.prototype.releaseLock|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50106

--HG--
extra : moz-landing-system : lando
2019-11-05 05:10:27 +00:00
Jeff Walden
331487beaa Bug 1582348 - Implement |WritableStreamDefaultWriterRelease|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50105

--HG--
extra : moz-landing-system : lando
2019-11-05 05:10:14 +00:00
Jeff Walden
fa982c9e33 Bug 1582348 - Implement |WritableStreamDefaultWriter.prototype.close|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50104

--HG--
extra : moz-landing-system : lando
2019-11-05 05:34:03 +00:00
Jeff Walden
2d963b25e8 Bug 1582348 - Implement |WritableStreamDefaultWriter.prototype.write|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50103

--HG--
extra : moz-landing-system : lando
2019-11-05 05:34:57 +00:00
Jeff Walden
9135dacfd6 Bug 1582348 - Implement |WritableStreamDefaultWriterWrite|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50102

--HG--
extra : moz-landing-system : lando
2019-11-05 05:32:13 +00:00
Jeff Walden
c48b48a179 Bug 1582348 - Implement |WritableStreamDefaultControllerWrite|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50101

--HG--
extra : moz-landing-system : lando
2019-11-05 05:31:45 +00:00
Jeff Walden
d89c3eb925 Bug 1582348 - Fill out the rest of |WritableStreamDefaultControllerAdvanceQueueIfNeeded| and implement |WritableStreamDefaultControllerProcess{Close,Write}| as required by it. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50100

--HG--
extra : moz-landing-system : lando
2019-11-05 05:35:30 +00:00
Jeff Walden
ef6b0b0b9d Bug 1582348 - Remove |QueueEntry| and just store its elements in successive elements of a queue. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51041

--HG--
extra : moz-landing-system : lando
2019-11-05 05:34:50 +00:00
Chris Fallin
20c0e3dd22 Bug 1580246: Remove object-literal singleton objects allocated at parse. r=djvj,mgaudet
Instead, this patch introduces a new `ObjLiteral` mini-bytecode format
that is used to carry object-literal information from parse time to a
later time at which GC objects are safe to allocate. The mini-bytecode simply
specifies a list of fields and constant field values.

The original intent of this patch (realized in previous versions of it)
was to make this an opcode, and completely replace object creation
sequences (NEWINIT, INITPROP, INITPROP, ...) with one OBJLITERAL opcode.
However, there are quite a few performance regressions that occur when
replacing the finely-tuned set of optimizations around this with a new
mechanism.

As a result, this patch only defers allocation of the objects until the
very end of parse. Each object literal adds an ObjLiteralCreationData
instance to the GC-things list, and when the GC-things list is processed
to perform deferred allocations, the described objects will be created.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 21:31:27 +00:00
Ted Campbell
d93b9de014 Bug 1591405 - Add BaseScript::function() and simplify code. r=jandem
Instead of checking for canonical function using scope chain, we can
directly use the functionOrGlobal field. By moving this to the
BaseScript class we can also simplify the debugger acccess.

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

--HG--
extra : moz-landing-system : lando
2019-11-01 21:46:55 +00:00
Ted Campbell
b3ca3e3f9b Bug 1585372 - Compute script name in InitScriptCoverage. r=nbp
To avoid calling JSScript::function() from finalizer, we need to read the
name earlier in process.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 16:33:35 +00:00
Ted Campbell
bed71ec642 Bug 1585372 - Run InitScriptCoverage after initialization. r=jandem,nbp
To allow InitScriptCoverage to be more flexible, we need to delay the call
until the JSScript is actually initialized. This moves the calls from
JSScript constructor until the JSScript is actually initialized. This is
similar to the debugger onNewScript call, but more cleanup would be needed to
unify these.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 20:21:28 +00:00
Ted Campbell
07cee7227d Bug 1593354 - Add BaseScript::IsFunction flag. r=jandem
Set this flag for scripts that are for functions. This is equivalent to
checking the kind of the bodyScope() but is safe to call in GC contexts such
as finalization.
Also use an isFunction() accessor instead of checking if JSScript::function()
is nullptr throughout the codebase. Similarly, cleanup similar uses of
JSScript::module().

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

--HG--
extra : moz-landing-system : lando
2019-11-04 07:56:09 +00:00
Csoregi Natalia
27333d7243 Backed out changeset 8e192f9c8f84 (bug 1580246) for build bustages on BytecodeSection.h CLOSED TREE 2019-11-04 20:48:53 +02:00
Chris Fallin
dd56740967 Bug 1580246: Remove object-literal singleton objects allocated at parse. r=djvj,mgaudet
Instead, this patch introduces a new `ObjLiteral` mini-bytecode format
that is used to carry object-literal information from parse time to a
later time at which GC objects are safe to allocate. The mini-bytecode simply
specifies a list of fields and constant field values.

The original intent of this patch (realized in previous versions of it)
was to make this an opcode, and completely replace object creation
sequences (NEWINIT, INITPROP, INITPROP, ...) with one OBJLITERAL opcode.
However, there are quite a few performance regressions that occur when
replacing the finely-tuned set of optimizations around this with a new
mechanism.

As a result, this patch only defers allocation of the objects until the
very end of parse. Each object literal adds an ObjLiteralCreationData
instance to the GC-things list, and when the GC-things list is processed
to perform deferred allocations, the described objects will be created.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 18:31:18 +00:00
Andy Wingo
b1b874a300 Bug 1593618 - Fix WebAssembly Ion codegen for a loop with parameter r=luke
Differential Revision: https://phabricator.services.mozilla.com/D51598

--HG--
extra : moz-landing-system : lando
2019-11-04 16:34:37 +00:00
Iain Ireland
68ef00581e Bug 1587638: Deduplicate atoms in XDR r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D48785

--HG--
extra : moz-landing-system : lando
2019-11-04 15:29:45 +00:00
Iain Ireland
d5503b5dd4 Bug 1587638: Add support for buffer switching to incremental encoder r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D48784

--HG--
extra : moz-landing-system : lando
2019-11-01 20:28:23 +00:00
Iain Ireland
e084acf2f4 Bug 1587638: Add testcase to check GC barriers during XDR encoding/decoding r=tcampbell
Depends on D48782

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

--HG--
extra : moz-landing-system : lando
2019-10-31 21:12:51 +00:00
Iain Ireland
65c313ae8e Bug 1587638: Add atom map to XDRIncrementalEncoder and atom table to XDRDecoder r=jonco,tcampbell
The code that uses these fields is part of a subsequent patch. This patch is just getting the tracing right.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 21:57:56 +00:00
Iain Ireland
4e557e0f11 Bug 1587638: Clear GC pointers in ScriptSource when canonical ScriptSourceObject is finalized r=tcampbell
Right now there BinAST is the only case, but subsequent patches will add GC pointers to XDR encoders and decoders.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 21:10:41 +00:00
Nathan Froyd
77d5c7817f Bug 1593673 - add a VIXL_UNREACHABLE in SubstituteImmediateField; r=sstangl
Otherwise we get warnings about possible (unintended) fallthrough here.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 15:20:27 +00:00
André Bargull
11c3c57ab3 Bug 1531716 - Part 4: Replace jstypes macros with constexpr functions. r=jonco
JS_BIT and JS_BITMASK are only used in contexts where uint32_t is used, so these
two functions are now typed to accept and return uint32_t.

JS_HOWMANY and the three JS_ROUND functions are only used with size_t inputs,
so these four functions are now typed to accept and return size_t.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 14:04:35 +00:00
André Bargull
5efd76b5a4 Bug 1531716 - Part 3: Replace ROUNDUP with JS_ROUNDUP. r=jonco
Both macros compute the same result, so we can replace ROUNDUP with JS_ROUNDUP.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 14:02:57 +00:00
André Bargull
73bbabcee5 Bug 1531716 - Part 2: Remove unused macro in vm/Probes.cpp. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51140

--HG--
extra : moz-landing-system : lando
2019-11-04 14:02:37 +00:00
André Bargull
93b477dc4a Bug 1531716 - Part 1: Remove macros for generating the SmallChars array. r=jonco
And the two macros to convert to and from SmallChars.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 14:02:14 +00:00
Kurt Miller
01378151ec Bug 1586912: Don't ComputeRandomAllocationAddress on OpenBSD r=nbp
OpenBSD already has a random mmap()

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

--HG--
extra : moz-landing-system : lando
2019-11-04 14:04:53 +00:00
Jan de Mooij
2e26c4e5a1 Bug 1593175 - Check mightHaveSideEffects in CodeGenerator::visitValueToString too. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D51379

--HG--
extra : moz-landing-system : lando
2019-11-01 08:37:02 +00:00
Andy Wingo
8ea1934f15 Bug 1593247 - Fix WebAssembly Ion codegen for if/then without else r=luke
Differential Revision: https://phabricator.services.mozilla.com/D51404

--HG--
extra : moz-landing-system : lando
2019-11-04 12:17:40 +00:00
Jeff Walden
409b142d79 Bug 1591386 - Mark one other test262 test of DateTimeFormat functionality as nightly-only, til we enable the relatedYear field in beta/release. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D51493

--HG--
extra : source : ceeb77f79442a9710da29162281e3403955a9a22
2019-11-02 22:50:51 +00:00
Coroiu Cristina
948cc9d861 Backed out changeset ceeb77f79442 (bug 1591386) for jsreftests at jsreftest.html?test=non262/Date/15.9.5.7.js 2019-11-03 03:46:10 +02:00
Jeff Walden
5f889a91f3 Bug 1591386 - Mark one other test262 test of DateTimeFormat functionality as nightly-only, til we enable the relatedYear field in beta/release. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D51493

--HG--
extra : moz-landing-system : lando
2019-11-02 22:50:51 +00:00
Jim Blandy
4635915c52 Bug 1591342: When setting breakpoints, require usable cross-compartment wrappers. r=jonco
When the `Debugger` API sets a breakpoint in a JSScript or wasm::Instance, the
BreakpointSite and Breakpoint objects belong to the code's compartment
(logically, at least - they're C++ objects and don't actually have any
compartment). Since a `Debugger` and its debuggees must be in separate
compartments, the Breakpoint's references to its owning `Debugger` and its
handler object must go through cross-compartment wrappers.

If we have nuked the `Debugger`'s compartment, it's not clear how we're still
trying to set breakpoints in its debuggees, but we should at least throw an
error, to capture a JavaScript stack when it occurs.

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

--HG--
extra : moz-landing-system : lando
2019-11-02 02:05:01 +00:00
Jeff Walden
de66507e5e Bug 1591386 - Mark the one test262 test of DateTimeFormat relatedYear functionality as nightly-only, til we enable the field in beta/release. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D50696

--HG--
extra : moz-landing-system : lando
2019-10-31 21:50:05 +00:00
Jeff Walden
17e7f697d4 Bug 1589545 - Add a test. r=arai,jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D49693

--HG--
extra : moz-landing-system : lando
2019-11-02 00:28:49 +00:00
Jeff Walden
de45fc895e Bug 1589545 - Don't pass a CCW to AutoRealm in streams code, when processing pull/cancel functionality. r=arai,jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D49694

--HG--
extra : moz-landing-system : lando
2019-11-02 00:28:49 +00:00
Jeff Walden
0994b1fc51 Bug 1582348 - Enable writable streams in the browser when the javascript.options.{,writable_}streams prefs are set. (Writable streams are only half-implemented; DO NOT start reporting bugs yet, it *will* crash in all sorts of trivial ways.) r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D51049

--HG--
extra : moz-landing-system : lando
2019-11-01 22:55:05 +00:00
Rohit Awate
2c355244bf Bug 1589072 - Improve numeric separators error messages r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D51134

--HG--
extra : moz-landing-system : lando
2019-11-01 22:43:52 +00:00
André Bargull
6ffc0356ab Bug 1526870 - Part 16: Change Proxy CacheIR VM functions to use unboxed returned types when possible. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D51072

--HG--
extra : moz-landing-system : lando
2019-11-01 16:06:12 +00:00
André Bargull
18c6d4b6e2 Bug 1526870 - Part 15: Use AutoCallVM for additional CacheIR emitters. r=jandem
Use a single implementation in CacheIRCompiler.cpp for CacheIR emitters which
can be updated to the changed AutoCallVM class.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 13:23:43 +00:00