Commit Graph

70277 Commits

Author SHA1 Message Date
Jeff Walden
fcff024573 Bug 1542462 - Implement both JS::CompileFunction (for UTF-8 and UTF-16) in clearer fashion, and don't prematurely inflate the user-provided function body source. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26416

--HG--
extra : moz-landing-system : lando
2019-04-08 06:44:19 +00:00
Jeff Walden
b25d22b225 Bug 1542462 - Rename JS::CompileFunctionUtf8 to JS::CompileFunction, and make it take JS::SourceText<mozilla::Utf8Unit>. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26415

--HG--
extra : moz-landing-system : lando
2019-04-08 06:44:12 +00:00
Andrew McCreight
327d0da02c Bug 1463569 - Add a way to log the sizes of GC things to GC logs. r=sfink
If the environment variable MOZ_GC_LOG_SIZE is set, then GC logs will
include some extra data that indicates how much memory the GC thing
uses, including extra data hanging off of it. This can be used
calculate finer grained information about the memory usage of scripts.

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

--HG--
extra : moz-landing-system : lando
2019-04-07 13:35:44 +00:00
Robin Templeton
d01798a2b1 Bug 1541873 - Conditionally disable Big(U)Int64Array constructors. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D26391

--HG--
extra : moz-landing-system : lando
2019-04-06 11:26:26 +00:00
Andrew McCreight
90abea1653 Bug 1540301, part 5 - Replace instances of nsXPCWrappedJSClass with nsXPTInterfaceInfo. r=bzbarsky
nsXPCWrappedJSClass now only adds indirections and dynamic
allocations, so eliminate it. The class is kept around as a collection
of static helper functions to avoid needing to move around all of this
code and messing with history. In total, these patches save around 2kb
of dynamic allocations per process.

The major parts of this patch are:
* Dropping indirection for accessing things on nsXPTInterfaceInfo and
  renaming things from class to info.
* Removing the stuff related to instances of nsXPCWrappedJSClass
  existing (ctor, dtor, field, ISupports implementation, getter methods).
* Removing IID2WrappedJSClassMap, because we only need the map from IIDs
  to info.

I dropped the null check in TraverseNative because mInfo is never
cleared, while mClass was.

I dropped the forward declaration of nsXPCWrappedJSClass because no
instances of that class exist, so no function will take or return a
pointer to one.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 12:57:02 +00:00
Andrew McCreight
8f23fc71ea Bug 1540301, part 4 - Make nsXPCWrappedJSClass::DebugDump into an infallible static method. r=bzbarsky
Ultimately, this method is really about dumping XPConnect-ish
information about an nsXPTInterfaceInfo, so change it into a static
method that takes an info directly. This loses logging of the
nsXPCWrappedJSClass's ref count, but that is going away in the next
patch anyways.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 12:57:00 +00:00
Andrew McCreight
2ea25a6e9f Bug 1540301, part 3 - Eliminate nsIXPCWrappedJSClass. r=bzbarsky
This interface serves no real purpose, aside from some weird XPConnect
debugging function. If you are in a debugger already, you can just
call the nsXPCWrappedJSClass DebugDump method directly.

For now, I changed nsXPCWrappedJSClass to just implement nsISupports,
but this will go away later.

I also devirtualized DebugDump(), because it is no longer an XPCOM
method.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 12:56:53 +00:00
Andrew McCreight
d320f01e48 Bug 1540301, part 2 - Make nsXPCWrappedJSClass::CallMethod() into a static method. r=bzbarsky
The first idea here is that |this| is actually the GetClass() of the
|wrapper| argument (the one call site looks like
"GetClass()->CallMethod(this, ...)"), so we can locally reconstruct it
when CallMethod is a static method.

The second idea here is that the only real use of the
nsXPCWrappedJSClass is to grab some data from the nsXPTInterfaceInfo
in a few places. This means that we can take a pointer to the info
early on in the function and use that rather than go through the
nsXPCWrappedJSClass. This in turn means that because the info is
statically allocated we no longer need to do a kungFuDeathGrip on the
wrapper's nsXPCWrappedJSClass.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 12:56:51 +00:00
Andrew McCreight
5d994e0f0e Bug 1540301, part 1 - Make trivially static nsXPCWrappedJSClass methods static. r=bzbarsky
There are a number of nsXPCWrappedJSClass methods that don't use any
data from |this|, so go ahead and make them static. This is one step
towards eliminating nsXPCWrappedJSClass entirely.

In addition, devirtualize a few methods, because they are going to
have to get devirtualized anyways, and there's no need for them to be
virtual.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 12:56:49 +00:00
Andreea Pavel
4146c75e78 Merge mozilla-inbound to mozilla-central. a=merge 2019-04-06 13:58:33 +03:00
Jeff Walden
962996a366 Bug 1506902 - Minor syntactic adjustments to gdb/tests/test-asmjs.cpp, extracted from broader changes related to UTF-8 parsing. r=jandem
--HG--
extra : rebase_source : 9e8840b272b5624e0b67644c6cf9b850905b967b
2019-04-05 19:18:03 -07:00
shindli
d1f516dbfc Merge inbound to mozilla-central. a=merge 2019-04-06 00:48:45 +03:00
Julian Seward
1740813ffe Bug 1532974 - wasm baseline compiler: increase some Vector inline-capacity sizes. r=lhansen.
Profiling with DHAT of wasm baseline compiling the Tanks demo shows some
opportunities for reducing the amount of heap allocation, by modestly
increasing the inline-capacity values for a few Vector types.

Compiling the Tanks demo on x86_64-linux, this patch reduces the number of
allocated blocks by around 12000, whilst increasing neither the total
allocated bytes nor the dynamic instruction count.
2019-04-05 17:25:28 +02:00
Andrew McCreight
184afc9483 Bug 1541684, part 4 - Remove nsXPCWrappedJSClass:mDescriptors. r=nika
This field now just caches the IsReflectable() field from the method
info, so get rid of it.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:20 +00:00
Andrew McCreight
8f597c742f Bug 1541684, part 3 - Statically compute if a method is reflectable. r=nika
XPCConvert::IsMethodReflectable() is derived entirely from
nsXPTMethodInfo, so we can compute it at build time and include it in
nsXPTMethodInfo. It is the only use of mNotXPCOM and mHidden, so we
can get rid of those fields at the same time.

This paves the way for getting rid of XPCWrappedJSClass::mDescriptors
in the next patch.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:18 +00:00
Andrew McCreight
a8dbd5d65f Bug 1541684, part 2 - Remove nsXPCWrappedJSClass::mIID. r=nika
This is already stored on mInfo.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:11 +00:00
Andrew McCreight
c1d8f269ef Bug 1541684, part 1 - Remove XPCWrappedJSClass::mRuntime. r=bzbarsky
There is only a single XPC JS runtime now, so there's no need to keep a
special pointer around.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:09 +00:00
Jeff Walden
b2ffd2f110 Bug 1542106 - Cache the last (line number, offset => column) mapping returned and use it to optimize a subsequent lookup that's further along in the same line. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26270

--HG--
extra : moz-landing-system : lando
2019-04-05 22:56:12 +00:00
Jeff Walden
5327fe7f3e Bug 1542120 - Add js/public/Warnings.h for warning-related JSAPI. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26273

--HG--
rename : js/src/jsapi.h => js/public/Warnings.h
extra : moz-landing-system : lando
2019-04-05 22:52:04 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
shindli
45ec6114d3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-04-06 00:51:18 +03:00
Ted Campbell
4335b1676e Bug 1542356 - Remove misc dead code from SpiderMonkey. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D26367

--HG--
extra : moz-landing-system : lando
2019-04-05 19:23:17 +00:00
André Bargull
cd43c70f3c Bug 1540569: Set TZ and LC_ALL for jstestbrowser suite following the jstest shell runner. r=ahal
The shell runner explicitly sets TZ=PST8PDT and LC_ALL=en_US.UTF-8 for the
jstest test suite. Use the same environment defaults when running this test
suite in the browser.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 12:45:00 +00:00
Jan de Mooij
498a78a1d1 Bug 1542190 - Remove Realm::marked_ flag. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D26293

--HG--
extra : moz-landing-system : lando
2019-04-05 14:01:53 +00:00
Boris Zbarsky
39bd790515 Bug 1541513 part 7. Stop using AutoJSContext in XPConnect. r=mccr8
The change to the second FindTearOff call in XPCWrappedNative::GetNewOrUsed is
fixing a longstanding bug that was introduced in bug 903891 when the sense of
the check was incorrectly reversed.  Luckily that code is unreached in
practice, because the two PreCreate hooks we have left never create the wrapper.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 18:12:18 +00:00
Boris Zbarsky
cb3918b746 Bug 1541513 part 6. Stop using AutoJSContext in XPCWrappedNativeInfo. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26006

--HG--
extra : moz-landing-system : lando
2019-04-04 13:14:40 +00:00
Boris Zbarsky
10328fb59d Bug 1541513 part 5. Stop using AutoJSContext in XPCWrappedNativeProto. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26005

--HG--
extra : moz-landing-system : lando
2019-04-04 02:10:05 +00:00
Boris Zbarsky
5057288ed8 Bug 1541513 part 4. Stop using AutoJSContext in NativeData2JS. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26003

--HG--
extra : moz-landing-system : lando
2019-04-04 02:08:47 +00:00
Boris Zbarsky
6f668b8c00 Bug 1541513 part 3. Stop using AutoJSContext in NativeInterface2JSObject. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26002

--HG--
extra : moz-landing-system : lando
2019-04-04 02:07:53 +00:00
Boris Zbarsky
953426c78f Bug 1541513 part 2. Stop using AutoJSContext in some simple XPCConvert cases. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26000

--HG--
extra : moz-landing-system : lando
2019-04-03 23:33:35 +00:00
Boris Zbarsky
6c53c36a79 Bug 1541513 part 1. Stop requiring a JSContext for JS_SetAllNonReservedSlotsToUndefined. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D25999

--HG--
extra : moz-landing-system : lando
2019-04-05 07:36:32 +00:00
Ted Campbell
fe9060461e Bug 1541495 - Use UniquePtr for jit::RematerializedFrame. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D25951

--HG--
extra : moz-landing-system : lando
2019-04-05 10:44:40 +00:00
Coroiu Cristina
749dbdc496 Merge mozilla-central to inbound a=merge 2019-04-05 06:23:29 +03:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Boris Zbarsky
8b2ada715e Bug 1541600 part 2. Stop using AutoJSContext for the slow script dialog. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26224

--HG--
extra : moz-landing-system : lando
2019-04-04 20:00:36 +00:00
Jason Orendorff
bb1ea391d4 Bug 1541616 - Part 2: Add entries to jstests.list for test262 failures related to fields. r=khyperia
Depends on D26032

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

--HG--
extra : moz-landing-system : lando
2019-04-04 00:33:13 +00:00
Jason Orendorff
ad7965a04d Bug 1541616 - Part 1: Fix unimplemented.js. r=khyperia
Differential Revision: https://phabricator.services.mozilla.com/D26032

--HG--
extra : moz-landing-system : lando
2019-04-04 00:31:50 +00:00
André Bargull
6abb73e9ae Bug 1531091: Append Unicode extensions without values and remove "true" value from keywords. r=jwalden
- Implement the spec changes from <https://github.com/tc39/ecma402/pull/302>.
- Additionally for the test262 test to pass, we also need to implement parts of
  the Unicode extension canonicalisation from bug 1522070. Namely removing the
  value "true" from keywords.
- The two helper functions were copied from the Intl.Locale patch.
- `CanonicalizeUnicodeExtension` was slightly modified to allow duplicate
  keywords, which is required by spec.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 14:07:14 +00:00
Nicolas B. Pierron
207369bbb9 Bug 1534492 - Prevent RegAlloc from allocating an argument register for a temp used in passAbiArg base operand. r=sstangl
Differential Revision: https://phabricator.services.mozilla.com/D25944

--HG--
extra : moz-landing-system : lando
2019-04-04 13:33:34 +00:00
Andrew McCreight
ec3b52a535 Bug 1541677, part 2 - Remove the unused XPIDL version of GetInterfaceInfo. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D26066

--HG--
extra : moz-landing-system : lando
2019-04-04 05:05:04 +00:00
Andrew McCreight
2f250e281e Bug 1541677, part 1 - Remove unused cx arg to the nsXPCWrappedJSClass ctor. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D26065

--HG--
extra : moz-landing-system : lando
2019-04-04 05:04:41 +00:00
Oana Pop Rus
7f3884edcd Backed out changeset 1778699fa005 (bug 1534492) for spidermonkey bustages on a CLOSED TREE. 2019-04-04 15:29:46 +03:00
Nicolas B. Pierron
db7df4aaa2 Bug 1541463 - Enable MacroAssembler spew when --enable-jitspew is provided. r=sstangl
Differential Revision: https://phabricator.services.mozilla.com/D25945

--HG--
extra : moz-landing-system : lando
2019-04-03 16:47:49 +00:00
Nicolas B. Pierron
0f61088a42 Bug 1534492 - Prevent RegAlloc from allocating an argument register for a temp used in passAbiArg base operand. r=sstangl
Differential Revision: https://phabricator.services.mozilla.com/D25944

--HG--
extra : moz-landing-system : lando
2019-04-03 16:46:48 +00:00
André Bargull
2d3c5781a1 Bug 1539132 - Part 6: Save and restore async-generator state in debugger. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D25574

--HG--
extra : moz-landing-system : lando
2019-04-03 20:03:15 +00:00
André Bargull
ec3b2bf1e8 Bug 1539132 - Part 5: Add assertions and comments for async-generator states. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D25573

--HG--
extra : moz-landing-system : lando
2019-04-03 20:02:50 +00:00
André Bargull
2ad09c3c4c Bug 1539132 - Part 4: Remove unused return-value parameter from promise-reaction job functions. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D25572

--HG--
extra : moz-landing-system : lando
2019-04-03 20:02:30 +00:00
André Bargull
230ece35c7 Bug 1539132 - Part 3: Update spec references for async-functions. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D25570

--HG--
extra : moz-landing-system : lando
2019-04-03 20:02:08 +00:00
André Bargull
fd3426d879 Bug 1539132 - Part 2: Create Function constructor instead of silently failing when not present. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D25569

--HG--
extra : moz-landing-system : lando
2019-04-03 20:01:43 +00:00